IsCountableRector
Changes is_array + Countable check to is_countable
-is_array($foo) || $foo instanceof Countable;
+is_countable($foo);
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\Php73\Rector\BooleanOr\IsCountableRector;
return RectorConfig::configure()
->withRules([
IsCountableRector::class,
]);