| Total Complexity | 6 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 13 | final class HandAdjuster implements EventHandler |
||
| 14 | { |
||
| 15 | private $cardsInHand; |
||
| 16 | private $cardTemplates; |
||
| 17 | |||
| 18 | public function __construct( |
||
| 19 | CardsInHand $cardsInHand, |
||
| 20 | CardTemplates $cardTemplates |
||
| 21 | ) { |
||
| 22 | $this->cardsInHand = $cardsInHand; |
||
| 23 | $this->cardTemplates = $cardTemplates; |
||
| 24 | } |
||
| 25 | |||
| 26 | public function events(): iterable |
||
| 27 | { |
||
| 28 | return [ |
||
| 29 | UnitMovedIntoPlay::class, |
||
| 30 | SpellVanishedToTheVoid::class, |
||
| 31 | CardWasDrawn::class, |
||
| 32 | ]; |
||
| 33 | } |
||
| 34 | |||
| 35 | public function handle(DomainEvent $event): void |
||
| 53 | ) |
||
| 54 | ); |
||
| 55 | } |
||
| 58 |