@@ -23,7 +23,7 @@ |
||
| 23 | 23 | public function onUserRenamed(UserRenamedPostsIEvent $event): void |
| 24 | 24 | { |
| 25 | 25 | $this->transactionFactory |
| 26 | - ->createTransaction(function () use ($event) { |
|
| 26 | + ->createTransaction(function() use ($event) { |
|
| 27 | 27 | $this->securityEventsHandlingRepository->updateUserName( |
| 28 | 28 | new UpdatedPostsUserNameDto( |
| 29 | 29 | $event->getOldLogin(), |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | { |
| 32 | 32 | $this->postValidator->preHandleCommentCreated($event); |
| 33 | 33 | $this->transactionFactory |
| 34 | - ->createTransaction(function () use ($event) { |
|
| 34 | + ->createTransaction(function() use ($event) { |
|
| 35 | 35 | $this->commentsEventHandlingRepository->updateAllComments( |
| 36 | 36 | new UpdatePostCommentsDto( |
| 37 | 37 | $event->getPostId(), |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | { |
| 47 | 47 | $this->postValidator->preHandleCommentsBaselined($event); |
| 48 | 48 | $this->transactionFactory |
| 49 | - ->createTransaction(function () use ($event) { |
|
| 49 | + ->createTransaction(function() use ($event) { |
|
| 50 | 50 | $this->commentsEventHandlingRepository->updateAllComments( |
| 51 | 51 | new UpdatePostCommentsDto( |
| 52 | 52 | $event->getPostId(), |
@@ -105,7 +105,7 @@ |
||
| 105 | 105 | */ |
| 106 | 106 | private function validatePostTags(array $tags): void |
| 107 | 107 | { |
| 108 | - if (count(Collection::from($tags)->filter(function ($tag) { |
|
| 108 | + if (count(Collection::from($tags)->filter(function($tag) { |
|
| 109 | 109 | return trim($tag) == ''; |
| 110 | 110 | })->toArray()) > 0) { |
| 111 | 111 | throw new BadRequestHttpException("Post Tags cannot be blank"); |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | return new Page(Collection::from( |
| 35 | 35 | $page->getData() |
| 36 | 36 | ) |
| 37 | - ->map(function ($postHeader) { |
|
| 37 | + ->map(function($postHeader) { |
|
| 38 | 38 | return $this->toHeaderResponse($postHeader); |
| 39 | 39 | }) |
| 40 | 40 | ->toArray(), |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | */ |
| 80 | 80 | private function toSinglePostResponse(?PostDto $post): ?FindPostQueryResponse |
| 81 | 81 | { |
| 82 | - if($post == null) { |
|
| 82 | + if ($post == null) { |
|
| 83 | 83 | return null; |
| 84 | 84 | } |
| 85 | 85 | return new FindPostQueryResponse( |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | |
| 43 | 43 | $from = $input->getArgument("from"); |
| 44 | 44 | if ($from != null) { |
| 45 | - $this->from = \DateTime::createFromFormat("Y-m-d H:i:s", $from . "00:00:00"); |
|
| 45 | + $this->from = \DateTime::createFromFormat("Y-m-d H:i:s", $from."00:00:00"); |
|
| 46 | 46 | } |
| 47 | 47 | $this->postsApi->baseline($this); |
| 48 | 48 | if ($from != null) { |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | */ |
| 76 | 76 | public function getUserIdentifier(): string |
| 77 | 77 | { |
| 78 | - return (string)$this->email; |
|
| 78 | + return (string) $this->email; |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | /** |
@@ -34,6 +34,6 @@ |
||
| 34 | 34 | if ($user instanceof User) { |
| 35 | 35 | return new LoggedInUser($user->getId(), $user->getUserIdentifier(), $user->getRoles()); |
| 36 | 36 | } |
| 37 | - throw new \RuntimeException("Unsupported User Class: " . $user::class); |
|
| 37 | + throw new \RuntimeException("Unsupported User Class: ".$user::class); |
|
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | 40 | \ No newline at end of file |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | $this->validator->preCreateUser($command); |
| 40 | 40 | $newUser = $this->fromCommand($command); |
| 41 | 41 | $id = $this->transactionFactory |
| 42 | - ->createTransaction(function () use ($newUser) { |
|
| 42 | + ->createTransaction(function() use ($newUser) { |
|
| 43 | 43 | return $this->creationRepository->createUser($newUser); |
| 44 | 44 | }) |
| 45 | 45 | ->execute(); |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | $violations = $this->validator->validate($command); |
| 24 | 24 | if ($violations->count() > 0) { |
| 25 | 25 | throw new \InvalidArgumentException( |
| 26 | - sprintf("Invalid Arguments for new User: %s", (string)$violations) |
|
| 26 | + sprintf("Invalid Arguments for new User: %s", (string) $violations) |
|
| 27 | 27 | ); |
| 28 | 28 | } |
| 29 | 29 | } |
@@ -34,7 +34,7 @@ discard block |
||
| 34 | 34 | $violations = $this->validator->validate($command); |
| 35 | 35 | if ($violations->count() > 0) { |
| 36 | 36 | throw new \InvalidArgumentException( |
| 37 | - sprintf("Invalid Arguments for renaming a User: %s", (string)$violations) |
|
| 37 | + sprintf("Invalid Arguments for renaming a User: %s", (string) $violations) |
|
| 38 | 38 | ); |
| 39 | 39 | } |
| 40 | 40 | } |