1 | <?php declare(strict_types=1); |
||
27 | class LinkWithAliases extends Link implements LinkWithAliasesInterface |
||
28 | { |
||
29 | /** |
||
30 | * @var array |
||
31 | */ |
||
32 | private $aliases; |
||
33 | |||
34 | /** |
||
35 | * @var bool |
||
36 | */ |
||
37 | private $hasAliases; |
||
38 | |||
39 | /** |
||
40 | * @param bool $isSubUrl |
||
41 | * @param string $value |
||
42 | * @param iterable $aliases |
||
43 | * @param bool $hasMeta |
||
44 | * @param null $meta |
||
45 | */ |
||
46 | 5 | public function __construct(bool $isSubUrl, string $value, iterable $aliases, bool $hasMeta, $meta = null) |
|
60 | |||
61 | /** |
||
62 | * @inheritdoc |
||
63 | */ |
||
64 | 5 | public function canBeShownAsString(): bool |
|
68 | |||
69 | /** |
||
70 | * @inheritdoc |
||
71 | */ |
||
72 | 5 | public function getArrayRepresentation(string $prefix): array |
|
84 | |||
85 | /** |
||
86 | * @return bool |
||
87 | */ |
||
88 | 5 | private function hasAliases(): bool |
|
92 | |||
93 | /** |
||
94 | * Get aliases. |
||
95 | * |
||
96 | * @return array |
||
97 | */ |
||
98 | 5 | private function getAliases(): array |
|
102 | } |
||
103 |
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.