@@ -66,27 +66,27 @@ |
||
66 | 66 | $event = new ProofRequestEvent($proofRequest); |
67 | 67 | |
68 | 68 | if ($this->isAccepted()) { |
69 | - $proofRequest->getPlayerChart()->setStatus( |
|
69 | + $proofRequest->getPlayerChart()->setStatus( |
|
70 | 70 | $em->getReference(PlayerChartStatus::class, PlayerChartStatus::ID_STATUS_INVESTIGATION) |
71 | - ); |
|
71 | + ); |
|
72 | 72 | |
73 | - $proofRequest->setPlayerResponding($this->userProvider->getPlayer()); |
|
74 | - $proofRequest->setDateAcceptance(new DateTime()); |
|
75 | - $this->eventDispatcher->dispatch($event, VideoGamesRecordsCoreEvents::PROOF_REQUEST_ACCEPTED); |
|
73 | + $proofRequest->setPlayerResponding($this->userProvider->getPlayer()); |
|
74 | + $proofRequest->setDateAcceptance(new DateTime()); |
|
75 | + $this->eventDispatcher->dispatch($event, VideoGamesRecordsCoreEvents::PROOF_REQUEST_ACCEPTED); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | if ($this->isRefused()) { |
79 | - $proofRequest->getPlayerChart()->setStatus( |
|
79 | + $proofRequest->getPlayerChart()->setStatus( |
|
80 | 80 | $em->getReference(PlayerChartStatus::class, PlayerChartStatus::ID_STATUS_NORMAL) |
81 | - ); |
|
81 | + ); |
|
82 | 82 | |
83 | - $proofRequest->setPlayerResponding($this->userProvider->getPlayer()); |
|
84 | - $proofRequest->setDateAcceptance(new DateTime()); |
|
85 | - $this->eventDispatcher->dispatch($event, VideoGamesRecordsCoreEvents::PROOF_REQUEST_REFUSED); |
|
83 | + $proofRequest->setPlayerResponding($this->userProvider->getPlayer()); |
|
84 | + $proofRequest->setDateAcceptance(new DateTime()); |
|
85 | + $this->eventDispatcher->dispatch($event, VideoGamesRecordsCoreEvents::PROOF_REQUEST_REFUSED); |
|
86 | 86 | } |
87 | 87 | } |
88 | 88 | |
89 | - private function isAccepted(): bool |
|
89 | + private function isAccepted(): bool |
|
90 | 90 | { |
91 | 91 | return array_key_exists('status', $this->changeSet) |
92 | 92 | && $this->changeSet['status'][0] === ProofRequestStatus::STATUS_IN_PROGRESS |