From 11ed748a44435434a35ade2f6992a6697bc79759 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Thu, 7 Dec 2023 12:28:35 +0100 Subject: [PATCH 1/2] Enhancement: Enable is_null fixer --- .php-cs-fixer.php | 1 + 1 file changed, 1 insertion(+) diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 78ffda6407..01bfc271df 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -35,6 +35,7 @@ 'style' => 'post', ], 'indentation_type' => true, + 'is_null' => true, 'line_ending' => true, 'new_with_parentheses' => true, 'no_extra_blank_lines' => true, From 7fbfac538856134b2467f522120841b79a6d10b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=B6ller?= Date: Thu, 7 Dec 2023 12:29:25 +0100 Subject: [PATCH 2/2] Fix: Run 'make coding-standards' --- include/layout.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/layout.inc b/include/layout.inc index 44fb31ddfa..356e009cc0 100644 --- a/include/layout.inc +++ b/include/layout.inc @@ -379,7 +379,7 @@ function print_news($news, $dog, $max = 5, $onlyyear = null, $return = false) { // Only print entries in the provided s/dog/cat/ egory // If $dog is null, everything matches foreach ($item["category"] as $category) { - if (is_null($dog) || in_array($category["term"], (array)$dog, true)) { + if (null === $dog || in_array($category["term"], (array)$dog, true)) { $ok = true; $count++; break;