1 | <?php |
||
22 | class RuleResolver extends BaseRules implements ResolverInterface |
||
23 | { |
||
24 | /** |
||
25 | * @var array |
||
26 | */ |
||
27 | private $ruleTokens = []; |
||
28 | |||
29 | /** |
||
30 | * @var string|null |
||
31 | */ |
||
32 | private $current; |
||
33 | |||
34 | /** |
||
35 | * @var array |
||
36 | */ |
||
37 | private $keep = []; |
||
38 | |||
39 | /** |
||
40 | * @var TokenResolver |
||
41 | */ |
||
42 | private $tokens; |
||
43 | |||
44 | /** |
||
45 | * RuleResolver constructor. |
||
46 | * @param TokenResolver $tokens |
||
47 | */ |
||
48 | public function __construct(TokenResolver $tokens) |
||
52 | |||
53 | /** |
||
54 | * @param Readable $readable |
||
55 | * @param TokenInterface $token |
||
56 | * @throws \Railt\Io\Exception\ExternalFileException |
||
57 | */ |
||
58 | public function resolve(Readable $readable, TokenInterface $token): void |
||
72 | |||
73 | /** |
||
74 | * @param Readable $readable |
||
75 | * @param TokenInterface $token |
||
76 | * @return bool |
||
77 | * @throws \Railt\Io\Exception\ExternalFileException |
||
78 | */ |
||
79 | private function next(Readable $readable, TokenInterface $token): bool |
||
93 | |||
94 | /** |
||
95 | * @param Readable $readable |
||
96 | * @param TokenInterface $token |
||
97 | * @throws \Railt\Io\Exception\ExternalFileException |
||
98 | */ |
||
99 | private function resolveCurrent(Readable $readable, TokenInterface $token): void |
||
115 | |||
116 | /** |
||
117 | * @return array|Symbol[] |
||
118 | */ |
||
119 | private function analyze(): array |
||
131 | |||
132 | /** |
||
133 | * @return array |
||
134 | */ |
||
135 | public function all(): array |
||
143 | } |
||
144 |
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.