Run Rector on your code to see what it can do for you:

     public function getIssue(): void
     {
         foreach (['value_1', 'value_2'] as $value) {
-            if ($this instanceof demoInterface && $this->getExample() === false) {
+            if ($this->getExample() === false) {
                 $this->setExample('demo');
             }
         }
     }
 };
PHP snippet to change

Applied Rules:

Not a change you expect?

Config  rector.php
Rector version: c8c320 - released at 2025-08-06 21:50