Completed
Push — master ( 096baa...85634b )
by Louis
26s queued 13s
created
back/src/KI/UserBundle/Security/FormLoginAuthenticator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     {
50 50
         $plainPassword = $credentials['password'];
51 51
 
52
-        if($user->getLoginMethod() != 'form')
52
+        if ($user->getLoginMethod() != 'form')
53 53
             throw new CustomUserMessageAuthenticationException('No password available');
54 54
 
55 55
         if (!$this->passwordEncoder->isPasswordValid($user, $plainPassword)) {
Please login to merge, or discard this patch.
back/src/KI/UserBundle/Listener/AchievementCheckListener.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
         // Sinon, on lance le check associé
66 66
         $check = false;
67
-        $method = 'check' . $achievement->getIdA();
67
+        $method = 'check'.$achievement->getIdA();
68 68
         if (method_exists($this, $method))
69 69
             $check = $this->$method();
70 70
 
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
89 89
         }
90 90
 
91 91
         $total = count(Achievement::getConstants());
92
-        if (count($this->achievements) >= $total * 0.5) {
92
+        if (count($this->achievements) >= $total*0.5) {
93 93
             $achievementCheck = new AchievementCheckEvent(Achievement::CRAZY_UNLOCKER);
94 94
             $this->check($achievementCheck);
95 95
         }
96
-        if (count($this->achievements) >= $total * 0.9) {
96
+        if (count($this->achievements) >= $total*0.9) {
97 97
             $achievementCheck = new AchievementCheckEvent(Achievement::TOTAL_UNLOCKER);
98 98
             $this->check($achievementCheck);
99 99
         }
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
                 $factor += 0.75;
124 124
             }
125 125
         }
126
-        return ceil($factor * $points);
126
+        return ceil($factor*$points);
127 127
     }
128 128
 
129 129
     // Fonctions de check correspondant aux divers achievements
@@ -191,14 +191,14 @@  discard block
 block discarded – undo
191 191
     // Télécharger plus de 100Go sur Ponthub
192 192
     public function check60()
193 193
     {
194
-        return $this->totalPontHubSize() > (100 * 1024 * 1024 * 1024);
194
+        return $this->totalPontHubSize() > (100*1024*1024*1024);
195 195
     }
196 196
 
197 197
     // Ultimate Downloader
198 198
     // Télécharger plus de 500Go sur Ponthub
199 199
     public function check70()
200 200
     {
201
-        return $this->totalPontHubSize() > (500 * 1024 * 1024 * 1024);
201
+        return $this->totalPontHubSize() > (500*1024*1024*1024);
202 202
     }
203 203
 
204 204
     private function totalPontHubSize()
Please login to merge, or discard this patch.
back/src/KI/UserBundle/Listener/FacebookImportUserRegistrationListener.php 3 patches
Switch Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -33,23 +33,23 @@
 block discarded – undo
33 33
         switch ($user->getPromo()) {
34 34
             // Attention, toujours préciser l'id facebook de la promo d'après
35 35
             // pour avoir les étrangers
36
-            case '015':
37
-                $id = '359646667495742';
38
-                break;  // Wei't spirit
39
-            case '016':
40
-                $id = '1451446761806184';
41
-                break; // Wei't the phoque
42
-            case '017':
43
-                $id = '737969042997359';
44
-                break;  // F'wei'ght Club
45
-            case '018':
46
-                $id = '1739424532975028';
47
-                break;  // WEI'STED
48
-            case '019':
49
-                $id = '1739424532975028';
50
-                break;  // WEI'STED
51
-            default:
52
-                return;
36
+        case '015':
37
+            $id = '359646667495742';
38
+            break;  // Wei't spirit
39
+        case '016':
40
+            $id = '1451446761806184';
41
+            break; // Wei't the phoque
42
+        case '017':
43
+            $id = '737969042997359';
44
+            break;  // F'wei'ght Club
45
+        case '018':
46
+            $id = '1739424532975028';
47
+            break;  // WEI'STED
48
+        case '019':
49
+            $id = '1739424532975028';
50
+            break;  // WEI'STED
51
+        default:
52
+            return;
53 53
         }
