Completed
Branch cleanlint (7e1d43)
by Adrien
03:00 queued 45s
created
Category
src/Badger/GameBundle/Notifier/SlackNotifier.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $promise = $client->sendAsync($request, ['timeout' => 10]);
50 50
 
51 51
         $promise->then(
52
-            function (ResponseInterface $res) use ($data) {
52
+            function(ResponseInterface $res) use ($data) {
53 53
                 $this->logger->info(
54 54
                     sprintf(
55 55
                         'Request to SLACK webhook OK [%s] with data: %s',
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
                     )
59 59
                 );
60 60
             },
61
-            function (RequestException $e) {
61
+            function(RequestException $e) {
62 62
                 $this->logger->error(
63 63
                     sprintf(
64 64
                         'Request to SLACK webhook FAILED with message: %s',
Please login to merge, or discard this patch.
src/Badger/GameBundle/Tests/Controller/AdventureStepCompletionTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
         $adventureStepCompletion = $adventureStepCompletionRepo->findOneBy(['pending' => 1])->getId();
21 21
         $client->request('GET', sprintf('admin/claimed-adventure-step/%s/reject', $adventureStepCompletion));
22 22
 
23
-        $this->assertCount($count-=1, $adventureStepCompletionRepo->findAll(), 'Adventure step has been rejected and deleted');
23
+        $this->assertCount($count -= 1, $adventureStepCompletionRepo->findAll(), 'Adventure step has been rejected and deleted');
24 24
     }
25 25
 
26 26
     public function testAcceptAction()
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         $countAccepted = count($adventureStepCompletionRepo->findBy(['pending' => 0]));
34 34
         $client->request('GET', sprintf('admin/claimed-adventure-step/%s/accept', current($adventureStepCompletions)->getId()));
35 35
 
36
-        $this->assertCount($countPending-=1, $adventureStepCompletionRepo->findBy(['pending' => 1]), 'Adventure step has been accepted');
37
-        $this->assertCount($countAccepted+=1, $adventureStepCompletionRepo->findBy(['pending' => 0]), 'Adventure step has been accepted');
36
+        $this->assertCount($countPending -= 1, $adventureStepCompletionRepo->findBy(['pending' => 1]), 'Adventure step has been accepted');
37
+        $this->assertCount($countAccepted += 1, $adventureStepCompletionRepo->findBy(['pending' => 0]), 'Adventure step has been accepted');
38 38
     }
39 39
 }
Please login to merge, or discard this patch.
src/Badger/GameBundle/Tests/Controller/AdventureControllerTest.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -68,8 +68,8 @@  discard block
 block discarded – undo
68 68
             ]
69 69
         ]);
70 70
 
71
-        $this->assertCount($adventureCount+=1, $this->adventureRepository->findAll());
72
-        $this->assertCount($adventureStepsCount+=2, $this->adventureStepRepository->findAll());
71
+        $this->assertCount($adventureCount += 1, $this->adventureRepository->findAll());
72
+        $this->assertCount($adventureStepsCount += 2, $this->adventureStepRepository->findAll());
73 73
     }
74 74
 
75 75
     public function testContraintsFormAction()
@@ -108,9 +108,9 @@  discard block
 block discarded – undo
108 108
             'form'    => []
109 109
         ]);
110 110
 
111
-        $this->assertCount($adventureCount-=1, $this->adventureRepository->findAll(), 'Adventure is removed');
112
-        $this->assertCount($adventureStepCount-=2, $this->adventureStepRepository->findAll(), 'Steps of adventure are removed');
113
-        $this->assertCount($adventureComplRepoCount-=1, $this->adventureComplRepo->findAll(), 'Completions steps of adventure are removed');
111
+        $this->assertCount($adventureCount -= 1, $this->adventureRepository->findAll(), 'Adventure is removed');
112
+        $this->assertCount($adventureStepCount -= 2, $this->adventureStepRepository->findAll(), 'Steps of adventure are removed');
113
+        $this->assertCount($adventureComplRepoCount -= 1, $this->adventureComplRepo->findAll(), 'Completions steps of adventure are removed');
114 114
         $this->assertCount($badgeCount, $this->badgeRepository->findAll(), 'Badge are not removed when an adventure is removed');
