Completed
Push — master ( a5e162...9f6f5d )
by Julien
64:53 queued 50:47
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 3 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.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,6 @@
 block discarded – undo
4 4
 
5 5
 use App\Http\Models\Administrators;
6 6
 use App\Http\Requests\AdministratorsRequest;
7
-use Illuminate\Http\Request;
8 7
 use Illuminate\Support\Facades\Auth;
9 8
 use Illuminate\Support\Facades\Redirect;
10 9
 use Illuminate\Support\Facades\Session;
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     public function __construct()
65 65
     {
66 66
         // application du middleware guest
67
-        $this->middleware('guest', ['except' => 'logout']);
67
+        $this->middleware('guest', [ 'except' => 'logout' ]);
68 68
     }
69 69
 
70 70
     /**
@@ -93,9 +93,9 @@  discard block
 block discarded – undo
93 93
     protected function create(array $data)
94 94
     {
95 95
         return Administrators::create([
96
-            'name'     => $data['name'],
97
-            'email'    => $data['email'],
98
-            'password' => bcrypt($data['password']),
96
+            'name'     => $data[ 'name' ],
97
+            'email'    => $data[ 'email' ],
98
+            'password' => bcrypt($data[ 'password' ]),
99 99
         ]);
100 100
     }
101 101
 
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/Controllers/MainController.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
8 8
 use App\Http\Models\User;
9 9
 use Illuminate\Http\Request;
10 10
 use Illuminate\Support\Facades\Validator;
11
-use Netshell\Paypal\Facades\Paypal;
12 11
 
13 12
 
14 13
 /**
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
     public function ajaxmovies(Request $request)
37 37
     {
38 38
         $validator = Validator::make(
39
-            $request->all(),  //request all : tous les elements de requetses
39
+            $request->all(), //request all : tous les elements de requetses
40 40
             [
41 41
             'title' => 'required|min:10',
42 42
             ], [
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         $executePayment = $payment->execute($paymentExecution, $this->_apiContext);
78 78
 
79 79
         // Clear the shopping cart, write to database, send notifications, etc.
80
-        $request->session()->pull('likes', []);
80
+        $request->session()->pull('likes', [ ]);
81 81
 
82 82
         return view('Main/index');
83 83
     }
@@ -97,10 +97,10 @@  discard block
 block discarded – undo
97 97
         $videos = collect($collection->find()->toArray())->shuffle();
98 98
 
99 99
         $collection = new \MongoDB\Collection($manager, 'laravel', 'stats');
100
-        $youtubeinfo = collect($collection->find(['origin' => 'Youtube'])->toArray())->first();
100
+        $youtubeinfo = collect($collection->find([ 'origin' => 'Youtube' ])->toArray())->first();
101 101
 
102 102
         $collection = new \MongoDB\Collection($manager, 'laravel', 'stats');
103
-        $tweeterinfo = collect($collection->find(['origin' => 'Twitter', 'type' => 'infos'])->toArray())->first();
103
+        $tweeterinfo = collect($collection->find([ 'origin' => 'Twitter', 'type' => 'infos' ])->toArray())->first();
104 104
 
105 105
         $actor = new Actors(); // Je récpere mon modèle
106 106
         $comment = new Comments(); // Je récpere mon modèle
@@ -121,11 +121,11 @@  discard block
 block discarded – undo
121 121
             'avgnotepresse'          => $avgnotepresse->avgpress,
122 122
             'avgacteurs'             => $avgacteurs->age,
123 123
             'videos'                 => $videos,
124
-            'video'                  => $videos[0],
124
+            'video'                  => $videos[ 0 ],
125 125
             'youtubeinfo'            => $youtubeinfo->data,
126
-            'tweeterinfo'            => $tweeterinfo['data'][0],
126
+            'tweeterinfo'            => $tweeterinfo[ 'data' ][ 0 ],
127 127
             'youtubeinfodateupdated' => $youtubeinfo->created,
128
-            'tweeterinfodateupdated' => $tweeterinfo['created_at'],
128
+            'tweeterinfodateupdated' => $tweeterinfo[ 'created_at' ],
129 129
             'avghour'                => $avghour->avghour,
130 130
             'nbacteurs'              => $nbacteurs,
131 131
             'nbcommentaires'         => $nbcommentaires,
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.