@@ -8,7 +8,7 @@ |
||
| 8 | 8 | |
| 9 | 9 | class VideoCommentListener |
| 10 | 10 | { |
| 11 | - private UserProvider $userProvider; |
|
| 11 | + private UserProvider $userProvider; |
|
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | 14 | * @param UserProvider $userProvider |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | |
| 9 | 9 | class VideoListener |
| 10 | 10 | { |
| 11 | - private UserProvider $userProvider; |
|
| 11 | + private UserProvider $userProvider; |
|
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | 14 | * @param UserProvider $userProvider |
@@ -40,12 +40,12 @@ |
||
| 40 | 40 | */ |
| 41 | 41 | private ?Video $video = null; |
| 42 | 42 | |
| 43 | - /** |
|
| 44 | - * @ORM\ManyToOne(targetEntity="VideoGamesRecords\CoreBundle\Entity\ProofRequest") |
|
| 45 | - * @ORM\JoinColumns({ |
|
| 46 | - * @ORM\JoinColumn(name="idProofRequest", referencedColumnName="id", nullable=true) |
|
| 47 | - * }) |
|
| 48 | - */ |
|
| 43 | + /** |
|
| 44 | + * @ORM\ManyToOne(targetEntity="VideoGamesRecords\CoreBundle\Entity\ProofRequest") |
|
| 45 | + * @ORM\JoinColumns({ |
|
| 46 | + * @ORM\JoinColumn(name="idProofRequest", referencedColumnName="id", nullable=true) |
|
| 47 | + * }) |
|
| 48 | + */ |
|
| 49 | 49 | private ?ProofRequest $proofRequest = null; |
| 50 | 50 | |
| 51 | 51 | /** |
@@ -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 |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | * "pointChart", |
| 61 | 61 | * } |
| 62 | 62 | * ) |
| 63 | - * @ApiFilter( |
|
| 63 | + * @ApiFilter( |
|
| 64 | 64 | * ExistsFilter::class, |
| 65 | 65 | * properties={ |
| 66 | 66 | * "proof", |
@@ -28,8 +28,7 @@ |
||
| 28 | 28 | EntityManagerInterface $em, |
| 29 | 29 | PlayerChartRankingQuery $playerChartRankingQuery, |
| 30 | 30 | EventDispatcherInterface $eventDispatcher |
| 31 | - ) |
|
| 32 | - { |
|
| 31 | + ) { |
|
| 33 | 32 | $this->em = $em; |
| 34 | 33 | $this->playerChartRankingQuery = $playerChartRankingQuery; |
| 35 | 34 | $this->eventDispatcher = $eventDispatcher; |