@@ -55,35 +55,35 @@ |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | |
58 | - /** |
|
59 | - * @param ProofRequest $proofRequest |
|
60 | - * @param LifecycleEventArgs $event |
|
61 | - * @throws ORMException |
|
62 | - * @throws OptimisticLockException |
|
63 | - */ |
|
58 | + /** |
|
59 | + * @param ProofRequest $proofRequest |
|
60 | + * @param LifecycleEventArgs $event |
|
61 | + * @throws ORMException |
|
62 | + * @throws OptimisticLockException |
|
63 | + */ |
|
64 | 64 | public function postUpdate(ProofRequest $proofRequest, LifecycleEventArgs $event): void |
65 | 65 | { |
66 | 66 | $em = $event->getObjectManager(); |
67 | 67 | |
68 | 68 | $setPlayerResponding = false; |
69 | 69 | if (array_key_exists('status', $this->changeSet)) { |
70 | - $event = new ProofRequestEvent($proofRequest); |
|
71 | - if ($this->changeSet['status'][0] === ProofRequestStatus::STATUS_IN_PROGRESS && $this->changeSet['status'][1] === ProofRequestStatus::STATUS_ACCEPTED) { |
|
72 | - $proofRequest->getPlayerChart()->setStatus( |
|
70 | + $event = new ProofRequestEvent($proofRequest); |
|
71 | + if ($this->changeSet['status'][0] === ProofRequestStatus::STATUS_IN_PROGRESS && $this->changeSet['status'][1] === ProofRequestStatus::STATUS_ACCEPTED) { |
|
72 | + $proofRequest->getPlayerChart()->setStatus( |
|
73 | 73 | $em->getReference(PlayerChartStatus::class, PlayerChartStatus::ID_STATUS_INVESTIGATION) |
74 | - ); |
|
74 | + ); |
|
75 | 75 | |
76 | - $setPlayerResponding = true; |
|
77 | - $this->eventDispatcher->dispatch($event, VideoGamesRecordsCoreEvents::PROOF_REQUEST_ACCEPTED); |
|
78 | - } |
|
79 | - if ($this->changeSet['status'][0] === ProofRequestStatus::STATUS_IN_PROGRESS && $this->changeSet['status'][1] === ProofRequestStatus::STATUS_REFUSED) { |
|
80 | - $proofRequest->getPlayerChart()->setStatus( |
|
76 | + $setPlayerResponding = true; |
|
77 | + $this->eventDispatcher->dispatch($event, VideoGamesRecordsCoreEvents::PROOF_REQUEST_ACCEPTED); |
|
78 | + } |
|
79 | + if ($this->changeSet['status'][0] === ProofRequestStatus::STATUS_IN_PROGRESS && $this->changeSet['status'][1] === ProofRequestStatus::STATUS_REFUSED) { |
|
80 | + $proofRequest->getPlayerChart()->setStatus( |
|
81 | 81 | $em->getReference(PlayerChartStatus::class, PlayerChartStatus::ID_STATUS_NORMAL) |
82 | - ); |
|
82 | + ); |
|
83 | 83 | |
84 | - $setPlayerResponding = true; |
|
85 | - $this->eventDispatcher->dispatch($event, VideoGamesRecordsCoreEvents::PROOF_REQUEST_REFUSED); |
|
86 | - } |
|
84 | + $setPlayerResponding = true; |
|
85 | + $this->eventDispatcher->dispatch($event, VideoGamesRecordsCoreEvents::PROOF_REQUEST_REFUSED); |
|
86 | + } |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | if ($setPlayerResponding) { |