Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
41 | 6 | public function handle(EventInterface $event) |
|
42 | { |
||
43 | 6 | if (! $event instanceof PlayerCreatedEvent) { |
|
44 | 3 | return; |
|
45 | } |
||
46 | |||
47 | 3 | $applicationUser = $this->store->find($event->getExternalReference()); |
|
48 | |||
49 | 3 | $applicationUser->linkToPlayer($event->getGameId(), $event->getPlayerId()); |
|
50 | |||
51 | 3 | $this->store->save($applicationUser); |
|
52 | 3 | } |
|
53 | |||
66 |