| Total Complexity | 5 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class NpcTick implements EventStrategyInterface |
||
| 19 | { |
||
| 20 | public function __construct( |
||
| 21 | private UserRepositoryInterface $userRepository, |
||
| 22 | private JsonMapperInterface $jsonMapper, |
||
| 23 | private NpcShipHandling $npcShipHandling |
||
| 24 | ) { |
||
| 25 | } |
||
| 26 | |||
| 27 | public function getEntitiesToLock(EventInterface $event): Collection |
||
| 28 | { |
||
| 29 | return new ArrayCollection([$this->getUser($event)]); |
||
| 30 | } |
||
| 31 | |||
| 32 | public function processEvent(EventInterface $event): void |
||
| 33 | { |
||
| 34 | $this->npcShipHandling->processUser($this->getUser($event)); |
||
| 35 | } |
||
| 36 | |||
| 37 | private function getUser(EventInterface $event): UserInterface |
||
| 48 | } |
||
| 49 | } |
||
| 50 |