| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2.032 |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | 4 | public function createMessage($message, array $context) |
|
| 27 | { |
||
| 28 | 4 | $this->context = $context; |
|
| 29 | |||
| 30 | 4 | list($date, $time) = explode(';', strftime('%d-%m-%Y;%H:%M:%S', time())); |
|
| 31 | |||
| 32 | 4 | $this->message['date'] = $date; |
|
| 33 | 4 | $this->message['time'] = $time; |
|
| 34 | |||
| 35 | 4 | if (method_exists($message, '__toString')) { |
|
| 36 | $message = (string)$message; |
||
| 37 | } |
||
| 38 | |||
| 39 | 4 | $this->message['data'] = $message; |
|
| 40 | |||
| 41 | 4 | return $this; |
|
| 42 | } |
||
| 55 |
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..