Issue
When the return type of the value method is self, PHPStan gives this error:
for this code snippet that inherit your value method.
public function value($value): static
{
if (empty($value)) {
$value = [];
}
return parent::value($value);
}
PHPStan works correctly only when you change the return type from self to static, as I suggested in my PR. So, you need to change to static if you want the method to be compatible with subclasses.
Issue When the return type of the value method is self, PHPStan gives this error:
for this code snippet that inherit your value method.
PHPStan works correctly only when you change the return type from self to static, as I suggested in my PR. So, you need to change to static if you want the method to be compatible with subclasses.