Skip to content

Commit 59c070f

Browse files
authored
Enhancement: Enable blank_line_after_opening_tag fixer (#875)
1 parent 25d2dc1 commit 59c070f

39 files changed

+47
-4
lines changed

.php-cs-fixer.php

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
'array_syntax' => true,
2525
'binary_operator_spaces' => true,
2626
'blank_line_after_namespace' => true,
27+
'blank_line_after_opening_tag' => true,
2728
'class_attributes_separation' => true,
2829
'class_definition' => true,
2930
'concat_space' => [

.router.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
$_SERVER["SERVER_ADDR"] = $_SERVER["HTTP_HOST"];
34

45
$filename = $_SERVER["PATH_INFO"] ?? $_SERVER["SCRIPT_NAME"];

archive/index.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
include_once __DIR__ . '/../include/prepend.inc';
34
$i = 0;
45
do {

backend/index.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
// Simulate a /backend shortcut call (which will lead to a manual page)
34
$_SERVER['REQUEST_URI'] = '/backend';
45
include_once __DIR__ . '/../include/prepend.inc';

bin/index.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
// Simulate a /bin shortcut call (which will lead to a manual page)
34
$_SERVER['REQUEST_URI'] = '/bin';
45
include_once __DIR__ . '/../include/prepend.inc';

conferences/index.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
$_SERVER['BASE_PAGE'] = 'conferences/index.php';
34
include_once __DIR__ . '/../include/prepend.inc';
45
include_once __DIR__ . '/../include/pregen-news.inc';

credits.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
$_SERVER['BASE_PAGE'] = 'credits.php';
34
include_once __DIR__ . '/include/prepend.inc';
45

images/elephpants.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
include_once __DIR__ . '/../include/prepend.inc';
34

45
$now = $_SERVER["REQUEST_TIME"];

images/index.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
// Simulate a /images shortcut call (which will lead to a manual page)
34
$_SERVER['REQUEST_URI'] = '/images';
45
include_once __DIR__ . '/../include/prepend.inc';

include/branches.inc

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
include_once __DIR__ . '/releases.inc';
34
include_once __DIR__ . '/version.inc';
45

include/changelogs.inc

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
function bugfix($number): void {
34
echo "Fixed bug "; bugl($number);
45
}

include/countries.inc

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
return [
34
'AFG' => 'Afghanistan',
45
'ALB' => 'Albania',

include/historical_mirrors.inc

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
$historical_mirrors = [
34
["ARG", "ar2.php.net", "XMundo Hosting Solutions", "http://www.xmundo.net"],
45
["ARM", "am1.php.net", "ARMINCO Global Telecommunications", "http://www.arminco.com/"],

include/index.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
// Simulate a /include shortcut call (which will lead to a manual page)
34
$_SERVER['REQUEST_URI'] = '/include';
45
include_once __DIR__ . '/prepend.inc';

include/results.inc

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
function search_results($res, $q, $profile = 'all', $per_page = 10, $s = 0, $l = 'en', $show_title = true, $show_foot = true, $show_attrib = true): void {
34
$start_result = $s;
45
$end_result = $s + $res['ResultSet']['totalResultsReturned'] - 1;

index.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
(function ($uri): void {
34
// Special redirect cases not able to be captured in error.php
45
$shortcuts = [

js/search-index.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
$_GET["lang"] = "en";
34
if (!isset($_GET["lang"])) {
45
header("Location: http://php.net");

manual-lookup.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
$_SERVER['BASE_PAGE'] = 'manual-lookup.php';
34
include __DIR__ . '/include/prepend.inc';
45
include __DIR__ . '/include/manual-lookup.inc';

manual/change.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
include_once __DIR__ . '/../include/prepend.inc';
34

45
$page = isset($_GET['page']) ? htmlspecialchars($_GET['page'], ENT_QUOTES, 'UTF-8') : '';

manual/index.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
<?php
2+
23
include_once __DIR__ . '/../include/prepend.inc';
34
mirror_redirect("/manual/$LANG/index.php");

manual/spam_challenge.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
// simple and stupid SPAM protection (using little challenges)
34

45
const NUMS = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'];

mirror-info.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
// Define $MYSITE and $LAST_UPDATED variables
34
include_once __DIR__ . '/include/prepend.inc';
45

mirrors.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
include_once __DIR__ . '/include/prepend.inc';
34

45
header("HTTP/1.1 301 Moved Permanently");

pear/index.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
// Simulate a /pear shortcut call (which will lead to a manual page)
34
$_SERVER['REQUEST_URI'] = '/pear';
45
include_once __DIR__ . '/../include/prepend.inc';

releases/8.0/common.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
namespace releases\php80;
46

releases/8.0/index.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
$_SERVER['BASE_PAGE'] = 'releases/8.0/index.php';
34
include __DIR__ . '/../../include/site.inc';
45

releases/8.1/common.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
namespace releases\php81;
46

releases/8.1/index.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
$_SERVER['BASE_PAGE'] = 'releases/8.1/index.php';
34
include __DIR__ . '/../../include/site.inc';
45

releases/8.2/common.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
namespace releases\php82;
46

releases/8.2/index.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
$_SERVER['BASE_PAGE'] = 'releases/8.2/index.php';
34
include __DIR__ . '/../../include/site.inc';
45

releases/8.3/common.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
<?php declare(strict_types=1);
1+
<?php
2+
3+
declare(strict_types=1);
24

35
namespace releases\php83;
46

releases/8.3/index.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
$_SERVER['BASE_PAGE'] = 'releases/8.3/index.php';
34
include __DIR__ . '/../../include/site.inc';
45

releases/active.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
$_SERVER['BASE_PAGE'] = 'releases/active.php';
34

45
include_once __DIR__ . '/../include/prepend.inc';

releases/feed.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
header("Content-Type: application/atom+xml");
34

45
include __DIR__ . "/../include/version.inc";

releases/index.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
$_SERVER['BASE_PAGE'] = 'releases/index.php';
34
include_once __DIR__ . '/../include/prepend.inc';
45
include_once __DIR__ . "/../include/branches.inc";

releases/states.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
$_SERVER['BASE_PAGE'] = 'releases/active.php';
34

45
include_once __DIR__ . '/../include/prepend.inc';

results.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
$_SERVER['BASE_PAGE'] = 'results.php';
34
include __DIR__ . '/include/prepend.inc';
45
include __DIR__ . '/include/results.inc';

search.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
$_SERVER['BASE_PAGE'] = 'search.php';
34
include_once __DIR__ . '/include/prepend.inc';
45

styles/index.php

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
23
// Simulate a /styles shortcut call (which will lead to a manual page)
34
$_SERVER['REQUEST_URI'] = '/styles';
45
include_once __DIR__ . '/../include/prepend.inc';

0 commit comments

Comments
 (0)