| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3.0067 |
| Changes | 0 | ||
| 1 | <?php |
||
| 39 | 7 | public function fireIfMatches(Event $event): void |
|
| 40 | { |
||
| 41 | 7 | if (! isset($this->transitionEventsByWhenAndName[$event->when()])) { |
|
| 42 | return; |
||
| 43 | } |
||
| 44 | |||
| 45 | /** @var TransitionEvent[] $transitionEvents */ |
||
| 46 | 7 | $transitionEvents = $this->transitionEventsByWhenAndName[$event->when()]; |
|
| 47 | |||
| 48 | 7 | foreach ($transitionEvents as $transitionEvent) { |
|
| 49 | 7 | $transitionEvent->fireIfMatches( |
|
| 50 | 7 | $event->when(), |
|
| 51 | 7 | $event->object(), |
|
| 52 | 7 | $event->transition(), |
|
| 53 | 7 | $event->fromState(), |
|
| 54 | 7 | $event->toState() |
|
| 55 | ); |
||
| 59 |