54 54
 
55 55
         // On récupère la liste des membres
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -24,10 +24,10 @@  discard block
 block discarded – undo
24 24
         $this->fbToken = $facebookToken;
25 25
     }
26 26
 
27
-    public function facebookImport(UserRegistrationEvent $event){
27
+    public function facebookImport(UserRegistrationEvent $event) {
28 28
         $user = $event->getUser();
29 29
 
30
-        $token = '?access_token=' . $this->fbToken;
30
+        $token = '?access_token='.$this->fbToken;
31 31
 
32 32
         // Ids des différents groupes facebook
33 33
         switch ($user->getPromo()) {
@@ -35,26 +35,26 @@  discard block
 block discarded – undo
35 35
             // pour avoir les étrangers
36 36
             case '015':
37 37
                 $id = '359646667495742';
38
-                break;  // Wei't spirit
38
+                break; // Wei't spirit
39 39
             case '016':
40 40
                 $id = '1451446761806184';
41 41
                 break; // Wei't the phoque
42 42
             case '017':
43 43
                 $id = '737969042997359';
44
-                break;  // F'wei'ght Club
44
+                break; // F'wei'ght Club
45 45
             case '018':
46 46
                 $id = '1739424532975028';
47
-                break;  // WEI'STED
47
+                break; // WEI'STED
48 48
             case '019':
49 49
                 $id = '1739424532975028';
50
-                break;  // WEI'STED
50
+                break; // WEI'STED
51 51
             default:
52 52
                 return;
53 53
         }
54 54
 
55 55
         // On récupère la liste des membres
56 56
         $baseUrl = 'https://graph.facebook.com/v2.7';
57
-        $data = json_decode($this->curlService->curl($baseUrl . '/' . $id . '/members' . $token . '&limit=10000'), true);
57
+        $data = json_decode($this->curlService->curl($baseUrl.'/'.$id.'/members'.$token.'&limit=10000'), true);
58 58
 
59 59
         $bestMatch = null;
60 60
         $bestPercent = -1;
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
         }
68 68
 
69 69
         if ($bestPercent > 85) {
70
-            $url = '/' . $bestMatch['id'] . '/picture' . $token . '&width=9999&redirect=false';
71
-            $dataImage = json_decode($this->curlService->curl($baseUrl . $url), true);
70
+            $url = '/'.$bestMatch['id'].'/picture'.$token.'&width=9999&redirect=false';
71
+            $dataImage = json_decode($this->curlService->curl($baseUrl.$url), true);
72 72
             $image = $this->imageService->upload($dataImage['data']['url'], true);
73 73
             $user->setImage($image);
74 74
         }
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
     private function isSimilar(User $user, array $member)
82 82
     {
83 83
         $percent = 0;
84
-        similar_text($user->getFirstName() . ' ' . $user->getLastName(), $member['name'], $percent);
84
+        similar_text($user->getFirstName().' '.$user->getLastName(), $member['name'], $percent);
85 85
         return $percent;
86 86
     }
87 87
 }
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
 use Symfony\Component\Security\Core\Exception\CustomUserMessageAuthenticationException;
12 12
 use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
13 13
 use Symfony\Component\Security\Core\User\UserInterface;
14
-
15 14
 use Symfony\Component\Security\Core\User\UserProviderInterface;
16 15
 
17 16
 
Please login to merge, or discard this patch.
back/src/KI/UserBundle/Service/TokenService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 
14 14
     public function __construct(EntityManager $manager, TokenStorage $tokenStorage)
15 15
     {
16
-        $this->manager         = $manager;
16
+        $this->manager = $manager;
17 17
         $this->tokenStorage = $tokenStorage;
18 18
     }
19 19
 
Please login to merge, or discard this patch.
back/web/config.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@
 block discarded – undo
28 28
 
29 29
 $majorProblems = $symfonyRequirements->getFailedRequirements();
