Skip to content

Enhancement: Enable is_null fixer #879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
'style' => 'post',
],
'indentation_type' => true,
'is_null' => true,
'line_ending' => true,
'new_with_parentheses' => true,
'no_extra_blank_lines' => true,
Expand Down
2 changes: 1 addition & 1 deletion include/layout.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐢

$ok = true;
$count++;
break;
Expand Down