Completed
Push — master ( 5fb8f3...d597e6 )
by Julien
11:19
created
app/Providers/RouteServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
      */
38 38
     public function map(Router $router)
39 39
     {
40
-        $router->group(['namespace' => $this->namespace], function ($router) {
40
+        $router->group([ 'namespace' => $this->namespace ], function($router) {
41 41
             require app_path('Http/routes.php');
42 42
         });
43 43
     }
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/AuthController.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
      * Create a new user instance after a valid registration.
80 80
      *
81 81
      * @param  array  $data
82
-     * @return User
82
+     * @return Administrators
83 83
      */
84 84
     protected function create(array $data)
85 85
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         //exit('coucou');
64 64
 
65 65
         // application du middleware guest
66
-        $this->middleware('guest', ['except' => 'getLogout']);
66
+        $this->middleware('guest', [ 'except' => 'getLogout' ]);
67 67
     }
68 68
 
69 69
     /**
@@ -90,9 +90,9 @@  discard block
 block discarded – undo
90 90
     protected function create(array $data)
91 91
     {
92 92
         return Administrators::create([
93
-            'name' => $data['name'],
94
-            'email' => $data['email'],
95
-            'password' => bcrypt($data['password']),
93
+            'name' => $data[ 'name' ],
94
+            'email' => $data[ 'email' ],
95
+            'password' => bcrypt($data[ 'password' ]),
96 96
         ]);
97 97
     }
98 98
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public function getLogin()
104 104
     {
105
-        return view('Auth/login', ['errors' => []]);
105
+        return view('Auth/login', [ 'errors' => [ ] ]);
106 106
     }
107 107
 
108 108
 
Please login to merge, or discard this patch.
app/Http/Controllers/CommentsController.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
     /**
71 71
      * Pour la suppression, il n'y a pas de vue dédiée.
72 72
      * On redirige donc vers l'index.
73
-     * @return \Illuminate\View\View
73
+     * @return \Illuminate\Http\RedirectResponse
74 74
      */
75 75
     public function delete($id)
76 76
     {
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */
37 37
     public function read($id)
38 38
     {
39
-        return view('Comments/read', ['id' => $id]);
39
+        return view('Comments/read', [ 'id' => $id ]);
40 40
     }
41 41
 
42 42
     /**
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
         $value = $request->value;
51 51
 
52 52
         $comment = Comments::find($id);
53
-        $comment->update([$field => $value]);
53
+        $comment->update([ $field => $value ]);
54 54
 //        Session::flash('success', "Le commentaire a bien été mis à jour");
55 55
 //        return Redirect::route('comments.index');
56 56
     }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function delete($id)
65 65
     {
66
-        return redirect('/comments', ['id' => $id]);
66
+        return redirect('/comments', [ 'id' => $id ]);
67 67
     }
68 68
 
69 69
     public function search()
@@ -76,12 +76,12 @@  discard block
 block discarded – undo
76 76
         $id = $request->input('id');
77 77
         $action = $request->input('action');
78 78
         // Récupération en session de l'item "favoris"
79
-        $liked = session('commentsFavoris', []);
79
+        $liked = session('commentsFavoris', [ ]);
80 80
 
81 81
         if ($action == 'add') {
82 82
 
83 83
             // Enregistrement en variable de l'id souhaité
84
-            $liked[] = $id;
84
+            $liked[ ] = $id;
85 85
             // Stockage de cette variable de la session
86 86
             Session::put('commentsFavoris', $liked);
87 87
         } else {
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             // On cherche la position de l'id dans le tableau
90 90
             $position = array_search($id, $liked);
91 91
             // On supprime l'élément grâce à sa position
92
-            unset($liked[$position]);
92
+            unset($liked[ $position ]);
93 93
 
94 94
             // Stockage de cette variable de la session
95 95
             Session::put('commentsFavoris', $liked);
Please login to merge, or discard this patch.
app/Http/Controllers/MoviesController.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -148,7 +148,6 @@
 block discarded – undo
148 148
 
149 149
     /**
150 150
      * Fonction de like des films, enregistré en session
151
-     * @param Request $request
152 151
      */
153 152
     public function like($id, $action)
154 153
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -146,19 +146,19 @@  discard block
 block discarded – undo
146 146
     {
147 147
         $movie = Movies::find($id);
148 148
 
149
-        $likes = session('likes', []);
149
+        $likes = session('likes', [ ]);
150 150
 
151 151
         // si l'action est "like"
152 152
         if ($action == 'like') {
153 153
 
154 154
             // J'ajoute mon movie dans le tableaux des likes en session
155
-            $likes[$id] = $movie->id;
155
+            $likes[ $id ] = $movie->id;
156 156
             Session::flash('danger', "Le film {$movie->title} a bien été liké");
157 157
         } else {
158 158
 
159 159
             // je supprime le like dans le tableaux des likes
160 160
             // unset() supprimer un element dans un tableau en PHP
161
-            unset($likes[$id]);
161
+            unset($likes[ $id ]);
162 162
 
163 163
             Session::flash('success', "Le film {$movie->title} a bien été disliké");
164 164
         }
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
             foreach ($actors as $actor) {
208 208
                 DB::table('actors_movies')
209 209
                     ->insert([
210
-                        ['movies_id' => $movie->id, 'actors_id' => $actor],
210
+                        [ 'movies_id' => $movie->id, 'actors_id' => $actor ],
211 211
                     ]);
212 212
             }
213 213
         }
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
             foreach ($directors as $director) {
218 218
                 DB::table('directors_movies')
219 219
                     ->insert([
220
-                        ['movies_id' => $movie->id, 'directors_id' => $director],
220
+                        [ 'movies_id' => $movie->id, 'directors_id' => $director ],
221 221
                     ]);
222 222
             }
223 223
         }
Please login to merge, or discard this patch.
app/Http/Controllers/AdministratorsController.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -90,7 +90,7 @@
 block discarded – undo
90 90
 
91 91
         $administrator->save();
92 92
 
93
-       // Auth::login($administrator); => Autologin
93
+        // Auth::login($administrator); => Autologin
94 94
         Session::flash('success', "L'administrateur {$administrator->email} a bien été crée");
95 95
         return Redirect::route('administrators_index');
96 96
 
Please login to merge, or discard this patch.
app/Http/Models/Actors.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
         //1ere methode: Utilisation de MYSQL
38 38
         // marche mais n'est peu souple
39
-         /*
39
+            /*
40 40
           * $results = DB::select('
41 41
             SELECT ROUND(AVG(TIMESTAMPDIFF(YEAR,dob, NOW()))) as age
42 42
             FROM actors
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
 
60 60
         // MAITRISE
61 61
 
62
-          $results = DB::table('actors')
62
+            $results = DB::table('actors')
63 63
             ->select(DB::raw('ROUND(AVG(TIMESTAMPDIFF(YEAR,dob, NOW()))) as age'))
64 64
             ->first();
65 65
 
Please login to merge, or discard this patch.
app/Http/Cart/AbstractCart.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,6 @@
 block discarded – undo
37 37
     abstract public function count();
38 38
 
39 39
     /**
40
-     * @param array $total
41 40
      */
42 41
     abstract public function emptycart();
43 42
 
Please login to merge, or discard this patch.
app/Http/Cart/Cart.php 2 patches
Doc Comments   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -44,7 +44,6 @@  discard block
 block discarded – undo
44 44
         return $this;
45 45
     }
