Passed
Push — main ( 85cf21...669ea3 )
by Slawomir
12:08 queued 07:21
created
src/Modules/Posts/Domain/Logic/SecurityEventsHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
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(),
Please login to merge, or discard this patch.
src/Modules/Posts/Domain/Logic/CommentsEventsHandler.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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(),
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     /**
28 28
      * @param CommentCreatedPostsIEvent $event
29 29
      */
30
-   public function onCommentCreated(CommentCreatedPostsIEvent $event): void
30
+    public function onCommentCreated(CommentCreatedPostsIEvent $event): void
31 31
     {
32 32
         $this->postValidator->preHandleCommentCreated($event);
33 33
         $this->transactionFactory
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
             ->execute();
43 43
     }
44 44
 
45
-   public function onCommentsBaselined(CommentsBaselinedPostsIEvent $event): void
45
+    public function onCommentsBaselined(CommentsBaselinedPostsIEvent $event): void
46 46
     {
47 47
         $this->postValidator->preHandleCommentsBaselined($event);
48 48
         $this->transactionFactory
Please login to merge, or discard this patch.
src/Modules/Posts/Domain/Logic/PostsValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
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");
Please login to merge, or discard this patch.
src/Modules/Posts/Domain/Logic/PostsFinder.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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(
Please login to merge, or discard this patch.
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
      * @param FindAllPostsQuery $query
29 29
      * @return Page<FindPostHeaderQueryResponse>
30 30
      */
31
-   public function findAllPosts(FindAllPostsQuery $query): Page
31
+    public function findAllPosts(FindAllPostsQuery $query): Page
32 32
     {
33 33
         $page = $this->findingRepository->findPosts($query->getPageNo());
34 34
         return new Page(Collection::from(
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      * @param FindPostByIdQuery $query
49 49
      * @return FindPostQueryResponse|null
50 50
      */
51
-   public function findPostById(FindPostByIdQuery $query): ?FindPostQueryResponse
51
+    public function findPostById(FindPostByIdQuery $query): ?FindPostQueryResponse
52 52
     {
53 53
         return $this->toSinglePostResponse(
54 54
             $this->findingRepository->findPost($query->getId())
Please login to merge, or discard this patch.
src/Modules/Posts/Api/Command/BaselinePostsCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
src/Modules/Security/Persistence/Doctrine/Entity/User.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
Modules/Security/Domain/Provider/SymfonyDatabaseLoggedInUserProvider.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,6 +34,6 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
     /**
23 23
      * @return LoggedInUser
24 24
      */
25
-   public function getUser(): LoggedInUser
25
+    public function getUser(): LoggedInUser
26 26
     {
27 27
         $user = $this->security->getUser();
28 28
         if ($user == null) {
Please login to merge, or discard this patch.
src/Modules/Security/Domain/Logic/UserCreator.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      * @param CreateUserCommand $command
35 35
      * @return CreateUserCommandResponse
36 36
      */
37
-   public function createUser(CreateUserCommand $command): CreateUserCommandResponse
37
+    public function createUser(CreateUserCommand $command): CreateUserCommandResponse
38 38
     {
39 39
         $this->validator->preCreateUser($command);
40 40
         $newUser = $this->fromCommand($command);
Please login to merge, or discard this patch.
src/Modules/Security/Domain/Logic/SecurityValidator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.