1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

Enhancement: Enable blank_line_after_opening_tag fixer (#875)

This commit is contained in:
Andreas Möller
2023-12-07 16:57:19 +01:00
committed by GitHub
parent 25d2dc1cc9
commit 59c070f557
39 changed files with 47 additions and 4 deletions

View File

@@ -24,6 +24,7 @@ $config
'array_syntax' => true,
'binary_operator_spaces' => true,
'blank_line_after_namespace' => true,
'blank_line_after_opening_tag' => true,
'class_attributes_separation' => true,
'class_definition' => true,
'concat_space' => [

View File

@@ -1,4 +1,5 @@
<?php
$_SERVER["SERVER_ADDR"] = $_SERVER["HTTP_HOST"];
$filename = $_SERVER["PATH_INFO"] ?? $_SERVER["SCRIPT_NAME"];

View File

@@ -1,4 +1,5 @@
<?php
include_once __DIR__ . '/../include/prepend.inc';
$i = 0;
do {

View File

@@ -1,4 +1,5 @@
<?php
// Simulate a /backend shortcut call (which will lead to a manual page)
$_SERVER['REQUEST_URI'] = '/backend';
include_once __DIR__ . '/../include/prepend.inc';

View File

@@ -1,4 +1,5 @@
<?php
// Simulate a /bin shortcut call (which will lead to a manual page)
$_SERVER['REQUEST_URI'] = '/bin';
include_once __DIR__ . '/../include/prepend.inc';

View File

@@ -1,4 +1,5 @@
<?php
$_SERVER['BASE_PAGE'] = 'conferences/index.php';
include_once __DIR__ . '/../include/prepend.inc';
include_once __DIR__ . '/../include/pregen-news.inc';

View File

@@ -1,4 +1,5 @@
<?php
$_SERVER['BASE_PAGE'] = 'credits.php';
include_once __DIR__ . '/include/prepend.inc';

View File

@@ -1,4 +1,5 @@
<?php
include_once __DIR__ . '/../include/prepend.inc';
$now = $_SERVER["REQUEST_TIME"];

View File

@@ -1,4 +1,5 @@
<?php
// Simulate a /images shortcut call (which will lead to a manual page)
$_SERVER['REQUEST_URI'] = '/images';
include_once __DIR__ . '/../include/prepend.inc';

View File

@@ -1,4 +1,5 @@
<?php
include_once __DIR__ . '/releases.inc';
include_once __DIR__ . '/version.inc';

View File

@@ -1,4 +1,5 @@
<?php
function bugfix($number): void {
echo "Fixed bug "; bugl($number);
}

View File

@@ -1,4 +1,5 @@
<?php
return [
'AFG' => 'Afghanistan',
'ALB' => 'Albania',

View File

@@ -1,4 +1,5 @@
<?php
$historical_mirrors = [
["ARG", "ar2.php.net", "XMundo Hosting Solutions", "http://www.xmundo.net"],
["ARM", "am1.php.net", "ARMINCO Global Telecommunications", "http://www.arminco.com/"],

View File

@@ -1,4 +1,5 @@
<?php
// Simulate a /include shortcut call (which will lead to a manual page)
$_SERVER['REQUEST_URI'] = '/include';
include_once __DIR__ . '/prepend.inc';

View File

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

View File

@@ -1,4 +1,5 @@
<?php
(function ($uri): void {
// Special redirect cases not able to be captured in error.php
$shortcuts = [

View File

@@ -1,4 +1,5 @@
<?php
$_GET["lang"] = "en";
if (!isset($_GET["lang"])) {
header("Location: http://php.net");

View File

@@ -1,4 +1,5 @@
<?php
$_SERVER['BASE_PAGE'] = 'manual-lookup.php';
include __DIR__ . '/include/prepend.inc';
include __DIR__ . '/include/manual-lookup.inc';

View File

@@ -1,4 +1,5 @@
<?php
include_once __DIR__ . '/../include/prepend.inc';
$page = isset($_GET['page']) ? htmlspecialchars($_GET['page'], ENT_QUOTES, 'UTF-8') : '';

View File

@@ -1,3 +1,4 @@
<?php
include_once __DIR__ . '/../include/prepend.inc';
mirror_redirect("/manual/$LANG/index.php");

View File

@@ -1,4 +1,5 @@
<?php
// simple and stupid SPAM protection (using little challenges)
const NUMS = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine'];

View File

@@ -1,4 +1,5 @@
<?php
// Define $MYSITE and $LAST_UPDATED variables
include_once __DIR__ . '/include/prepend.inc';

View File

@@ -1,4 +1,5 @@
<?php
include_once __DIR__ . '/include/prepend.inc';
header("HTTP/1.1 301 Moved Permanently");

View File

@@ -1,4 +1,5 @@
<?php
// Simulate a /pear shortcut call (which will lead to a manual page)
$_SERVER['REQUEST_URI'] = '/pear';
include_once __DIR__ . '/../include/prepend.inc';

View File

@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
namespace releases\php80;

View File

@@ -1,4 +1,5 @@
<?php
$_SERVER['BASE_PAGE'] = 'releases/8.0/index.php';
include __DIR__ . '/../../include/site.inc';

View File

@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
namespace releases\php81;

View File

@@ -1,4 +1,5 @@
<?php
$_SERVER['BASE_PAGE'] = 'releases/8.1/index.php';
include __DIR__ . '/../../include/site.inc';

View File

@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
namespace releases\php82;

View File

@@ -1,4 +1,5 @@
<?php
$_SERVER['BASE_PAGE'] = 'releases/8.2/index.php';
include __DIR__ . '/../../include/site.inc';

View File

@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php
declare(strict_types=1);
namespace releases\php83;

View File

@@ -1,4 +1,5 @@
<?php
$_SERVER['BASE_PAGE'] = 'releases/8.3/index.php';
include __DIR__ . '/../../include/site.inc';

View File

@@ -1,4 +1,5 @@
<?php
$_SERVER['BASE_PAGE'] = 'releases/active.php';
include_once __DIR__ . '/../include/prepend.inc';

View File

@@ -1,4 +1,5 @@
<?php
header("Content-Type: application/atom+xml");
include __DIR__ . "/../include/version.inc";

View File

@@ -1,4 +1,5 @@
<?php
$_SERVER['BASE_PAGE'] = 'releases/index.php';
include_once __DIR__ . '/../include/prepend.inc';
include_once __DIR__ . "/../include/branches.inc";

View File

@@ -1,4 +1,5 @@
<?php
$_SERVER['BASE_PAGE'] = 'releases/active.php';
include_once __DIR__ . '/../include/prepend.inc';

View File

@@ -1,4 +1,5 @@
<?php
$_SERVER['BASE_PAGE'] = 'results.php';
include __DIR__ . '/include/prepend.inc';
include __DIR__ . '/include/results.inc';

View File

@@ -1,4 +1,5 @@
<?php
$_SERVER['BASE_PAGE'] = 'search.php';
include_once __DIR__ . '/include/prepend.inc';

View File

@@ -1,4 +1,5 @@
<?php
// Simulate a /styles shortcut call (which will lead to a manual page)
$_SERVER['REQUEST_URI'] = '/styles';
include_once __DIR__ . '/../include/prepend.inc';