115 115
     }
116 116
 
@@ -144,8 +144,8 @@  discard block
 block discarded – undo
144 144
         ]);
145 145
 
146 146
         $this->assertCount($adventureCount, $this->adventureRepository->findAll(), 'No adventure added or removed');
147
-        $this->assertCount($adventureStepsCount-=1, $this->adventureStepRepository->findAll(), 'Step deleted');
148
-        $this->assertCount($adventureCompletionCount-=1, $this->adventureComplRepo->findAll(), 'Adventure Completion linked to deleted step is removed');
147
+        $this->assertCount($adventureStepsCount -= 1, $this->adventureStepRepository->findAll(), 'Step deleted');
148
+        $this->assertCount($adventureCompletionCount -= 1, $this->adventureComplRepo->findAll(), 'Adventure Completion linked to deleted step is removed');
149 149
     }
150 150
 
151 151
     public function testDeleteWhenStepsAreLinkedToBadges()
@@ -163,9 +163,9 @@  discard block
 block discarded – undo
163 163
             'form'    => []
164 164
         ]);
165 165
 
166
-        $this->assertCount($adventureCount-=1, $this->adventureRepository->findAll(), 'Adventure is removed');
167
-        $this->assertCount($adventureStepCount-=4, $this->adventureStepRepository->findAll(), 'Steps of adventure are removed');
168
-        $this->assertCount($adventureComplRepoCount-=2, $this->adventureComplRepo->findAll(), 'Completions steps of adventure are removed');
166
+        $this->assertCount($adventureCount -= 1, $this->adventureRepository->findAll(), 'Adventure is removed');
167
+        $this->assertCount($adventureStepCount -= 4, $this->adventureStepRepository->findAll(), 'Steps of adventure are removed');
168
+        $this->assertCount($adventureComplRepoCount -= 2, $this->adventureComplRepo->findAll(), 'Completions steps of adventure are removed');
169 169
         $this->assertCount($badgeCount, $this->badgeRepository->findAll(), 'Badge are not removed when an adventure is removed');
170 170
     }
171 171
 }
Please login to merge, or discard this patch.
src/Badger/GameBundle/Tests/Controller/BadgeControllerTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
         $badge = $this->get('badger.game.repository.badge')->findOneBy(['title' => 'Master Contributor']);
33 33
         $this->deleteBadge($client, $badge->getId());
34 34
 
35
-        $this->assertCount($count-=1, $this->get('badger.game.repository.badge')->findAll());
35
+        $this->assertCount($count -= 1, $this->get('badger.game.repository.badge')->findAll());
36 36
     }
37 37
 
38 38
     public function testDeleteWhenBadgeHasBeenClaimed()
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
         $badge = $this->get('badger.game.repository.badge')->findOneBy(['title' => 'Bug Hunter']);
46 46
         $this->deleteBadge($client, $badge->getId());
47 47
 
48
-        $this->assertCount($countBadge-=1, $this->get('badger.game.repository.badge')->findAll(), 'Badge is removed');
49
-        $this->assertCount($countClaimedBadge-=1, $this->get('badger.game.repository.claimed_badge')->findAll(), 'Claimed badge is removed');
48
+        $this->assertCount($countBadge -= 1, $this->get('badger.game.repository.badge')->findAll(), 'Badge is removed');
49
+        $this->assertCount($countClaimedBadge -= 1, $this->get('badger.game.repository.claimed_badge')->findAll(), 'Claimed badge is removed');
50 50
     }
51 51
 
52 52
     public function testDeleteWhenBadgeHasBeenUnlocked()
@@ -59,8 +59,8 @@  discard block
 block discarded – undo
59 59
         $badge = $this->get('badger.game.repository.badge')->findOneBy(['title' => 'ASS Disruptor']);
60 60
         $this->deleteBadge($client, $badge->getId());
61 61
 
