| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | public function __construct(SlickEvent $event, ?iterable $context = []) |
||
| 34 | { |
||
| 35 | $this->message = $this->parseEventName($event); |
||
| 36 | $this->label = Trackable::LABEL_EVENT; |
||
| 37 | $this->context = array_merge($context, [ |
||
|
|
|||
| 38 | 'label' => $this->label, |
||
| 39 | 'occurredOn' => $event->occurredOn()->format(\DateTime::W3C) |
||
| 40 | ]); |
||
| 41 | |||
| 42 | if ($event instanceof JsonSerializable) { |
||
| 43 | $this->context['data'] = json_encode($event); |
||
| 44 | } |
||
| 60 |