Completed
Push — master ( 113a8a...459c7d )
by Luke
02:16
created
src/LaraCart.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -471,7 +471,7 @@
 block discarded – undo
471 471
     /**
472 472
      * Gets the total amount discounted
473 473
      *
474
-     * @param bool|true $format
474
+     * @param boolean $format
475 475
      *
476 476
      * @return int|string
477 477
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -568,7 +568,7 @@
 block discarded – undo
568 568
         $total = 0;
569 569
 
570 570
         foreach ($this->cart->coupons as $coupon) {
571
-            if($coupon->appliedToCart) {
571
+            if ($coupon->appliedToCart) {
572 572
                 $total += $coupon->discount();
573 573
             }
574 574
         }
Please login to merge, or discard this patch.
src/LaraCartServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,21 +37,21 @@
 block discarded – undo
37 37
      */
38 38
     public function register()
39 39
     {
40
-        $this->app->singleton(LaraCart::SERVICE, function ($app) {
40
+        $this->app->singleton(LaraCart::SERVICE, function($app) {
41 41
                 return new LaraCart($app['session'], $app['events']);
42 42
             }
43 43
         );
44 44
 
45 45
         $this->app->bind(
46 46
             LaraCart::HASH,
47
-            function ($app, $data) {
47
+            function($app, $data) {
48 48
                 return md5(json_encode($data));
49 49
             }
50 50
         );
51 51
 
52 52
         $this->app->bind(
53 53
             LaraCart::RANHASH,
54
-            function () {
54
+            function() {
55 55
                 return str_random(40);
56 56
             }
57 57
         );
Please login to merge, or discard this patch.
src/CartItem.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -230,7 +230,7 @@
 block discarded – undo
230 230
      */
231 231
     public function setModel($itemModel)
232 232
     {
233
-        if(!class_exists($itemModel)) {
233
+        if (!class_exists($itemModel)) {
234 234
             throw new ModelNotFound();
235 235
         }
236 236
         $this->itemModel = $itemModel;
Please login to merge, or discard this patch.
src/Traits/CouponTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@
 block discarded – undo
127 127
      */
128 128
     public function setDiscountOnItem(CartItem $item, $discountAmount)
129 129
     {
130
-        if(!is_numeric($discountAmount)) {
130
+        if (!is_numeric($discountAmount)) {
131 131
             throw new InvalidPrice('You must use a discount amount.');
132 132
         }
133 133
         $this->appliedToCart = false;
Please login to merge, or discard this patch.