From 0aab632c4ab48df8394346964243cc68990d9061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Wed, 6 Dec 2023 15:03:50 +0100 Subject: [PATCH 1/2] Enhancement: Enable function_declaration fixer --- .php-cs-fixer.php | 1 + 1 file changed, 1 insertion(+) 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', ], From 21b440bf0ac08293fa35ef573741ee142bdf4c35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Wed, 6 Dec 2023 15:04:27 +0100 Subject: [PATCH 2/2] Fix: Run 'make coding-standards' --- include/errors.inc | 4 ++-- include/layout.inc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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("%s", $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("%s", htmlspecialchars($url, ENT_QUOTES | ENT_IGNORE), ($target ?: "_new"),