Author: Andreas Möller (localheinz)
Committer: GitHub (web-flow)
Pusher: kamil-tekiela
Date: 2023-12-06T15:10:28+01:00

Commit: 
https://github.com/php/web-php/commit/08a7beea92b0085648752d13750f9ce1868c035b
Raw diff: 
https://github.com/php/web-php/commit/08a7beea92b0085648752d13750f9ce1868c035b.diff

Enhancement: Enable `function_declaration` fixer (#862)

Changed paths:
  M  .php-cs-fixer.php
  M  include/errors.inc
  M  include/layout.inc


Diff:

diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php
index 2d03dc7008..e615bce41b 100644
--- a/.php-cs-fixer.php
+++ b/.php-cs-fixer.php
@@ -29,6 +29,7 @@
         ],
         'constant_case' => true,
         'elseif' => true,
+        'function_declaration' => true,
         'increment_style' => [
             'style' => 'post',
         ],
diff --git a/include/errors.inc b/include/errors.inc
index ac5d2586d3..c243782238 100644
--- a/include/errors.inc
+++ b/include/errors.inc
@@ -123,7 +123,7 @@ The most commonly searched terms have also been added.
 TODO: Determine if we want to continue 301 -OR- make these official URLs.
 ******************************************************************************/
 
-function is_known_ini (string $ini): ?string {
+function is_known_ini(string $ini): ?string {
     $inis = [
         'engine' => 'apache.configuration.php#ini.engine',
         'short-open-tag' => 'ini.core.php#ini.short-open-tag',
@@ -366,7 +366,7 @@ function is_known_variable(string $variable): ?string {
     return $variables[ltrim($variable, '$')] ?? null;
 }
 
-function is_known_term (string $term): ?string {
+function is_known_term(string $term): ?string {
     $terms = [
         '<>' => 'language.operators.comparison.php',
         '<=>' => 'language.operators.comparison.php',
diff --git a/include/layout.inc b/include/layout.inc
index 03461ab409..e325fe5d7c 100644
--- a/include/layout.inc
+++ b/include/layout.inc
@@ -140,7 +140,7 @@ function make_submit($file, $alt = false, $align = false, 
$extras = false,
 }
 
 // Return a hiperlink to something within the site
-function make_link (string $url, string $linktext = ''): string
+function make_link(string $url, string $linktext = ''): string
 {
     return sprintf("<a href=\"%s\">%s</a>", $url, $linktext ?: $url);
 }
@@ -148,7 +148,7 @@ function make_link (string $url, string $linktext = ''): 
string
 // make_popup_link()
 // return a hyperlink to something, within the site, that pops up a new window
 //
-function make_popup_link ($url, $linktext = false, $target = false, 
$windowprops = "", $extras = false) {
+function make_popup_link($url, $linktext = false, $target = false, 
$windowprops = "", $extras = false) {
     return sprintf("<a href=\"%s\" target=\"%s\" 
onclick=\"window.open('%s','%s','%s');return false;\"%s>%s</a>",
         htmlspecialchars($url, ENT_QUOTES | ENT_IGNORE),
         ($target ?: "_new"),

-- 
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to