Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
43 | public function onError(ConnectionInterface $connection, Exception $exception) |
||
44 | { |
||
45 | $exceptionClass = get_class($exception); |
||
46 | |||
47 | $message = "Exception `{$exceptionClass}` thrown: `{$exception->getMessage()}`"; |
||
48 | |||
49 | if ($this->verbose) { |
||
50 | $message .= $exception->getTraceAsString(); |
||
51 | } |
||
52 | |||
53 | $this->error($message); |
||
54 | |||
55 | $this->app->onError($connection, $exception); |
||
56 | } |
||
57 | } |
||
58 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.