diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php
index f9d0db259..35d2266de 100644
--- a/.php-cs-fixer.php
+++ b/.php-cs-fixer.php
@@ -12,6 +12,7 @@ $finder = $config->getFinder()
$config->setRules([
'indentation_type' => true,
'no_trailing_whitespace' => true,
+ 'single_space_after_construct' => true,
'visibility_required' => true,
'whitespace_after_comma_in_array' => true,
]);
diff --git a/archive/index.php b/archive/index.php
index 7b5aab024..7f2b776bb 100644
--- a/archive/index.php
+++ b/archive/index.php
@@ -7,7 +7,7 @@ do {
mirror_redirect("/archive/$y.php");
break;
}
-} while(++$i<3);
+} while (++$i<3);
include_once __DIR__ . '/../include/errors.inc';
error_noservice();
diff --git a/cal.php b/cal.php
index 24794d70e..55599eb7e 100644
--- a/cal.php
+++ b/cal.php
@@ -129,7 +129,7 @@ $bom = mktime(0, 0, 1, $cm, 1, $cy);
$eom = mktime(0, 0, 1, $cm+1, 0, $cy);
// Link to previous month (but do not link to too early dates)
-$prev_link = (function() use ($cm, $cy) {
+$prev_link = (function () use ($cm, $cy) {
$lm = mktime(0, 0, 1, $cm, 0, $cy);
$year = date('Y', $lm);
if (!valid_year($year)) {
@@ -146,7 +146,7 @@ $prev_link = (function() use ($cm, $cy) {
})();
// Link to next month (but do not link to too early dates)
-$next_link = (function() use ($cm, $cy) {
+$next_link = (function () use ($cm, $cy) {
$nm = mktime(0, 0, 1, $cm+1, 1, $cy);
$year = date('Y', $nm);
if (!valid_year($year)) {
diff --git a/conferences/index.php b/conferences/index.php
index de805a194..34ae0ed44 100644
--- a/conferences/index.php
+++ b/conferences/index.php
@@ -13,8 +13,8 @@ site_header("PHP Conferences around the world", array(
$content = "
";
$frontpage = array();
-foreach($NEWS_ENTRIES as $entry) {
- foreach($entry["category"] as $category) {
+foreach ($NEWS_ENTRIES as $entry) {
+ foreach ($entry["category"] as $category) {
if ($category["term"] == "cfp") {
$frontpage[] = $entry;
break;
@@ -28,7 +28,7 @@ foreach($NEWS_ENTRIES as $entry) {
$panels = '
Want to see your conference appear here?
';
-foreach($frontpage as $entry) {
+foreach ($frontpage as $entry) {
$link = preg_replace('~^(http://php.net/|https://www.php.net/)~', '', $entry["id"]);
$id = parse_url($entry["id"], PHP_URL_FRAGMENT);
$date = date_format(date_create($entry["updated"]), 'Y-m-d');
diff --git a/download-docs.php b/download-docs.php
index 0c2e36f47..bdd5d4a24 100644
--- a/download-docs.php
+++ b/download-docs.php
@@ -91,7 +91,7 @@ $filepath = $filename = '';
// Go through all possible manual languages
foreach ($LANGUAGES as $langcode => $language) {
- if(isset($INACTIVE_ONLINE_LANGUAGES[$langcode]) && $MYSITE !== 'http://docs.php.net/') {
+ if (isset($INACTIVE_ONLINE_LANGUAGES[$langcode]) && $MYSITE !== 'http://docs.php.net/') {
continue;
}
diff --git a/error.php b/error.php
index ebf8895b5..8de0b2d59 100644
--- a/error.php
+++ b/error.php
@@ -134,7 +134,7 @@ if (preg_match("!^get/([^/]+)$!", $URI, $what)) {
if (preg_match("!^get/([^/]+)/from/([^/]+)(/mirror)?$!", $URI, $dlinfo)) {
$df = $dlinfo[1];
- if(strpos($df, "7-LATEST") !== false) {
+ if (strpos($df, "7-LATEST") !== false) {
include_once __DIR__ . "/include/version.inc";
[ $latest ] = release_get_latest();
$df = str_replace("7-LATEST", $latest, $df);
@@ -143,7 +143,7 @@ if (preg_match("!^get/([^/]+)/from/([^/]+)(/mirror)?$!", $URI, $dlinfo)) {
$mr = "https://www.php.net/";
// Check if that mirror really exists if not, bail out
- if(!isset($MIRRORS[$mr])) {
+ if (!isset($MIRRORS[$mr])) {
error_nomirror($mr);
exit;
}
diff --git a/git-php.php b/git-php.php
index 2da36b0b9..22ad1b68e 100644
--- a/git-php.php
+++ b/git-php.php
@@ -48,7 +48,7 @@ if (count($_POST) && (!isset($_POST['purpose']) || !is_array($_POST['purpose'])
// Check for errors
if (empty($_POST['id'])) {
$error .= "You must supply a desired Git user id.
";
- } elseif(!preg_match('!^[a-z]\w+$!', $_POST['id']) || strlen($_POST['id']) > 16) {
+ } elseif (!preg_match('!^[a-z]\w+$!', $_POST['id']) || strlen($_POST['id']) > 16) {
$error .= "Your user id must be from 1-16 characters long, start with ".
"a letter and contain nothing but a-z, 0-9, and _
";
}
@@ -398,7 +398,7 @@ foreach ($purposes as $i => $p) { ?>
|