<?php declare(strict_types = 1);
class HelloWorld {
public function doStuff(): int {
if (self::getBool()) {
return 1;
}
if (self::getBool()) {
return 2;
}
return 3;
}
/** @phpstan-impure */
private static function getBool(): bool {
return mt_rand(0, 1) === 0;
}
}
No error.