62
-        $this->assertCount($countBadge-=1, $this->get('badger.game.repository.badge')->findAll(), 'Badge is removed');
63
-        $this->assertCount($countUnlockedBadge-=1, $this->get('badger.game.repository.unlocked_badge')->findAll(), 'Unlocked badge is removed');
62
+        $this->assertCount($countBadge -= 1, $this->get('badger.game.repository.badge')->findAll(), 'Badge is removed');
63
+        $this->assertCount($countUnlockedBadge -= 1, $this->get('badger.game.repository.unlocked_badge')->findAll(), 'Unlocked badge is removed');
64 64
     }
65 65
 
66 66
     /**
Please login to merge, or discard this patch.
src/Badger/GameBundle/Tests/Unlocker/BadgeUnlockerTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
         $this->get('badger.game.unlocker.badge')->unlockBadge($user, $badge);
21 21
 
22
-        $this->assertCount($count+=1, $this->get('badger.game.repository.unlocked_badge')->getUnlockedBadgeIdsByUser($user));
22
+        $this->assertCount($count += 1, $this->get('badger.game.repository.unlocked_badge')->getUnlockedBadgeIdsByUser($user));
23 23
     }
24 24
 
25 25
     public function testUnlockBadgeWhenUserHasAlreadyTheBadge()
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
         $this->get('badger.game.unlocker.badge')->unlockBadgeFromClaim(current($claimedBadges));
46 46
 
47
-        $this->assertCount($count-=1, $this->get('badger.game.repository.claimed_badge')->findAll(), 'Claimed badge has been removed');
48
-        $this->assertCount($countBadges+=1, $this->get('badger.game.repository.unlocked_badge')->getUnlockedBadgeIdsByUser($user), 'Badge has been added');
47
+        $this->assertCount($count -= 1, $this->get('badger.game.repository.claimed_badge')->findAll(), 'Claimed badge has been removed');
48
+        $this->assertCount($countBadges += 1, $this->get('badger.game.repository.unlocked_badge')->getUnlockedBadgeIdsByUser($user), 'Badge has been added');
49 49
     }
50 50
 }
Please login to merge, or discard this patch.
src/Badger/GameBundle/Entity/Quest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@
 block discarded – undo
181 181
      */
182 182
     public function getApprovedCompletionsCount()
183 183
     {
184
-        return $this->completions->filter(function ($completion) {
184
+        return $this->completions->filter(function($completion) {
185 185
             return !$completion->isPending();
186 186
         })->count();
187 187
     }
Please login to merge, or discard this patch.
src/Badger/TagBundle/Security/TagVoter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
 
48 48
         $tag = $subject;
49 49
 
50
-        switch($attribute) {
50
+        switch ($attribute) {
51 51
             case self::VIEW:
52 52
                 return $this->canView($tag, $user);
53 53
         }
Please login to merge, or discard this patch.
src/Badger/TagBundle/Security/TaggedEntityVoter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             return false;
46 46
         }
47 47
 
48
-        switch($attribute) {
48
+        switch ($attribute) {
49 49
             case self::VIEW:
50 50
                 return $this->canView($subject, $user);
51 51
         }
@@ -65,13 +65,13 @@  discard block
 block discarded – undo
65 65
     private function canView(TaggableInterface $entity, TaggableInterface $user)
66 66
     {
67 67
         $badgeTagIds = $entity->getTags()
68
-            ->map(function (TagInterface $tag) {
68
+            ->map(function(TagInterface $tag) {
69 69
                 return $tag->getId();
70 70
             })
71 71
             ->toArray();
72 72
 
73 73
         $userTagIds = $user->getTags()
74
-            ->map(function (TagInterface $tag) {
74
+            ->map(function(TagInterface $tag) {
75 75
                 return $tag->getId();
76 76
             })
77 77
             ->toArray();
Please login to merge, or discard this patch.
src/Badger/UserBundle/DependencyInjection/UserExtension.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 load(array $configs, ContainerBuilder $container)
20 20
     {
21
-        $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
21
+        $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
22 22
         $loader->load('removers.yml');
23 23
         $loader->load('repositories.yml');
24 24
         $loader->load('savers.yml');
Please login to merge, or discard this patch.