| Conditions | 3 |
| Paths | 4 |
| Total Lines | 27 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php namespace Understand\UnderstandLaravel5; |
||
| 40 | public function logEvent($level, $message, $context) |
||
| 41 | { |
||
| 42 | // integer, float, string or boolean as message |
||
| 43 | if (is_scalar($message)) |
||
| 44 | { |
||
| 45 | $log = [ |
||
| 46 | 'message' => $message |
||
| 47 | ]; |
||
| 48 | } |
||
| 49 | else |
||
| 50 | { |
||
| 51 | $log = (array)$message; |
||
| 52 | } |
||
| 53 | |||
| 54 | $log['tags'] = ['laravel_log']; |
||
| 55 | $log['level'] = $level; |
||
| 56 | |||
| 57 | if ($context) |
||
| 58 | { |
||
| 59 | $log['context'] = (array)$context; |
||
| 60 | } |
||
| 61 | |||
| 62 | $additionalFields = $this->getMetaFields(); |
||
| 63 | $customFields = $this->config->get('understand-laravel.events.meta', []); |
||
| 64 | |||
| 65 | $this->logger->log($log, $additionalFields, $customFields); |
||
| 66 | } |
||
| 67 | |||
| 83 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..