Passed
Push — main ( 6d7bd8...b9bb24 )
by Slawomir
04:03
created
Modules/Security/Domain/Provider/SymfonyDatabaseLoggedInUserProvider.php 1 patch
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.
src/Modules/Security/Domain/Logic/UserCreator.php 1 patch
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.
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/PostsEventsHandler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
      */
30 30
     public function onPostCreated(PostCreatedSecurityIEvent $event): void
31 31
     {
32
-        $this->transactionFactory->createTransaction(function () use ($event) {
32
+        $this->transactionFactory->createTransaction(function() use ($event) {
33 33
             $this->postEventsSecurityRepository->createPostHeader(
34 34
                 new CreateNewUserPostHeaderDto(
35 35
                     $event->getId(),
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function onPostUpdated(PostUpdatedSecurityIEvent $event): void
52 52
     {
53
-        $this->transactionFactory->createTransaction(function () use ($event) {
53
+        $this->transactionFactory->createTransaction(function() use ($event) {
54 54
             $this->postEventsSecurityRepository->updatePostHeader(
55 55
                 new UpdateExistingUserPostHeaderDto(
56 56
                     $event->getId(),
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      */
70 70
     public function onPostDeleted(PostDeletedSecurityIEvent $event): void
71 71
     {
72
-        $this->transactionFactory->createTransaction(function () use ($event) {
72
+        $this->transactionFactory->createTransaction(function() use ($event) {
73 73
             $this->postEventsSecurityRepository->deletePostHeader(
74 74
                 new DeleteExistingUserPostHeaderDto($event->getId())
75 75
             );
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.
Doctrine/Repository/DoctrineCommentsPostHeadersFindingRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         $dtoClass = CommentsPostHeaderDto::class;
20 20
         $dql = "select new $dtoClass(p.id, p.title, p.summary, p.tags, p.createdById, p.createdByName, p.createdAt, p.version) from $headerClass p";
21 21
         if ($from != null) {
22
-            $dql = $dql . " where p.createdAt >= :from";
22
+            $dql = $dql." where p.createdAt >= :from";
23 23
         }
24 24
         $query = $this->getEntityManager()->createQuery($dql);
25 25
         if ($from != null) {
Please login to merge, or discard this patch.
Persistence/Doctrine/Repository/DoctrineCommentsCreationRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
         $countQuery = $em->createQueryBuilder()
46 46
             ->select($expr->count("sc.id"))
47 47
             ->from(CommentPostHeader::class, "sp")
48
-            ->join("sp.comments","sc")
48
+            ->join("sp.comments", "sc")
49 49
             ->where("sp.id = :id")
50 50
             ->getDQL();
51 51
 
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.