Completed
Pull Request — master (#33)
by Luke
07:50 queued 02:45
created
src/LaraCartServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
         );
26 26
 
27 27
         $this->mergeConfigFrom(
28
-            __DIR__.'/config/laracart.php', 'laracart'
28
+            __DIR__ . '/config/laracart.php', 'laracart'
29 29
         );
30 30
     }
31 31
 
Please login to merge, or discard this patch.
src/Traits/CouponTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
             return true;
53 53
         } else {
54 54
             if ($throwErrors) {
55
-                throw new \Exception('You must have at least a total of '.LaraCart::formatMoney($minAmount));
55
+                throw new \Exception('You must have at least a total of ' . LaraCart::formatMoney($minAmount));
56 56
             } else {
57 57
                 return false;
58 58
             }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
             return $discount;
76 76
         } else {
77 77
             if ($throwErrors) {
78
-                throw new \Exception('This has a max discount of '.LaraCart::formatMoney($maxDiscount));
78
+                throw new \Exception('This has a max discount of ' . LaraCart::formatMoney($maxDiscount));
79 79
             } else {
80 80
                 return $maxDiscount;
81 81
             }
Please login to merge, or discard this patch.
src/LaraCart.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -467,9 +467,9 @@
 block discarded – undo
467 467
     /**
468 468
      * Gets the total amount discounted
469 469
      *
470
-     * @param bool|true $format
470
+     * @param boolean $format
471 471
      *
472
-     * @return int|string
472
+     * @return string
473 473
      */
474 474
     public function totalDiscount($format = true)
475 475
     {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function get($instance = 'default')
57 57
     {
58
-        if (empty($this->cart = \Session::get(config('laracart.cache_prefix', 'laracart').'.'.$instance))) {
58
+        if (empty($this->cart = \Session::get(config('laracart.cache_prefix', 'laracart') . '.' . $instance))) {
59 59
             $this->cart = new Cart($instance);
60 60
         }
61 61
 
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
      */
68 68
     public function update()
69 69
     {
70
-        \Session::set(config('laracart.cache_prefix', 'laracart').'.'.$this->cart->instance, $this->cart);
70
+        \Session::set(config('laracart.cache_prefix', 'laracart') . '.' . $this->cart->instance, $this->cart);
71 71
 
72 72
         \Event::fire('laracart.update', $this->cart);
73 73
     }
@@ -372,7 +372,7 @@  discard block
 block discarded – undo
372 372
      */
373 373
     public function addCoupon(CouponContract $coupon)
374 374
     {
375
-        if(!$this->cart->multipleCoupons) {
375
+        if (!$this->cart->multipleCoupons) {
376 376
             $this->cart->coupons = [];
377 377
         }
378 378
 
@@ -388,8 +388,8 @@  discard block
 block discarded – undo
388 388
      */
389 389
     public function removeCoupon($code)
390 390
     {
391
-        foreach($this->getItems() as $item) {
392
-            if(isset($item->code) && $item->code == $code) {
391
+        foreach ($this->getItems() as $item) {
392
+            if (isset($item->code) && $item->code == $code) {
393 393
                 $item->code = null;
394 394
                 $item->discount = null;
395 395
                 $item->couponInfo = null;
Please login to merge, or discard this patch.