Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
19 | public static function fromReflectionWithoutBodyAndDocBlock(MethodReflection $reflectionMethod) : self |
||
20 | { |
||
21 | 19 | /** @var static $method */ |
|
22 | $method = parent::copyMethodSignature($reflectionMethod); |
||
|
|||
23 | |||
24 | 19 | $method->setInterface(false); |
|
25 | $method->setBody(''); |
||
26 | 19 | ||
27 | 19 | return $method; |
|
28 | } |
||
29 | 19 | ||
46 |
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.