| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 2 |
| Changes | 4 | ||
| Bugs | 1 | Features | 2 |
| 1 | <?php |
||
| 29 | 2 | public function reportError(\Exception $exception, \SS_HTTPRequest $request = null) |
|
| 30 | { |
||
| 31 | 2 | if (!$this->envReporter->isLive()) { |
|
| 32 | 1 | Debug::showError( |
|
| 33 | 1 | $exception->getCode(), |
|
| 34 | 1 | $exception->getMessage(), |
|
|
|
|||
| 35 | 1 | $exception->getFile(), |
|
| 36 | 1 | $exception->getLine(), |
|
| 37 | 1 | false, |
|
| 38 | 'Error' |
||
| 39 | 1 | ); |
|
| 40 | 1 | } else { |
|
| 41 | 1 | Debug::friendlyError(); |
|
| 42 | } |
||
| 43 | 2 | } |
|
| 44 | } |
||
| 45 |
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: