Conditions | 5 |
Paths | 5 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 12 |
CRAP Score | 5 |
Changes | 2 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
60 | 2 | public function handle(Update $update) |
|
61 | { |
||
62 | 2 | foreach ($this->events as $event) { |
|
63 | /* @var \TelegramBot\Api\Events\Event $event */ |
||
64 | 2 | if ($event->executeChecker($update) === true) { |
|
65 | 2 | if (false === $event->executeAction($update)) { |
|
66 | 1 | if (!is_null($this->tracker)) { |
|
67 | 1 | $checker = new ReflectionFunction($event->getChecker()); |
|
68 | 1 | $this->tracker->track($update->getMessage(), $checker->getStaticVariables()['name']); |
|
69 | 1 | } |
|
70 | 1 | break; |
|
71 | } |
||
72 | 1 | } |
|
73 | 2 | } |
|
74 | 2 | } |
|
75 | } |
||
76 |