| Conditions | 4 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 35 | public function handle(DomainEvent $event): void |
||
| 36 | { |
||
| 37 | if ( |
||
| 38 | $event instanceof UnitMovedIntoPlay || |
||
| 39 | $event instanceof SpellVanishedToTheVoid |
||
| 40 | ) { |
||
| 41 | $this->cardsInHand->played( |
||
| 42 | $event->offset(), |
||
| 43 | $event->match(), |
||
| 44 | $event->player() |
||
| 45 | ); |
||
| 46 | } else if ($event instanceof CardWasDrawn) { |
||
| 47 | $this->cardsInHand->draw( |
||
| 48 | $event->match(), |
||
| 49 | $event->player(), |
||
| 50 | new Card( |
||
| 51 | $event->offset(), |
||
| 52 | $this->cardTemplates->ofType($event->card()) |
||
| 53 | ) |
||
| 58 |