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

Conversation

localheinz
Copy link
Contributor

@localheinz localheinz commented Dec 7, 2023

This pull request

  • enables the is_null fixer
  • runs make coding-standards

Follows #559.

πŸ’β€β™‚οΈ For reference, see https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/v3.40.2/doc/rules/language_construct/is_null.rst.

@@ -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.

🐢

@derickr derickr merged commit 5542743 into php:master Dec 7, 2023
@localheinz localheinz deleted the feature/is-null branch December 7, 2023 11:48
@localheinz
Copy link
Contributor Author

Thank you, @derickr!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants