Conditions | 5 |
Paths | 10 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
18 | public function writeReplace($messages, bool $endline = false, int $type = self::OUTPUT_NORMAL): void |
||
19 | { |
||
20 | if (!is_array($messages)) { |
||
21 | $messages = [$messages]; |
||
22 | } |
||
23 | |||
24 | if ($endline) { |
||
25 | foreach ($messages as $k => $text) { |
||
26 | $messages[$k] = $text.PHP_EOL; |
||
27 | } |
||
28 | } |
||
29 | |||
30 | foreach ($messages as $k => $text) { |
||
31 | $messages[$k] = "\r\033[K".$text; |
||
32 | } |
||
33 | |||
34 | parent::write($messages, false, $type); |
||
|
|||
35 | } |
||
36 | } |
||
37 |
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.