Passed
Push — main ( 8e4fcf...e2b544 )
by Slawomir
05:06
created
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.
src/Modules/Security/Domain/Logic/UserUpdater.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,12 +36,12 @@  discard block
 block discarded – undo
36 36
     {
37 37
         $this->validator->preRenameUser($command);
38 38
         $this->transactionFactory
39
-            ->createTransaction(function () use ($command) {
39
+            ->createTransaction(function() use ($command) {
40 40
                 $this->updatingRepository->renameUser(
41 41
                     new RenameExistingUserDto($command->getLogin(), $command->getNewLogin())
42 42
                 );
43 43
             })
44
-            ->afterCommit(function () use ($command) {
44
+            ->afterCommit(function() use ($command) {
45 45
                 $this->eventPublisher->publish(
46 46
                     new UserRenamedOEvent($command->getLogin(), $command->getNewLogin())
47 47
                 );
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     {
57 57
         $this->validator->preChangeUserPassword($command);
58 58
         $this->transactionFactory
59
-            ->createTransaction(function () use ($command) {
59
+            ->createTransaction(function() use ($command) {
60 60
                 $this->updatingRepository->changePassword(
61 61
                     new ChangeExistingUserPasswordDto(
62 62
                         $command->getLogin(),
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/Security/JWTLoggedInUserProvider.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,6 +25,6 @@
 block discarded – undo
25 25
         if ($user instanceof LoggedInUser) {
26 26
             return $user;
27 27
         }
28
-        throw new \RuntimeException("Unsupported User Class: " . $user::class);
28
+        throw new \RuntimeException("Unsupported User Class: ".$user::class);
29 29
     }
30 30
 }
31 31
\ 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
@@ -16,7 +16,7 @@
 block discarded – undo
16 16
     {
17 17
     }
18 18
 
19
-   public function getUser(): LoggedInUser
19
+    public function getUser(): LoggedInUser
20 20
     {
21 21
         $user = $this->security->getUser();
22 22
         if ($user == null) {
Please login to merge, or discard this patch.
Persistence/Doctrine/Transactions/DoctrineCommentsTransactionFactory.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     /**
22 22
      * @return string
23 23
      */
24
-   public function getManagerName(): string
24
+    public function getManagerName(): string
25 25
     {
26 26
         return "comments";
27 27
     }
Please login to merge, or discard this patch.
Doctrine/Repository/DoctrineCommentsPostsEventsHandlingRepository.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     /**
16 16
      * @param CreateNewCommentsPostHeaderDto $newPostHeader
17 17
      */
18
-   public function createPostHeader(CreateNewCommentsPostHeaderDto $newPostHeader): void
18
+    public function createPostHeader(CreateNewCommentsPostHeaderDto $newPostHeader): void
19 19
     {
20 20
         $post = new CommentPostHeader();
21 21
         $post->setId($newPostHeader->getId());
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     /**
34 34
      * @param UpdateExistingCommentsPostHeaderDto $updatedPostHeader
35 35
      */
36
-   public function updatePostHeader(UpdateExistingCommentsPostHeaderDto $updatedPostHeader): void
36
+    public function updatePostHeader(UpdateExistingCommentsPostHeaderDto $updatedPostHeader): void
37 37
     {
38 38
         $this->getEntityManager()
39 39
             ->createQueryBuilder()
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      * @param DeleteExistingCommentsPostHeaderDto $deletedPostHeader
57 57
      * @throws \Doctrine\ORM\ORMException
58 58
      */
59
-   public function deletePostHeader(DeleteExistingCommentsPostHeaderDto $deletedPostHeader): void
59
+    public function deletePostHeader(DeleteExistingCommentsPostHeaderDto $deletedPostHeader): void
60 60
     {
61 61
         $entityManager = $this->getEntityManager();
62 62
         $entityManager
Please login to merge, or discard this patch.