From 3f92052e67efc0c28390e0eb5ba45af2c010a5d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Wed, 6 Dec 2023 15:13:06 +0100 Subject: [PATCH 1/2] Enhancement: Enable no_mixed_echo_print fixer --- .php-cs-fixer.php | 1 + 1 file changed, 1 insertion(+) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 812462b6fa..41f47c9379 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -38,6 +38,7 @@ 'line_ending' => true, 'new_with_parentheses' => true, 'no_extra_blank_lines' => true, + 'no_mixed_echo_print' => true, 'no_trailing_whitespace' => true, 'ordered_class_elements' => true, 'random_api_migration' => true, From 9bbb49f8da5bb3c77d1486e8efa80e01e279523e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Wed, 6 Dec 2023 15:14:31 +0100 Subject: [PATCH 2/2] Fix: Run 'make coding-standards' --- git-php.php | 2 +- images/elephpants.php | 6 +++--- include/footer.inc | 8 ++++---- include/header.inc | 2 +- manual/add-note.php | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/git-php.php b/git-php.php index 36982695d6..3654954729 100644 --- a/git-php.php +++ b/git-php.php @@ -159,7 +159,7 @@ else { if (count($_POST)) { - print <<

We could not have said it more clearly. Read everything on diff --git a/images/elephpants.php b/images/elephpants.php index 3093973711..ad54ece367 100644 --- a/images/elephpants.php +++ b/images/elephpants.php @@ -38,7 +38,7 @@ $count = min((int) $_REQUEST['count'], 50); } else { header('HTTP/1.1 400', true, 400); - print json_encode([ + echo json_encode([ 'error' => "Specify how many elephpants to serve via 'count'." ]); exit; @@ -52,7 +52,7 @@ // if no photo data, respond with an error. if (!$photos || !is_array($photos)) { header('HTTP/1.1 500', true, 500); - print json_encode([ + echo json_encode([ 'error' => "No elephpant metadata available." ]); exit; @@ -83,4 +83,4 @@ ]; } -print json_encode($elephpants); +echo json_encode($elephpants); diff --git a/include/footer.inc b/include/footer.inc index 1f89efa307..6386a9aa24 100644 --- a/include/footer.inc +++ b/include/footer.inc @@ -1,9 +1,9 @@ "; - print $config['spanning-content']; - print ""; + echo "

"; + echo $config['spanning-content']; + echo "
"; } ?> @@ -80,7 +80,7 @@ // if elephpants enabled, insert placeholder nodes // to be populated with images via javascript. if (isset($config['elephpants']) && $config['elephpants']) { - print "
"; + echo "
"; } ?> diff --git a/include/header.inc b/include/header.inc index 0ad3050053..26a13846f0 100644 --- a/include/header.inc +++ b/include/header.inc @@ -92,7 +92,7 @@ if (!isset($config["languages"])) { - +