Passed
Push — main ( 364f30...5b897c )
by Slawomir
18:31 queued 13:24
created
src/Modules/Comments/Domain/Logic/CommentsValidator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      */
39 39
     private function validatePostExists(Ulid $postId): void
40 40
     {
41
-        if(!$this->postHeadersFindingRepository->postExists($postId)) {
41
+        if (!$this->postHeadersFindingRepository->postExists($postId)) {
42 42
             throw new BadRequestHttpException("Requested Post doesn't exist");
43 43
         }
44 44
     }
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      */
49 49
     private function validateCommentExists(?Ulid $commentId): void
50 50
     {
51
-        if(!$this->commentsFindingRepository->commentExists($commentId)) {
51
+        if (!$this->commentsFindingRepository->commentExists($commentId)) {
52 52
             throw new BadRequestHttpException("Requested Parent Comment doesn't exist");
53 53
         }
54 54
     }
Please login to merge, or discard this patch.
src/Modules/Comments/Domain/Logic/PostHeadersFinder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
     public function findPostHeaders(FindCommentsPostHeadersQuery $query): array
26 26
     {
27 27
         return Collection::from($this->headersFindingRepository->findPostHeaders())
28
-            ->map(function ($header) {
28
+            ->map(function($header) {
29 29
                 return new FindCommentsPostHeadersQueryResponse(
30 30
                     $header->getId(),
31 31
                     $header->getTitle(),
Please login to merge, or discard this patch.
src/Modules/Comments/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(UserRenamedCommentsIEvent $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 UpdatedCommentsPostHeadersUserNameDto(
29 29
                         $event->getOldLogin(),
Please login to merge, or discard this patch.
src/Modules/Comments/Domain/Logic/PostEventsHandler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function onPostCreated(PostCreatedCommentsIEvent $event): void
34 34
     {
35
-        $this->transactionFactory->createTransaction(function () use ($event) {
35
+        $this->transactionFactory->createTransaction(function() use ($event) {
36 36
             $this->postEventsCommentsRepository->createPostHeader(
37 37
                 new CreateNewCommentsPostHeaderDto(
38 38
                     $event->getId(),
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public function onPostUpdated(PostUpdatedCommentsIEvent $event): void
55 55
     {
56
-        $this->transactionFactory->createTransaction(function () use ($event) {
56
+        $this->transactionFactory->createTransaction(function() use ($event) {
57 57
             $this->postEventsCommentsRepository->updatePostHeader(
58 58
                 new UpdateExistingCommentsPostHeaderDto(
59 59
                     $event->getId(),
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     public function onPostDeleted(PostDeletedCommentsIEvent $event): void
74 74
     {
75
-        $this->transactionFactory->createTransaction(function () use ($event) {
75
+        $this->transactionFactory->createTransaction(function() use ($event) {
76 76
             $this->commentsDeletionRepository->deleteCommentsForPost($event->getId());
77 77
             $this->postEventsCommentsRepository->deletePostHeader(
78 78
                 new DeleteExistingCommentsPostHeaderDto($event->getId())
Please login to merge, or discard this patch.
src/Modules/Comments/Domain/Logic/CommentsFinder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
     {
31 31
         return Collection::from(
32 32
             $this->commentsFindingRepository->findCommentsByPostId($query->getPostId())
33
-        )->map(function ($comment) {
33
+        )->map(function($comment) {
34 34
             return new FindCommentsByPostIdQueryResponse(
35 35
                 $comment->getId(),
36 36
                 $comment->getAuthor(),
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         $result = $this->commentsFindingRepository->findLatestComments($query->getPageNo());
52 52
         $data = Collection::from(
53 53
             $result->getData()
54
-        )->map(function ($comment) {
54
+        )->map(function($comment) {
55 55
             return new FindLatestCommentsQueryResponse(
56 56
                 $comment->getId(),
57 57
                 $comment->getAuthor(),
Please login to merge, or discard this patch.
src/Modules/Comments/Domain/Logic/CommentsCreator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,10 +42,10 @@
 block discarded – undo
42 42
         $this->validator->preCreate($command);
43 43
         $newComment = $this->fromCreateCommand($command);
44 44
         $id = $this->transactionFactory
45
-            ->createTransaction(function () use ($newComment) {
45
+            ->createTransaction(function() use ($newComment) {
46 46
                 return $this->commentsCreationRepository->createComment($newComment);
47 47
             })
48
-            ->afterCommit(function ($id) use ($newComment, $command) {
48
+            ->afterCommit(function($id) use ($newComment, $command) {
49 49
                 $this->eventPublisher->publish(new CommentCreatedOEvent($command->getPostId(),
50 50
                         new CommentDto($id,
51 51
                             $newComment->getAuthor(),
Please login to merge, or discard this patch.
src/Modules/Comments/Api/Command/BaselineCommentsCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 
42 42
         $from = $input->getArgument("from");
43 43
         if ($from != null) {
44
-            $this->from = \DateTime::createFromFormat("Y-m-d H:i:s", $from . "00:00:00");
44
+            $this->from = \DateTime::createFromFormat("Y-m-d H:i:s", $from."00:00:00");
45 45
         }
46 46
         $this->commentsApi->baseline($this);
47 47
         if ($from != null) {
Please login to merge, or discard this patch.
src/Infrastructure/Services/ParamConverter/JsonParamConverter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
         $errors = $this->validator->validate($object);
78 78
         if (count($errors) > 0) {
79 79
             throw new BadRequestException(sprintf('Invalid Request Body: %s',
80
-                (string)$errors));
80
+                (string) $errors));
81 81
         }
82 82
         return $object;
83 83
     }
Please login to merge, or discard this patch.
src/Infrastructure/Events/ApplicationInboundEvent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
         if ($value == null) {
105 105
             return null;
106 106
         }
107
-        return is_string($value) ? $value : (string)$value;
107
+        return is_string($value) ? $value : (string) $value;
108 108
     }
109 109
 
110 110
     /**
Please login to merge, or discard this patch.