| Conditions | 5 |
| Paths | 5 |
| Total Lines | 22 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 5 |
| Changes | 0 | ||
| 1 | <?php |
||
| 55 | 7 | public function isHandling(array $record) : bool |
|
| 56 | { |
||
| 57 | 7 | if (count($record) == 1) { |
|
| 58 | 1 | return parent::isHandling($record); |
|
| 59 | } |
||
| 60 | |||
| 61 | 6 | if (!parent::isHandling($record)) { |
|
| 62 | 1 | return false; |
|
| 63 | } |
||
| 64 | |||
| 65 | 5 | if (empty($this->channel)) { |
|
| 66 | 2 | return empty($record['context']['channel']); |
|
| 67 | } |
||
| 68 | |||
| 69 | 3 | if (empty($record['context']['channel'])) { |
|
| 70 | 1 | return false; |
|
| 71 | } |
||
| 72 | |||
| 73 | 2 | $supported = $this->channel === $record['context']['channel']; |
|
| 74 | |||
| 75 | 2 | return $supported; |
|
| 76 | } |
||
| 77 | } |
||
| 78 |