Completed
Push — master ( 9f6f5d...cab025 )
by Julien
67:04 queued 50:07
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/Console/Commands/Email.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     {
30 30
         $email = $this->argument('email');
31 31
         $nom = $this->argument('nom');
32
-        Mail::send('Emails/welcome', [], function ($m) use ($email, $nom) {
32
+        Mail::send('Emails/welcome', [ ], function($m) use ($email, $nom) {
33 33
             $m->from('[email protected]', 'Julien Boyer')
34 34
                 ->to($email, $nom)
35 35
                 ->subject('Welcome to the site ');
Please login to merge, or discard this patch.
app/Http/Cart/CartServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
      */
30 30
     public function register()
31 31
     {
32
-        $this->app->singleton(Cart::class, function ($app) {
32
+        $this->app->singleton(Cart::class, function($app) {
33 33
             return new Cart();
34 34
         });
35 35
     }
Please login to merge, or discard this patch.
app/Console/Commands/LastMovies.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
             $users = $movie->actors();
50 50
             foreach ($users as $user) {
51 51
                 //send an email
52
-                Mail::send('Emails/newsletter', [], function ($m) {
52
+                Mail::send('Emails/newsletter', [ ], function($m) {
53 53
 
54 54
                     $m->from('[email protected]', 'Florent Boyer');
55 55
                     $m->to('[email protected]', 'Boyer Julien')
Please login to merge, or discard this patch.
app/Http/Cart/Cart.php 1 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/Http/Controllers/ApiController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -15,11 +15,11 @@  discard block
 block discarded – undo
15 15
      */
16 16
     public function categories()
17 17
     {
18
-        $tab = [];
18
+        $tab = [ ];
19 19
         $categories = Categories::all();
20 20
 
21 21
         foreach ($categories as $categorie) {
22
-            $tab[] =
22
+            $tab[ ] =
23 23
                 [
24 24
                     $categorie->title,
25 25
                     count($categorie->movies),
@@ -39,11 +39,11 @@  discard block
 block discarded – undo
39 39
 
40 40
         //exit(dump($resultat));
41 41
 
42
-        $tab = [];
42
+        $tab = [ ];
43 43
         foreach ($resultat as $actor) {
44
-            $tab[] = [
44
+            $tab[ ] = [
45 45
                 'name' => $actor->city,
46
-                'data' => [(int) $actor->nb],
46
+                'data' => [ (int) $actor->nb ],
47 47
             ];
48 48
         }
49 49
 
Please login to merge, or discard this patch.
app/Http/Controllers/CommentsController.php 1 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/CartController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function checkout()
58 58
     {
59
-        $ids = session('likes', []);
59
+        $ids = session('likes', [ ]);
60 60
 
61 61
         $total = 0;
62 62
         foreach ($ids as $id) {
@@ -83,12 +83,12 @@  discard block
 block discarded – undo
83 83
         $payment->setIntent('sale');
84 84
         $payment->setPayer($payer);
85 85
         $payment->setRedirectUrls($redirectUrls);
86
-        $payment->setTransactions([$transaction]);
86
+        $payment->setTransactions([ $transaction ]);
87 87
 
88 88
         //response de Paypal
89 89
         $response = $payment->create($this->_apiContext);
90 90
 
91
-        $redirectUrl = $response->links[1]->href;
91
+        $redirectUrl = $response->links[ 1 ]->href;
92 92
 
93 93
         //redirect to Plateform Paypal
94 94
         return Redirect::to($redirectUrl);
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         $executePayment = $payment->execute($paymentExecution, $this->_apiContext);
122 122
 
123 123
         // Clear the shopping cart,
124
-        $request->session()->pull('likes', []);
124
+        $request->session()->pull('likes', [ ]);
125 125
 
126 126
         //write log
127 127
         Log::info('Un client vient de passer uen commande via Paypal'.$payer_id);
Please login to merge, or discard this patch.
app/Http/Controllers/MoviesController.php 1 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.