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'); } } } };
Applied Rules:
Not a change you expect?
rector.php