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