| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 55 | 2 | public function register() |
|
| 56 | { |
||
| 57 | 2 | $renderer = $this->exceptionRenderer->getRun(); |
|
| 58 | |||
| 59 | 2 | if ($this->getIsCli()) { |
|
| 60 | 1 | $renderer->pushHandler(new \Whoops\Handler\PlainTextHandler($this->logger)); |
|
|
|
|||
| 61 | } else { |
||
| 62 | 1 | $renderer->pushHandler(new \Whoops\Handler\PrettyPageHandler()); |
|
| 63 | } |
||
| 64 | |||
| 65 | 2 | $renderer->register(); |
|
| 66 | 2 | } |
|
| 67 | } |
||
| 68 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: