| Conditions | 4 |
| Paths | 4 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 22 | public function handleBulk(array $events): EventBulkListenerInterface |
||
| 23 | { |
||
| 24 | if ($this->getType() === self::TYPE_SYNC) { |
||
| 25 | throw new NotSupportedTypeException( |
||
| 26 | sprintf('Event listeners that extend from "%s" only support type "%s"', __CLASS__, self::TYPE_ASYNC) |
||
| 27 | ); |
||
| 28 | } |
||
| 29 | |||
| 30 | foreach ($events as $event) { |
||
| 31 | try { |
||
| 32 | $this->doHandle($event); |
||
| 33 | } catch (Throwable $e) { |
||
| 34 | $this->handleError($e, $event); |
||
| 35 | } |
||
| 36 | } |
||
| 37 | |||
| 38 | return $this; |
||
| 39 | } |
||
| 54 |