30 30
 $minorProblems = $symfonyRequirements->getFailedRecommendations();
31
-$hasMajorProblems = (bool) count($majorProblems);
32
-$hasMinorProblems = (bool) count($minorProblems);
31
+$hasMajorProblems = (bool)count($majorProblems);
32
+$hasMinorProblems = (bool)count($minorProblems);
33 33
 
34 34
 ?>
35 35
 <!DOCTYPE html>
Please login to merge, or discard this patch.
back/tests/KI/DvpBundle/Controller/BasketDatesControllerTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
         $response = $this->client->getResponse();
31 31
         $this->assertJsonResponse($response, 200);
32 32
 
33
-        $this->client->request('GET', '/basketdates/' . $id);
33
+        $this->client->request('GET', '/basketdates/'.$id);
34 34
         $response = $this->client->getResponse();
35 35
         $this->assertJsonResponse($response, 200);
36 36
 
@@ -44,14 +44,14 @@  discard block
 block discarded – undo
44 44
      */
45 45
     public function testPatch($id)
46 46
     {
47
-        $this->client->request('PATCH', '/basketdates/' . $id, [
47
+        $this->client->request('PATCH', '/basketdates/'.$id, [
48 48
                 'locked' => true,
49 49
             ]
50 50
         );
51 51
         $response = $this->client->getResponse();
52 52
         $this->assertJsonResponse($response, 204);
53 53
 
54
-        $this->client->request('PATCH', '/basketdates/' . $id, ['dateRetrieve' => '3 janvier']);
54
+        $this->client->request('PATCH', '/basketdates/'.$id, ['dateRetrieve' => '3 janvier']);
55 55
         $response = $this->client->getResponse();
56 56
         $this->assertJsonResponse($response, 400);
57 57
 
@@ -65,11 +65,11 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function testDelete($id)
67 67
     {
68
-        $this->client->request('DELETE', '/basketdates/' . $id);
68
+        $this->client->request('DELETE', '/basketdates/'.$id);
69 69
         $response = $this->client->getResponse();
70 70
         $this->assertJsonResponse($response, 204);
71 71
 
72
-        $this->client->request('DELETE', '/basketdates/' . $id);
72
+        $this->client->request('DELETE', '/basketdates/'.$id);
73 73
         $response = $this->client->getResponse();
74 74
         $this->assertJsonResponse($response, 404);
75 75
     }
Please login to merge, or discard this patch.
back/src/KI/DvpBundle/Controller/BasketDatesController.php 1 patch
Unused Use Statements   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,11 +3,10 @@
 block discarded – undo
3 3
 namespace KI\DvpBundle\Controller;
4 4
 
5 5
 use KI\CoreBundle\Controller\ResourceController;
6
+use Nelmio\ApiDocBundle\Annotation\ApiDoc;
6 7
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
7 8
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
8
-use Nelmio\ApiDocBundle\Annotation\ApiDoc;
9 9
 use Symfony\Component\DependencyInjection\ContainerInterface;
10
-use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
11 10
 
12 11
 class BasketsController extends ResourceController
13 12
 {
Please login to merge, or discard this patch.
back/src/KI/PonthubBundle/Controller/GamesController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@
 block discarded – undo
123 123
      */
124 124
     public function downloadOtherAction($slug)
125 125
     {
126
-        $item =  $this->getOne($slug, !$this->is('EXTERIEUR'));
126
+        $item = $this->getOne($slug, !$this->is('EXTERIEUR'));
127 127
         return $this->download($item);
128 128
     }
129 129
 }
Please login to merge, or discard this patch.
back/src/KI/UserBundle/Listener/OnlineListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
 
14 14
     public function __construct(EntityManager $manager, TokenStorage $tokenStorage)
15 15
     {
16
-        $this->manager         = $manager;
16
+        $this->manager = $manager;
17 17
         $this->tokenStorage = $tokenStorage;
18 18
     }
19 19
 
Please login to merge, or discard this patch.