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...
39
}
40
41
/**
42
* @return array<RuleInterface[]>
43
*/
44
13
private function parseRules(): array
45
{
46
13
$rules = [];
47
48
13
$reflection = is_object($this->source)
49
5
? new ReflectionObject($this->source)
50
8
: new ReflectionClass($this->source);
51
13
foreach ($reflection->getProperties($this->propertyVisibility) as $property) {