Completed
Branch master (b57e48)
by Adrien
02:53
created
src/Badger/GameBundle/Doctrine/Repository/QuestRepository.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
 use Badger\TagBundle\Taggable\TaggableInterface;
8 8
 use Badger\UserBundle\Entity\UserInterface;
9 9
 use Doctrine\DBAL\Connection;
10
-use Doctrine\ORM\Query;
11 10
 use Doctrine\ORM\EntityRepository;
12 11
 
13 12
 /**
Please login to merge, or discard this patch.
src/Badger/TagBundle/Controller/TagController.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,6 @@
 block discarded – undo
6 6
 use Symfony\Component\HttpFoundation\RedirectResponse;
7 7
 use Symfony\Component\HttpFoundation\Request;
8 8
 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
9
-
10 9
 use Badger\TagBundle\Entity\Tag;
11 10
 use Badger\TagBundle\Form\TagType;
12 11
 use Symfony\Component\HttpFoundation\Response;
Please login to merge, or discard this patch.
src/Badger/GateBundle/GateBundle.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use Symfony\Component\HttpKernel\Bundle\Bundle;
6 6
 
7 7
 /**
8
-
9 8
  * @license http://opensource.org/licenses/MIT The MIT License (MIT)
10 9
  */
11 10
 class GateBundle extends Bundle
Please login to merge, or discard this patch.
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/DependencyInjection/GameExtension.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('factories.yml');
23 23
         $loader->load('removers.yml');
24 24
         $loader->load('repositories.yml');
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.