Passed
Push — main ( 85cf21...669ea3 )
by Slawomir
12:08 queued 07:21
created
src/Modules/Posts/Api/Event/Inbound/CommentCreatedPostsIEvent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
      */
19 19
     public function __construct(array $data)
20 20
     {
21
-        parent::__construct( $data);
21
+        parent::__construct($data);
22 22
         $this->postId = $this->ulid('postId');
23 23
         $this->comments = [$this->array('comment')];
24 24
     }
Please login to merge, or discard this patch.
src/Infrastructure/Doctrine/Transactions/DoctrineTransactionFactory.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
    public function createTransaction($func): TransactionInterface
21 21
     {
22 22
         $em = $this->getEntityManager();
23
-        if(!$em->isOpen()) {
23
+        if (!$em->isOpen()) {
24 24
             $em = $this->managerRegistry->resetManager($this->getManagerName());
25 25
         }
26 26
         return new DoctrineTransaction($em, $func);
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      * @param $func
24 24
      * @return TransactionInterface
25 25
      */
26
-   public function createTransaction($func): TransactionInterface
26
+    public function createTransaction($func): TransactionInterface
27 27
     {
28 28
         $em = $this->getEntityManager();
29 29
         if(!$em->isOpen()) {
Please login to merge, or discard this patch.
src/Infrastructure/Events/Api/ApplicationEventSubscriber.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     )
23 23
     {
24 24
         $this->subscribedHandlers = Collection::from($this->subscribe())
25
-            ->map(function ($handlerMethodName, $eventClass) {
25
+            ->map(function($handlerMethodName, $eventClass) {
26 26
                 return EventHandlerReference::create($handlerMethodName, $eventClass);
27 27
             })
28 28
             ->realize();
@@ -58,9 +58,9 @@  discard block
 block discarded – undo
58 58
     {
59 59
         return $this
60 60
             ->subscribedHandlers
61
-            ->filter(function ($ref) use ($event) {
61
+            ->filter(function($ref) use ($event) {
62 62
                 return $ref->getEventName() == $event->getName();
63
-            })->map(function ($value) {
63
+            })->map(function($value) {
64 64
                 return $value;
65 65
             })->toArray();
66 66
     }
Please login to merge, or discard this patch.
Posts/Persistence/Doctrine/Repository/DoctrinePostsCreationRepository.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@
 block discarded – undo
15 15
      * @param CreateNewPostDto $newPost
16 16
      * @return Ulid
17 17
      */
18
-   public function createPost(CreateNewPostDto $newPost): Ulid
18
+    public function createPost(CreateNewPostDto $newPost): Ulid
19 19
     {
20 20
         $id = new Ulid();
21 21
         $em = $this->getEntityManager();
Please login to merge, or discard this patch.
src/Modules/Tags/Domain/Logic/TagsUpdater.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,14 +24,14 @@
 block discarded – undo
24 24
      * @param Ulid $postId
25 25
      * @param array $tags
26 26
      */
27
-   public function createUpdateTags(Ulid $postId, array $tags): void
27
+    public function createUpdateTags(Ulid $postId, array $tags): void
28 28
     {
29 29
         $this->tagsUpdatingRepository->updatePostTags($postId, $tags);
30 30
         $this->deleteEmptyTags();
31 31
     }
32 32
 
33 33
 
34
-   public function deleteEmptyTags(): void
34
+    public function deleteEmptyTags(): void
35 35
     {
36 36
         $this->tagsDeletingRepository->deleteEmptyTags();
37 37
     }
Please login to merge, or discard this patch.
src/Modules/Tags/Domain/Logic/PostsEventsHandler.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
      */
35 35
     public function onPostBaselined(PostBaselinedTagsIEvent $event): void
36 36
     {
37
-        $this->transactionFactory->createTransaction(function () use ($event) {
38
-            if($this->postHeadersFindingRepository->postExists($event->getId())) {
37
+        $this->transactionFactory->createTransaction(function() use ($event) {
38
+            if ($this->postHeadersFindingRepository->postExists($event->getId())) {
39 39
                 $this->postEventsTagsRepository->updatePostHeader(
40 40
                     new UpdateExistingTagsPostHeaderDto(
41 41
                         $event->getId(),
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function onPostCreated(PostCreatedTagsIEvent $event): void
73 73
     {
74
-        $this->transactionFactory->createTransaction(function () use ($event) {
74
+        $this->transactionFactory->createTransaction(function() use ($event) {
75 75
             $this->postEventsTagsRepository->createPostHeader(
76 76
                 new CreateNewTagsPostHeaderDto(
77 77
                     $event->getId(),
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function onPostUpdated(PostUpdatedTagsIEvent $event): void
96 96
     {
97
-        $this->transactionFactory->createTransaction(function () use ($event) {
97
+        $this->transactionFactory->createTransaction(function() use ($event) {
98 98
             $this->postEventsTagsRepository->updatePostHeader(
99 99
                 new UpdateExistingTagsPostHeaderDto(
100 100
                     $event->getId(),
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      */
115 115
     public function onPostDeleted(PostDeletedTagsIEvent $event): void
116 116
     {
117
-        $this->transactionFactory->createTransaction(function () use ($event) {
117
+        $this->transactionFactory->createTransaction(function() use ($event) {
118 118
             $this->postEventsTagsRepository->deletePostHeader(
119 119
                 new DeleteExistingTagsPostHeaderDto($event->getId())
120 120
             );
Please login to merge, or discard this patch.
src/Modules/Comments/Domain/Logic/PostEventsHandler.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function onPostBaselined(PostBaselinedCommentsIEvent $event): void
37 37
     {
38
-        $this->transactionFactory->createTransaction(function () use ($event) {
38
+        $this->transactionFactory->createTransaction(function() use ($event) {
39 39
             if ($this->postHeadersFindingRepository->postExists($event->getId())) {
40 40
                 $this->postEventsCommentsRepository->updatePostHeader(
41 41
                     new UpdateExistingCommentsPostHeaderDto(
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function onPostCreated(PostCreatedCommentsIEvent $event): void
67 67
     {
68
-        $this->transactionFactory->createTransaction(function () use ($event) {
68
+        $this->transactionFactory->createTransaction(function() use ($event) {
69 69
             $this->postEventsCommentsRepository->createPostHeader(
70 70
                 new CreateNewCommentsPostHeaderDto(
71 71
                     $event->getId(),
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      */
83 83
     public function onPostUpdated(PostUpdatedCommentsIEvent $event): void
84 84
     {
85
-        $this->transactionFactory->createTransaction(function () use ($event) {
85
+        $this->transactionFactory->createTransaction(function() use ($event) {
86 86
             $this->postEventsCommentsRepository->updatePostHeader(
87 87
                 new UpdateExistingCommentsPostHeaderDto(
88 88
                     $event->getId(),
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      */
101 101
     public function onPostDeleted(PostDeletedCommentsIEvent $event): void
102 102
     {
103
-        $this->transactionFactory->createTransaction(function () use ($event) {
103
+        $this->transactionFactory->createTransaction(function() use ($event) {
104 104
             $this->commentsDeletionRepository->deleteCommentsForPost($event->getId());
105 105
             $this->postEventsCommentsRepository->deletePostHeader(
106 106
                 new DeleteExistingCommentsPostHeaderDto($event->getId())
Please login to merge, or discard this patch.
Posts/Persistence/Doctrine/Repository/DoctrinePostsFindingRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
                     p.id, p.title, p.body, p.summary, p.tags, p.createdById, p.createdByName, p.createdAt, p.updatedAt, p.version
87 87
              ) from $postClass p where p.deletedAt is null";
88 88
         if ($from != null) {
89
-            $dql = $dql . " and p.createdAt >= :from";
89
+            $dql = $dql." and p.createdAt >= :from";
90 90
         }
91 91
         $query = $this->getEntityManager()->createQuery(
92 92
             $dql
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         $postClass = Post::class;
107 107
         $dql = "select p.id as postId from $postClass p where p.deletedAt is not null";
108 108
         if ($from != null) {
109
-            $dql = $dql . " and p.deletedAt >= :from";
109
+            $dql = $dql." and p.deletedAt >= :from";
110 110
         }
111 111
         $query = $this->getEntityManager()->createQuery(
112 112
             $dql
Please login to merge, or discard this patch.
tests/TestUtils/Transaction/InMemoryTransaction.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
      * @return mixed
28 28
      * @throws \Exception
29 29
      */
30
-   public function execute(): mixed
30
+    public function execute(): mixed
31 31
     {
32 32
         try {
33 33
             $handler = $this->func;
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      * @param $func
54 54
      * @return $this
55 55
      */
56
-   public function afterCommit($func): TransactionInterface
56
+    public function afterCommit($func): TransactionInterface
57 57
     {
58 58
         $this->afterCommit = $this->afterCommit->append($func);
59 59
         return $this;
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      * @param $func
64 64
      * @return $this
65 65
      */
66
-   public function afterRollback($func): TransactionInterface
66
+    public function afterRollback($func): TransactionInterface
67 67
     {
68 68
         $this->afterRollback = $this->afterRollback->append($func);
69 69
         return $this;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -33,14 +33,14 @@
 block discarded – undo
33 33
             $handler = $this->func;
34 34
             $result = $handler();
35 35
             $this->afterCommit
36
-                ->each(function ($successFn) use ($result) {
36
+                ->each(function($successFn) use ($result) {
37 37
                     $successFn($result);
38 38
                 })
39 39
                 ->realize();
40 40
             return $result;
41 41
         } catch (\Exception $e) {
42 42
             $this->afterRollback
43
-                ->each(function ($rollbackFn) {
43
+                ->each(function($rollbackFn) {
44 44
                     $rollbackFn();
45 45
                 })
46 46
                 ->realize();
Please login to merge, or discard this patch.