diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 32034a825..f2ea02380 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -15,6 +15,7 @@ $config->setRules([ 'array_indentation' => true, 'indentation_type' => true, 'line_ending' => true, + 'no_extra_blank_lines' => true, 'no_trailing_whitespace' => true, 'ordered_class_elements' => true, 'single_space_after_construct' => true, diff --git a/cached.php b/cached.php index cc0b9270a..4f731b705 100644 --- a/cached.php +++ b/cached.php @@ -32,7 +32,6 @@ if (isset($_GET["t"])) { $time = filemtime($abs); } - $tsstring = gmdate("D, d M Y H:i:s ", $time) . "GMT"; if (isset($_SERVER["HTTP_IF_MODIFIED_SINCE"]) && ($_SERVER["HTTP_IF_MODIFIED_SINCE"] == $tsstring)) { diff --git a/conferences/index.php b/conferences/index.php index 34ae0ed44..04fe03388 100644 --- a/conferences/index.php +++ b/conferences/index.php @@ -3,7 +3,6 @@ $_SERVER['BASE_PAGE'] = 'conferences/index.php'; include_once __DIR__ . '/../include/prepend.inc'; include_once __DIR__ . '/../include/pregen-news.inc'; - mirror_setcookie("LAST_NEWS", $_SERVER["REQUEST_TIME"], 60*60*24*365); site_header("PHP Conferences around the world", array( 'headtags' => '', @@ -27,7 +26,6 @@ foreach ($NEWS_ENTRIES as $entry) { } $panels = '
Want to see your conference appear here?
'; - foreach ($frontpage as $entry) { $link = preg_replace('~^(http://php.net/|https://www.php.net/)~', '', $entry["id"]); $id = parse_url($entry["id"], PHP_URL_FRAGMENT); diff --git a/error.php b/error.php index 8de0b2d59..f3bb55053 100644 --- a/error.php +++ b/error.php @@ -128,7 +128,6 @@ if (preg_match("!^get/([^/]+)$!", $URI, $what)) { } } - // ============================================================================ // Nice URLs for download files, so wget works completely well with download links if (preg_match("!^get/([^/]+)/from/([^/]+)(/mirror)?$!", $URI, $dlinfo)) { @@ -678,7 +677,6 @@ if (preg_match("!^manual/([^/]+)/([^/]+).php$!", $URI, $match) && } } - // ============================================================================ // 404 page for manual pages (eg. not built language) if (strpos($URI, "manual/") === 0) { diff --git a/images/logo.php b/images/logo.php index 394e4e973..ae4d3585c 100644 --- a/images/logo.php +++ b/images/logo.php @@ -41,7 +41,6 @@ function imgheader($filename) { header("Content-Type: $hdr"); } - function get_accepted_encodings() { if (isset($_SERVER['HTTP_ACCEPT_ENCODING'])) { $encodings = explode(',', $_SERVER['HTTP_ACCEPT_ENCODING']); @@ -52,7 +51,6 @@ function get_accepted_encodings() { return array(); } - function serve_compressed_if_available($logo): void { $encodings = get_accepted_encodings(); if (!empty($encodings)) { diff --git a/index.php b/index.php index cd1d1dce9..624862881 100644 --- a/index.php +++ b/index.php @@ -55,7 +55,6 @@ include_once 'include/version.inc'; mirror_setcookie("LAST_NEWS", $_SERVER["REQUEST_TIME"], 60*60*24*365); - $content = "{$snippet}
"; diff --git a/releases/index.php b/releases/index.php index 897639035..0c928974f 100644 --- a/releases/index.php +++ b/releases/index.php @@ -70,8 +70,6 @@ if (isset($_GET["serialize"]) || isset($_GET["json"])) { return; } - - // Human Readable. site_header("Releases", array( 'current' => 'downloads', diff --git a/search.php b/search.php index 6cb23045a..c7b2dce91 100644 --- a/search.php +++ b/search.php @@ -28,7 +28,6 @@ if (!empty($_FORM['pattern'])) { mirror_redirect("/manual-lookup.php?pattern={$ucp}{$langparam}&scope={$_FORM['show']}"); break; - case "manual": case "404manual": mirror_redirect($MYSITE . "results.php?q={$ucp}&p={$_FORM['show']}&l=$LANG"); diff --git a/security/index.php b/security/index.php index 5f03aa90c..b0a76835f 100644 --- a/security/index.php +++ b/security/index.php @@ -28,7 +28,6 @@ $SIDEBAR_DATA = <<