| 1 | <?php |
||
| 19 | class PropertyOutput extends Output |
||
| 20 | { |
||
| 21 | /** @var string */ |
||
| 22 | private $message = ''; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param null $decorated |
||
| 26 | */ |
||
| 27 | 2 | public function __construct( |
|
| 38 | |||
| 39 | // phpcs:disable SlevomatCodingStandard.TypeHints.ReturnTypeHint |
||
| 40 | 2 | protected function doWrite(string $message, bool $newline) |
|
| 41 | { |
||
| 42 | // phpcs:enable SlevomatCodingStandard.TypeHints.ReturnTypeHint |
||
| 43 | 2 | $this->message .= $message . ($newline === false ? '' : PHP_EOL); |
|
| 44 | 2 | } |
|
| 45 | |||
| 46 | /** |
||
| 47 | * @return mixed |
||
| 48 | */ |
||
| 49 | 2 | public function getMessage() |
|
| 53 | |||
| 54 | 2 | protected function hasColorSupport() : bool |
|
| 62 | } |
||
| 63 |
This check looks at variables that have been passed in as parameters and are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.