46 46
     /**
47
-     * @param ItemInterface $item
48 47
      */
49 48
     public function addItems(Collection $collection){
50 49
         foreach($collection as $item){
@@ -90,7 +89,7 @@  discard block
 block discarded – undo
90 89
     }
91 90
 
92 91
     /**
93
-     * @return \ArrayIterator
92
+     * @return integer
94 93
      */
95 94
     public function count()
96 95
     {
@@ -162,7 +161,6 @@  discard block
 block discarded – undo
162 161
 
163 162
 
164 163
     /**
165
-     * @param array $total
166 164
      */
167 165
     public function emptycart()
168 166
     {
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
     /**
28 28
      * Constructor.
29 29
      */
30
-    public function __construct(array $products = [])
30
+    public function __construct(array $products = [ ])
31 31
     {
32 32
         $this->products = $products;
33
-        $this->promotions = [];
33
+        $this->promotions = [ ];
34 34
         $this->total = 0;
35 35
     }
36 36
 
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function add(ItemInterface $item)
41 41
     {
42
-        $this->products[] = $item;
42
+        $this->products[ ] = $item;
43 43
 
44 44
         return $this;
45 45
     }
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     public function addItems(Collection $collection)
51 51
     {
52 52
         foreach ($collection as $item) {
53
-            $this->products[] = $item;
53
+            $this->products[ ] = $item;
54 54
         }
55 55
 
56 56
         return $this->products;
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function remove(ItemInterface $item)
63 63
     {
64
-        $this->products[array_search($item, $this->products)] = $item;
64
+        $this->products[ array_search($item, $this->products) ] = $item;
65 65
 
66 66
         return $this;
67 67
     }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function clear()
73 73
     {
74
-        $this->products = [];
74
+        $this->products = [ ];
75 75
 
76 76
         return $this->products;
77 77
     }
Please login to merge, or discard this patch.
app/Console/Kernel.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,6 +33,6 @@
 block discarded – undo
33 33
     protected function schedule(Schedule $schedule)
34 34
     {
35 35
         $schedule->command('email:send [email protected] Boyer')
36
-                 ->everyMinute();
36
+                    ->everyMinute();
37 37
     }
38 38
 }
Please login to merge, or discard this patch.