Completed
Push — master ( 5c637a...214bce )
by Julien
03:47
created
app/Http/Cart/AbstractCart.php 2 patches
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.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
  * Class Cart
7 7
  * @package App\Http\Cart
8 8
  */
9
-abstract class AbstractCart{
9
+abstract class AbstractCart {
10 10
 
11 11
 
12 12
     /**
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   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -28,9 +28,9 @@  discard block
 block discarded – undo
28 28
     /**
29 29
      * Constructor
30 30
      */
31
-    public function __construct(Array $products = []){
31
+    public function __construct(Array $products = [ ]) {
32 32
         $this->products = $products;
33
-        $this->promotions = [];
33
+        $this->promotions = [ ];
34 34
         $this->total = 0;
35 35
     }
36 36
 
@@ -38,17 +38,17 @@  discard block
 block discarded – undo
38 38
     /**
39 39
      * @param ItemInterface $item
40 40
      */
41
-    public function add(ItemInterface $item){
42
-        $this->products[] = $item;
41
+    public function add(ItemInterface $item) {
42
+        $this->products[ ] = $item;
43 43
 
44 44
         return $this;
45 45
     }
46 46
     /**
47 47
      * @param ItemInterface $item
48 48
      */
49
-    public function addItems(Collection $collection){
50
-        foreach($collection as $item){
51
-            $this->products[] = $item;
49
+    public function addItems(Collection $collection) {
50
+        foreach ($collection as $item) {
51
+            $this->products[ ] = $item;
52 52
         }
53 53
         return $this->products;
54 54
     }
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
     /**
57 57
      * @param ItemInterface $item
58 58
      */
59
-    public function remove(ItemInterface $item){
60
-        $this->products[array_search($item,$this->products)] = $item;
59
+    public function remove(ItemInterface $item) {
60
+        $this->products[ array_search($item, $this->products) ] = $item;
61 61
 
62 62
         return $this;
63 63
     }
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     public function clear()
70 70
     {
71
-        $this->products = [];
71
+        $this->products = [ ];
72 72
 
73 73
         return $this->products;
74 74
     }
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     /**
77 77
      * @return array
78 78
      */
79
-    public function all(){
79
+    public function all() {
80 80
 
81 81
         return $this->products;
82 82
     }
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
      */
106 106
     public function total($taxe = 1)
107 107
     {
108
-        foreach($this as $movie){
108
+        foreach ($this as $movie) {
109 109
             $this->total += $movie->getMovie()->prix;
110 110
         }
111 111
 
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.
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/Console/Commands/Twitter.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -41,11 +41,11 @@  discard block
 block discarded – undo
41 41
     public function handle()
42 42
     {
43 43
 
44
-        $infos = \Thujohn\Twitter\Facades\Twitter::getUsersLookup(['screen_name' => 'Symfomany','format' => 'php']);
44
+        $infos = \Thujohn\Twitter\Facades\Twitter::getUsersLookup([ 'screen_name' => 'Symfomany', 'format' => 'php' ]);
45 45
 
46
-        if(!empty($infos)){
46
+        if (!empty($infos)) {
47 47
             DB::connection('mongodb')->collection('stats')
48
-                ->where(['origin' => 'Twitter', 'type' => 'infos'])->delete();
48
+                ->where([ 'origin' => 'Twitter', 'type' => 'infos' ])->delete();
49 49
 
50 50
             $stat = new Stats();
51 51
             $stat->origin = "Twitter";
@@ -55,13 +55,13 @@  discard block
 block discarded – undo
55 55
         }
56 56
 
57 57
 
58
-        $tweets = \Thujohn\Twitter\Facades\Twitter::getDmsOut(['format' => 'php']);
59
-        if(!empty($tweets)){
58
+        $tweets = \Thujohn\Twitter\Facades\Twitter::getDmsOut([ 'format' => 'php' ]);
59
+        if (!empty($tweets)) {
60 60
 
61 61
             DB::connection('mongodb')->collection('tweets')
62
-                ->where(['origin' => 'Twitter', 'type' => 'dmsout'])
62
+                ->where([ 'origin' => 'Twitter', 'type' => 'dmsout' ])
63 63
                 ->delete();
64
-            foreach($tweets as $tweet){
64
+            foreach ($tweets as $tweet) {
65 65
                 $vi = new Tweets();
66 66
                 $vi->origin = "Twitter";
67 67
                 $vi->type = "dmsout";
@@ -70,13 +70,13 @@  discard block
 block discarded – undo
70 70
             }
71 71
         }
72 72
 
73
-        $tweets = \Thujohn\Twitter\Facades\Twitter::getFavorites(['format' => 'php']);
74
-        if(!empty($tweets)){
73
+        $tweets = \Thujohn\Twitter\Facades\Twitter::getFavorites([ 'format' => 'php' ]);
74
+        if (!empty($tweets)) {
75 75
 
76 76
             DB::connection('mongodb')->collection('tweets')
77
-                ->where(['origin' => 'Twitter', 'type' => 'favorites'])
77
+                ->where([ 'origin' => 'Twitter', 'type' => 'favorites' ])
78 78
                 ->delete();
79
-            foreach($tweets as $tweet){
79
+            foreach ($tweets as $tweet) {
80 80
                 $vi = new Tweets();
81 81
                 $vi->origin = "Twitter";
82 82
                 $vi->type = "favorites";
@@ -88,14 +88,14 @@  discard block
 block discarded – undo
88 88
         $tweets = \Thujohn\Twitter\Facades\Twitter::getMentionsTimeline(
89 89
             [
90 90
                 'count' => 15,
91
-                'format' => 'php']);
91
+                'format' => 'php' ]);
92 92
 
93
-        if(!empty($tweets)){
93
+        if (!empty($tweets)) {
94 94
 
95 95
             DB::connection('mongodb')->collection('tweets')
96
-                ->where(['origin' => 'Twitter', 'type' => 'mentionstimeline'])
96
+                ->where([ 'origin' => 'Twitter', 'type' => 'mentionstimeline' ])
97 97
                 ->delete();
98
-            foreach($tweets as $tweet){
98
+            foreach ($tweets as $tweet) {
99 99
                 $vi = new Tweets();
100 100
                 $vi->origin = "Twitter";
101 101
                 $vi->type = "mentionstimeline";
@@ -107,14 +107,14 @@  discard block
 block discarded – undo
107 107
         $tweets = \Thujohn\Twitter\Facades\Twitter::getHomeTimeline(
108 108
             [
109 109
                 'count' => 15,
110
-                'format' => 'php']);
110
+                'format' => 'php' ]);
111 111
 
112
-        if(!empty($tweets)){
112
+        if (!empty($tweets)) {
113 113
 
114 114
             DB::connection('mongodb')->collection('tweets')
115
-                ->where(['origin' => 'Twitter', 'type' => 'hometimeline'])
115
+                ->where([ 'origin' => 'Twitter', 'type' => 'hometimeline' ])
116 116
                 ->delete();
117
-            foreach($tweets as $tweet){
117
+            foreach ($tweets as $tweet) {
118 118
                 $vi = new Tweets();
119 119
                 $vi->data = $tweet;
120 120
                 $vi->origin = "Twitter";
@@ -127,14 +127,14 @@  discard block
 block discarded – undo
127 127
             [
128 128
                 'screen_name' => 'allocine',
129 129
                 'count' => 15,
130
-                'format' => 'php']);
130
+                'format' => 'php' ]);
131 131
 
132
-        if(!empty($tweets)){
132
+        if (!empty($tweets)) {
133 133
 
134 134
             DB::connection('mongodb')->collection('tweets')
135
-                ->where(['origin' => 'Twitter', 'type' => 'usertimeline'])
135
+                ->where([ 'origin' => 'Twitter', 'type' => 'usertimeline' ])
136 136
                 ->delete();
137
-            foreach($tweets as $tweet){
137
+            foreach ($tweets as $tweet) {
138 138
                 $vi = new Tweets();
139 139
                 $vi->data = $tweet;
140 140
                 $vi->origin = "Twitter";
Please login to merge, or discard this patch.
app/Console/Commands/Youtube.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 
49 49
         $channel = Yt::getChannelByName('allocine');
50 50
 
51
-        if(!empty($channel)) {
51
+        if (!empty($channel)) {
52 52
             DB::connection('mongodb')->collection('stats')
53
-                ->where(['origin' => 'Youtube', 'type' => 'infos'])->delete();
53
+                ->where([ 'origin' => 'Youtube', 'type' => 'infos' ])->delete();
54 54
 
55 55
             $stat = new Stats();
56 56
             $stat->origin = "Youtube";
@@ -66,12 +66,12 @@  discard block
 block discarded – undo
66 66
             'maxResults'    => 30
67 67
         );
68 68
 
69
-        $videos = Yt::searchAdvanced($params, true)['results'];
69
+        $videos = Yt::searchAdvanced($params, true)[ 'results' ];
70 70
 
71
-        if(!empty($videos)){
71
+        if (!empty($videos)) {
72 72
 
73 73
             DB::connection('mongodb')->collection('videos')->delete();
74
-            foreach($videos as $video){
74
+            foreach ($videos as $video) {
75 75
                 $vi = new Videos();
76 76
                 $vi->data = $video;
77 77
                 $vi->save();
Please login to merge, or discard this patch.
app/Http/Controllers/DirectorsController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -10,12 +10,12 @@  discard block
 block discarded – undo
10 10
  * Sufficé par le mot clef Controller
11 11
  * et doit hérité de la super classe Controller
12 12
  */
13
-class DirectorsController extends Controller{
13
+class DirectorsController extends Controller {
14 14
 
15 15
     /**
16 16
      * Page Acceuil
17 17
      */
18
-    public function index(){
18
+    public function index() {
19 19
 
20 20
         // vue
21 21
         return view('Directors/index');
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
     /**
27 27
      * Page Acceuil
28 28
      */
29
-    public function create(){
29
+    public function create() {
30 30
 
31 31
         // vue
32 32
         return view('Directors/create');
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     /**
36 36
      * Page Acceuil
37 37
      */
38
-    public function edit($id){
38
+    public function edit($id) {
39 39
 
40 40
         // vue
41 41
         return view('Directors/edit');
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     /**
45 45
      * Page Acceuil
46 46
      */
47
-    public function read($id){
47
+    public function read($id) {
48 48
 
49 49
         // vue
50 50
         return view('Directors/read');
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     /**
54 54
      * Page Acceuil
55 55
      */
56
-    public function delete($id){
56
+    public function delete($id) {
57 57
 
58 58
     }
59 59
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      * Classe Request permet de réceptionner les données
65 65
      * en POST de manières scurisés
66 66
      */
67
-    public function store(Request $request){
67
+    public function store(Request $request) {
68 68
 
69 69
 
70 70
     }
Please login to merge, or discard this patch.
app/Http/Controllers/ActorsController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -10,13 +10,13 @@  discard block
 block discarded – undo
10 10
  * Sufficé par le mot clef Controller
11 11
  * et doit hérité de la super classe Controller
12 12
  */
13
-class ActorsController extends Controller{
13
+class ActorsController extends Controller {
14 14
 
15 15
 
16 16
     /**
17 17
      * Page Acceuil
18 18
      */
19
-    public function index(){
19
+    public function index() {
20 20
 
21 21
         $actors = Actors::all();
22 22
         // vue
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
     /**
30 30
      * Page Acceuil
31 31
      */
32
-    public function read($id){
32
+    public function read($id) {
33 33
 
34 34
         // vue
35 35
         return view('Actors/read');
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     /**
39 39
      * Page Acceuil
40 40
      */
41
-    public function create(){
41
+    public function create() {
42 42
 
43 43
         // vue
44 44
         return view('Actors/create');
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     /**
48 48
      * Page Acceuil
49 49
      */
50
-    public function edit($id){
50
+    public function edit($id) {
51 51
 
52 52
         // vue
53 53
         return view('Actors/edit');
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     /**
57 57
      * Page Acceuil
58 58
      */
59
-    public function delete($id){
59
+    public function delete($id) {
60 60
 
61 61
     }
62 62
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      * Classe Request permet de réceptionner les données
68 68
      * en POST de manières scurisés
69 69
      */
70
-    public function store(Request $request){
70
+    public function store(Request $request) {
71 71
 
72 72
 
73 73
     }
Please login to merge, or discard this patch.
app/Http/Controllers/CartController.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
  * Class CartController
14 14
  * To handle checkout
15 15
  */
16
-class CartController extends Controller{
16
+class CartController extends Controller {
17 17
 
18 18
 
19 19
     /**
@@ -56,12 +56,12 @@  discard block
 block discarded – undo
56 56
     /**
57 57
      * Payments
58 58
      */
59
-    public function checkout(){
59
+    public function checkout() {
60 60
 
61
-        $ids = session('likes', []);
61
+        $ids = session('likes', [ ]);
62 62
 
63 63
         $total = 0;
64
-        foreach($ids as $id){
64
+        foreach ($ids as $id) {
65 65
             $movie = Movies::find($id);
66 66
             $total = $total + $movie->price;
67 67
         }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
         $transaction = PayPal::Transaction();
77 77
         $transaction->setAmount($amount);
78
-        $transaction->setDescription("Récapitulatif total des ".count($ids). " films commandés");
78
+        $transaction->setDescription("Récapitulatif total des ".count($ids)." films commandés");
79 79
 
80 80
         $redirectUrls = PayPal::RedirectUrls();
81 81
         $redirectUrls->setReturnUrl(route('cart_done'));
@@ -90,10 +90,10 @@  discard block
 block discarded – undo
90 90
         //response de Paypal
91 91
         $response = $payment->create($this->_apiContext);
92 92
 
93
-        $redirectUrl = $response->links[1]->href;
93
+        $redirectUrl = $response->links[ 1 ]->href;
94 94
 
95 95
         //redirect to Plateform Paypal
96
-        return Redirect::to( $redirectUrl);
96
+        return Redirect::to($redirectUrl);
97 97
 
98 98
 
99 99
 
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     /**
105 105
      * Payments Récapitilatif
106 106
      */
107
-    public function recapitulatif(){
107
+    public function recapitulatif() {
108 108
 
109 109
         return view("Cart/recapitulatif");
110 110
     }
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
     /**
113 113
      * Done
114 114
      */
115
-    public function done(Request $request){
115
+    public function done(Request $request) {
116 116
 
117 117
         //je recupere les informations de retour de Paypal
118 118
         $id = $request->get('paymentId');
@@ -127,10 +127,10 @@  discard block
 block discarded – undo
127 127
         $executePayment = $payment->execute($paymentExecution, $this->_apiContext);
128 128
 
129 129
         // Clear the shopping cart,
130
-        $request->session()->pull('likes', []);
130
+        $request->session()->pull('likes', [ ]);
131 131
 
132 132
         //write log
133
-        Log::info("Un client vient de passer uen commande via Paypal" . $payer_id);
133
+        Log::info("Un client vient de passer uen commande via Paypal".$payer_id);
134 134
 
135 135
 
136 136
         // Write database
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
     /**
148 148
      * Cancel
149 149
      */
150
-    public function cancel(){
150
+    public function cancel() {
151 151
 
152 152
     }
153 153
 
Please login to merge, or discard this patch.