Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | public function expectExceptionMessageMatches(string $regularExpression) : void |
||
22 | { |
||
23 | if (is_callable('parent::expectExceptionMessageRegExp')) { |
||
24 | parent::expectExceptionMessageRegExp($regularExpression); |
||
|
|||
25 | |||
26 | return; |
||
27 | } |
||
28 | |||
29 | parent::expectExceptionMessageMatches($regularExpression); |
||
30 | } |
||
31 | } |
||
32 |
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.