Conditions | 4 |
Paths | 3 |
Total Lines | 16 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
32 | public function handle(DomainEvent $event): void |
||
33 | { |
||
34 | if( |
||
|
|||
35 | $event instanceof UnitMovedIntoPlay || |
||
36 | $event instanceof SpellVanishedToTheVoid |
||
37 | ) { |
||
38 | $this->cardsInHand->played( |
||
39 | (string) $event->card(), |
||
40 | $event->match(), |
||
41 | $event->player() |
||
42 | ); |
||
43 | } else if ($event instanceof CardWasDrawn) { |
||
44 | $this->cardsInHand->draw( |
||
45 | $event->match(), |
||
46 | $event->player(), |
||
47 | $this->cards->ofType($event->card()) |
||
48 | ); |
||
52 |