1 | <?php |
||
8 | class ValueObjectDefinition extends BaseReflectionClass |
||
9 | { |
||
10 | /** @var array */ |
||
11 | protected $uses = []; |
||
12 | |||
13 | /** @var \Spatie\ValueObject\ValueObject */ |
||
14 | protected $valueObject; |
||
15 | |||
16 | public function __construct(ValueObject $valueObject) |
||
24 | |||
25 | protected function resolveUseStatements() |
||
51 | |||
52 | public function hasAlias(string $alias): bool |
||
53 | { |
||
54 | return isset($this->uses[$alias]); |
||
55 | } |
||
56 | |||
57 | public function resolveAlias(string $alias): string |
||
58 | { |
||
59 | return $this->uses[$alias]; |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * @return \Spatie\ValueObject\ValueObjectProperty[] |
||
64 | */ |
||
65 | public function getValueObjectProperties(): array |
||
79 | } |
||
80 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.