Skip to content

Commit

Permalink
Style appears to prefer yoda conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
mstilkerich committed Aug 17, 2022
1 parent 1aee566 commit 63efe38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public function select($name)
return array_filter(
$result,
function ($child) use ($group) {
return $child instanceof Property && ($child->group !== null ? strtoupper($child->group) : '') === $group;
return $child instanceof Property && (null !== $child->group ? strtoupper($child->group) : '') === $group;
}
);
}
Expand All @@ -249,7 +249,7 @@ function ($child) use ($group) {
$result = [];
foreach ($this->children as $childGroup) {
foreach ($childGroup as $child) {
if ($child instanceof Property && ($child->group !== null ? strtoupper($child->group) : '') === $group) {
if ($child instanceof Property && (null !== $child->group ? strtoupper($child->group) : '') === $group) {
$result[] = $child;
}
}
Expand Down

0 comments on commit 63efe38

Please sign in to comment.