| Conditions | 6 |
| Paths | 8 |
| Total Lines | 19 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | public function handle(array $record) |
||
| 26 | { |
||
| 27 | if ($this->processors) { |
||
|
|
|||
| 28 | foreach ($this->processors as $processor) { |
||
| 29 | $record = call_user_func($processor, $record); |
||
| 30 | } |
||
| 31 | } |
||
| 32 | |||
| 33 | foreach ($this->handlers as $handler) { |
||
| 34 | try { |
||
| 35 | $handler->handle($record); |
||
| 36 | } catch (\Exception $e) { |
||
| 37 | // What failure? |
||
| 38 | } catch (\Throwable $e) { |
||
| 39 | // What failure? |
||
| 40 | } |
||
| 41 | } |
||
| 42 | |||
| 43 | return false === $this->bubble; |
||
| 44 | } |
||
| 62 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)or! empty(...)instead.