Run Rector on your code to see what it can do for you:
class Banana { public function example(mixed $value): bool { - if (is_array($value) && empty(array_filter($value))) { + if (array_filter($value) === []) { return true; }
Applied Rules:
Not a change you expect?
rector.php