Completed
Push — master ( b71e6c...5e9553 )
by
unknown
156:05 queued 101:02
created
back/src/KI/PublicationBundle/Controller/ExercicesController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,11 +94,11 @@
 block discarded – undo
94 94
         $response = new Response();
95 95
         $filepath = $exercice->getAbsolutePath();
96 96
         $course = $exercice->getCourse();
97
-        $filename = '(' . $course->getDepartment() . ') ' . $course->getName() . ' - ' . $exercice->getName() . '.pdf';
97
+        $filename = '('.$course->getDepartment().') '.$course->getName().' - '.$exercice->getName().'.pdf';
98 98
 
99 99
         $response->headers->set('Cache-Control', 'private');
100 100
         $response->headers->set('Content-type', mime_content_type($filepath));
101
-        $response->headers->set('Content-Disposition', 'attachment; filename="' . $filename . '";');
101
+        $response->headers->set('Content-Disposition', 'attachment; filename="'.$filename.'";');
102 102
         $response->headers->set('Content-length', filesize($filepath));
103 103
 
104 104
         $response->sendHeaders();
Please login to merge, or discard this patch.
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/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.
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/src/KI/CoreBundle/Controller/CoreController.php 2 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     /**
38 38
      * Éjecte tous les utilisateurs ne respectant pas la condition
39 39
      * @param  boolean $bool
40
-     * @return boolean
40
+     * @return boolean|null
41 41
      */
42 42
     protected function trust($bool)
43 43
     {
@@ -80,7 +80,6 @@  discard block
 block discarded – undo
80 80
     /**
81 81
      * Génère la réponse relative au traitement d'un formulaire
82 82
      * @param  array  $data   Le formulaire traité
83
-     * @param  object $parent Éventuellement l'objet parent
84 83
      * @return Response
85 84
      */
86 85
     public function formJson($data)
Please login to merge, or discard this patch.
Switch Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -86,11 +86,11 @@
 block discarded – undo
86 86
     public function formJson($data)
87 87
     {
88 88
         switch ($data['code']) {
89
-            case 400:
90
-                return $this->json($data['form'], $data['code']);
91
-            case 204:
92
-            default:
93
-                return $this->json($data['item'], $data['code']);
89
+        case 400:
90
+            return $this->json($data['form'], $data['code']);
91
+        case 204:
92
+        default:
93
+            return $this->json($data['item'], $data['code']);
94 94
         }
95 95
     }
96 96
 
Please login to merge, or discard this patch.
back/src/KI/UserBundle/Controller/GroupsController.php 1 patch
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@
 block discarded – undo
7 7
 use Nelmio\ApiDocBundle\Annotation\ApiDoc;
8 8
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
9 9
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
10
-use Symfony\Component\Form\Exception\UnexpectedTypeException;
11 10
 use Symfony\Component\DependencyInjection\ContainerInterface;
11
+use Symfony\Component\Form\Exception\UnexpectedTypeException;
12 12
 use Symfony\Component\HttpFoundation\Request;
13 13
 use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
14 14
 use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
Please login to merge, or discard this patch.
back/src/KI/PonthubBundle/Helper/FileHelper.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use Doctrine\ORM\EntityManager;
6 6
 use KI\PonthubBundle\Entity\Episode;
7 7
 use KI\PonthubBundle\Entity\Game;
8
-use KI\PonthubBundle\Entity\Genre;
9 8
 use KI\PonthubBundle\Entity\Movie;
10 9
 use KI\PonthubBundle\Entity\Other;
11 10
 use KI\PonthubBundle\Entity\Serie;
Please login to merge, or discard this patch.
back/src/KI/UserBundle/Service/NotifyService.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -23,6 +23,12 @@
 block discarded – undo
23 23
     }
24 24
 
25 25
     // Persiste des objets notification qui seront retrievables
26
+
27
+    /**
28
+     * @param string $reason
29
+     * @param string $title
30
+     * @param string $message
31
+     */
26 32
     public function notify($reason, $title, $message, $mode = 'to', $recipient = [], $resource = '')
27 33
     {
28 34
         $notification = new Notification($reason, $title, $message, $mode, $resource);
Please login to merge, or discard this patch.