The expression return $this->rules could return the type null which is incompatible with the type-hinted return array. Consider adding an additional type-check to rule them out.
Loading history...
41
}
42
43
/**
44
* @return array<RuleInterface[]>
45
*/
46
14
private function parseRules(): array
47
{
48
14
$rules = [];
49
50
14
$reflection = is_object($this->source)
51
5
? new ReflectionObject($this->source)
52
9
: new ReflectionClass($this->source);
53
14
foreach ($reflection->getProperties($this->propertyVisibility) as $property) {