Conditions | 4 |
Paths | 6 |
Total Lines | 17 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 4 |
Changes | 0 |
1 | <?php |
||
39 | 5 | public function invokeEvent( |
|
40 | Event $event, |
||
41 | RequestExecutorInterface $executor, |
||
42 | SocketInterface $socket, |
||
43 | ExecutionContext $context |
||
44 | ) { |
||
45 | 5 | if ($this->handler) { |
|
46 | 4 | $this->handler->invokeEvent($event, $executor, $socket, $context); |
|
47 | 4 | } |
|
48 | |||
49 | 5 | if ($event->getType() === EventType::FINALIZE) { |
|
50 | 4 | $bag = $event->getExecutor()->socketBag(); |
|
51 | 4 | if ($bag->hasSocket($socket)) { |
|
52 | 1 | $bag->removeSocket($socket); |
|
53 | 1 | } |
|
54 | 4 | } |
|
55 | 5 | } |
|
56 | } |
||
57 |