Completed
Push — master ( a8dd4e...e2eec2 )
by Louis
107:04 queued 52:03
created
back/src/KI/UserBundle/Command/PhotoUpdateCommand.php 4 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -94,13 +94,13 @@
 block discarded – undo
94 94
             }
95 95
         }
96 96
         $output->writeln(
97
-          ['End of list',
98
-          '',
99
-          'Students in promo '.$input->getArgument('promo').': '.count($users),
100
-          'Missing photos in promo: '.($updateCount+$unfoundCount),
101
-          'Imported missing photos :'.$updateCount,
102
-          'Remaining missing photos (unfound Facebook profiles): '.$unfoundCount
103
-          ]);
97
+            ['End of list',
98
+            '',
99
+            'Students in promo '.$input->getArgument('promo').': '.count($users),
100
+            'Missing photos in promo: '.($updateCount+$unfoundCount),
101
+            'Imported missing photos :'.$updateCount,
102
+            'Remaining missing photos (unfound Facebook profiles): '.$unfoundCount
103
+            ]);
104 104
     }
105 105
 
106 106
     // Compare un User uPont et un utilisateur Facebook et essaye de deviner si
Please login to merge, or discard this patch.
Switch Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -35,26 +35,26 @@
 block discarded – undo
35 35
         switch ($input->getArgument('promo')) {
36 36
             // Attention, toujours préciser l'id facebook de la promo d'après
37 37
             // pour avoir les étrangers
38
-            case '015':
39
-                $id = '359646667495742';
40
-                break;  // Wei't spirit
41
-            case '016':
42
-                $id = '1451446761806184';
43
-                break; // Wei't the phoque
44
-            case '017':
45
-                $id = '737969042997359';
46
-                break;  // F'wei'ght Club
47
-            case '018':
48
-                $id = '1739424532975028';
49
-                break;  // WEI'STED
50
-            case '019':
51
-                $id = '313192685791329';
52
-                break;  // WEI'T FOR IT
53
-            case '020':
54
-                $id = '313192685791329';
55
-                break;  // WEI'T FOR IT
56
-            default:
57
-                return;
38
+        case '015':
39
+            $id = '359646667495742';
40
+            break;  // Wei't spirit
41
+        case '016':
42
+            $id = '1451446761806184';
43
+            break; // Wei't the phoque
44
+        case '017':
45
+            $id = '737969042997359';
46
+            break;  // F'wei'ght Club
47
+        case '018':
48
+            $id = '1739424532975028';
49
+            break;  // WEI'STED
50
+        case '019':
51
+            $id = '313192685791329';
52
+            break;  // WEI'T FOR IT
53
+        case '020':
54
+            $id = '313192685791329';
55
+            break;  // WEI'T FOR IT
56
+        default:
57
+            return;
58 58
         }
59 59
 
60 60
         // On récupère la liste des membres
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
         $users = $repo->findByPromo($input->getArgument('promo'));
31 31
 
32
-        $token = '?access_token=' . $fbToken;
32
+        $token = '?access_token='.$fbToken;
33 33
 
34 34
         // Ids des différents groupes facebook
35 35
         switch ($input->getArgument('promo')) {
@@ -37,29 +37,29 @@  discard block
 block discarded – undo
37 37
             // pour avoir les étrangers
38 38
             case '015':
39 39
                 $id = '359646667495742';
40
-                break;  // Wei't spirit
40
+                break; // Wei't spirit
41 41
             case '016':
42 42
                 $id = '1451446761806184';
43 43
                 break; // Wei't the phoque
44 44
             case '017':
45 45
                 $id = '737969042997359';
46
-                break;  // F'wei'ght Club
46
+                break; // F'wei'ght Club
47 47
             case '018':
48 48
                 $id = '1739424532975028';
49
-                break;  // WEI'STED
49
+                break; // WEI'STED
50 50
             case '019':
51 51
                 $id = '313192685791329';
52
-                break;  // WEI'T FOR IT
52
+                break; // WEI'T FOR IT
53 53
             case '020':
54 54
                 $id = '313192685791329';
55
-                break;  // WEI'T FOR IT
55
+                break; // WEI'T FOR IT
56 56
             default:
57 57
                 return;
58 58
         }
59 59
 
60 60
         // On récupère la liste des membres
61 61
         $baseUrl = 'https://graph.facebook.com/v2.10';
62
-        $data = json_decode($curlService->curl($baseUrl . '/' . $id . '/members' . $token . '&limit=10000'), true);
62
+        $data = json_decode($curlService->curl($baseUrl.'/'.$id.'/members'.$token.'&limit=10000'), true);
63 63
 
64 64
         $updateCount = 0;
65 65
         $unfoundCount = 0;
@@ -80,8 +80,8 @@  discard block
 block discarded – undo
80 80
                 }
81 81
 
82 82
                 if ($bestPercent > 85) {
83
-                    $url = '/' . $bestMatch['id'] . '/picture' . $token . '&width=9999&redirect=false';
84
-                    $dataImage = json_decode($curlService->curl($baseUrl . $url), true);
83
+                    $url = '/'.$bestMatch['id'].'/picture'.$token.'&width=9999&redirect=false';
84
+                    $dataImage = json_decode($curlService->curl($baseUrl.$url), true);
85 85
                     $image = $imageService->upload($dataImage['data']['url'], true);
86 86
                     $user->setImage($image);
87 87
                     $updateCount++;
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
           ['End of list',
99 99
           '',
100 100
           'Students in promo '.$input->getArgument('promo').': '.count($users),
101
-          'Missing photos in promo: '.($updateCount+$unfoundCount),
101
+          'Missing photos in promo: '.($updateCount + $unfoundCount),
102 102
           'Imported missing photos :'.$updateCount,
103 103
           'Remaining missing photos (unfound Facebook profiles): '.$unfoundCount
104 104
           ]);
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
     private function isSimilar(User $user, array $member)
110 110
     {
111 111
         $percent = 0;
112
-        similar_text($user->getFirstName() . ' ' . $user->getLastName(), $member['name'], $percent);
112
+        similar_text($user->getFirstName().' '.$user->getLastName(), $member['name'], $percent);
113 113
         return $percent;
114 114
     }
115 115
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,8 +86,7 @@
 block discarded – undo
86 86
                     $user->setImage($image);
87 87
                     $updateCount++;
88 88
                     $output->writeln($user->getFirstName().' '.$user->getLastName().' <- '.$bestMatch['name'].' ('.$bestPercent.'% similar)');
89
-                }
90
-                else {
89
+                } else {
91 90
                     $unfoundCount++;
92 91
                 }
93 92
 
Please login to merge, or discard this patch.
back/src/KI/UserBundle/Listener/SendMailUserRegistrationListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
         $this->swiftMailer->send($message);
37 37
 
38 38
         $message = Swift_Message::newInstance()
39
-            ->setSubject('[uPont] Nouvelle inscription (' . $username . ')')
39
+            ->setSubject('[uPont] Nouvelle inscription ('.$username.')')
40 40
             ->setFrom('[email protected]')
41 41
             ->setTo('[email protected]')
42 42
             ->setBody($this->twigEngine->render('KIUserBundle::registration-ki.txt.twig', $attributes));
Please login to merge, or discard this patch.