Passed
Push — master ( 4a884d...c9d1fc )
by Jeff
12:14
created
app/Http/Controllers/Admin/Customers/CustomerController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
             $list = $this->customerRepo->searchCustomer(request()->input('q'));
42 42
         }
43 43
 
44
-        $customers = $list->map(function (Customer $customer) {
44
+        $customers = $list->map(function(Customer $customer) {
45 45
             return $this->transformCustomer($customer);
46 46
         })->all();
47 47
 
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/Orders/OrderController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@
 block discarded – undo
116 116
         $customerRepo = new CustomerRepository(new Customer());
117 117
         $orderStatusRepo = new OrderStatusRepository(new OrderStatus());
118 118
 
119
-        return $list->transform(function (Order $order) use ($courierRepo, $customerRepo, $orderStatusRepo) {
119
+        return $list->transform(function(Order $order) use ($courierRepo, $customerRepo, $orderStatusRepo) {
120 120
             $order->courier = $courierRepo->findCourierById($order->courier_id);
121 121
             $order->customer = $customerRepo->findCustomerById($order->customer_id);
122 122
             $order->status = $orderStatusRepo->findOrderStatusById($order->order_status_id);
Please login to merge, or discard this patch.
app/Shop/Products/Repositories/ProductRepository.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
      */
199 199
     public function saveProductImages(Collection $collection, Product $product)
200 200
     {
201
-        $collection->each(function (UploadedFile $file) use ($product) {
201
+        $collection->each(function(UploadedFile $file) use ($product) {
202 202
             $filename = $file->store('products', ['disk' => 'public']);
203 203
             $productImage = new ProductImage([
204 204
                 'product_id' => $product->id,
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
      */
248 248
     public function saveCombination(ProductAttribute $productAttribute, AttributeValue ...$attributeValues) : Collection
249 249
     {
250
-        return collect($attributeValues)->each(function (AttributeValue $value) use ($productAttribute) {
250
+        return collect($attributeValues)->each(function(AttributeValue $value) use ($productAttribute) {
251 251
             return $productAttribute->attributesValues()->save($value);
252 252
         });
253 253
     }
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
      */
258 258
     public function listCombinations() : Collection
259 259
     {
260
-        return $this->model->attributes()->map(function (ProductAttribute $productAttribute) {
260
+        return $this->model->attributes()->map(function(ProductAttribute $productAttribute) {
261 261
             return $productAttribute->attributesValues;
262 262
         });
263 263
     }
@@ -270,11 +270,11 @@  discard block
 block discarded – undo
270 270
     {
271 271
         $values = $productAttribute->attributesValues()->get();
272 272
 
273
-        return $values->map(function (AttributeValue $attributeValue) {
273
+        return $values->map(function(AttributeValue $attributeValue) {
274 274
             return $attributeValue;
275
-        })->keyBy(function (AttributeValue $item) {
275
+        })->keyBy(function(AttributeValue $item) {
276 276
             return strtolower($item->attribute->name);
277
-        })->transform(function (AttributeValue $value) {
277
+        })->transform(function(AttributeValue $value) {
278 278
             return $value->value;
279 279
         });
280 280
     }
Please login to merge, or discard this patch.
app/Shop/Carts/ShoppingCart.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     {
46 46
         $content = $this->getContent();
47 47
 
48
-        $total = $content->reduce(function ($total, CartItem $cartItem) {
48
+        $total = $content->reduce(function($total, CartItem $cartItem) {
49 49
             return $total + ($cartItem->qty * $cartItem->priceTax);
50 50
         }, 0);
51 51
 
Please login to merge, or discard this patch.
app/Providers/RouteServiceProvider.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,8 +52,8 @@  discard block
 block discarded – undo
52 52
     protected function mapWebRoutes()
53 53
     {
54 54
         Route::middleware('web')
55
-             ->namespace($this->namespace)
56
-             ->group(base_path('routes/web.php'));
55
+                ->namespace($this->namespace)
56
+                ->group(base_path('routes/web.php'));
57 57
     }
58 58
 
59 59
     /**
@@ -66,8 +66,8 @@  discard block
 block discarded – undo
66 66
     protected function mapApiRoutes()
67 67
     {
68 68
         Route::prefix('api')
69
-             ->middleware('api')
70
-             ->namespace($this->namespace)
71
-             ->group(base_path('routes/api.php'));
69
+                ->middleware('api')
70
+                ->namespace($this->namespace)
71
+                ->group(base_path('routes/api.php'));
72 72
     }
73 73
 }
Please login to merge, or discard this patch.
app/Shop/Orders/Repositories/OrderRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
      */
175 175
     public function listOrderedProducts() : Collection
176 176
     {
177
-        return $this->model->products->map(function (Product $product) {
177
+        return $this->model->products->map(function(Product $product) {
178 178
             $product->name = $product->pivot->product_name;
179 179
             $product->sku = $product->pivot->product_sku;
180 180
             $product->description = $product->pivot->product_description;
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
      */
190 190
     public function buildOrderDetails(Collection $items)
191 191
     {
192
-        $items->each(function ($item) {
192
+        $items->each(function($item) {
193 193
             $productRepo = new ProductRepository(new Product);
194 194
             $product = $productRepo->find($item->id);
195 195
             $this->associateProduct($product, $item->qty);
Please login to merge, or discard this patch.
app/Shop/Carts/Repositories/CartRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@
 block discarded – undo
166 166
      */
167 167
     public function getCartItemsTransformed() : Collection
168 168
     {
169
-        return $this->getCartItems()->map(function ($item) {
169
+        return $this->getCartItems()->map(function($item) {
170 170
             $productRepo = new ProductRepository(new Product());
171 171
             $product = $productRepo->findProductById($item->id);
172 172
             $item->product = $product;
Please login to merge, or discard this patch.
app/Shop/Shipping/Shippo/ShippoShipmentRepository.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public function setDeliveryAddress(Address $address)
83 83
     {
84
-        $delivery =  [
84
+        $delivery = [
85 85
             'name' => $address->alias,
86 86
             'street1' => $address->address_1,
87 87
             'city' => $address->city,
@@ -129,12 +129,12 @@  discard block
 block discarded – undo
129 129
      */
130 130
     public function readyParcel(Collection $collection)
131 131
     {
132
-        $weight = $collection->map(function ($item) {
132
+        $weight = $collection->map(function($item) {
133 133
             return [
134 134
                 'weight' => $item->product->weight * $item->qty,
135 135
                 'mass_unit' => $item->product->mass_unit
136 136
             ];
137
-        })->map(function ($item) {
137
+        })->map(function($item) {
138 138
             $total = 0;
139 139
             switch ($item['mass_unit']) {
140 140
                 case Product::MASS_UNIT['OUNCES'] :
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                     $total += $oz;
143 143
                     break;
144 144
                 case Product::MASS_UNIT['GRAMS'] :
145
-                    $oz = $item['weight'] *  0.0022;
145
+                    $oz = $item['weight'] * 0.0022;
146 146
                     $total += $oz;
147 147
                     break;
148 148
                 default:
Please login to merge, or discard this patch.
app/Shop/Brands/Repositories/BrandRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@
 block discarded – undo
120 120
      */
121 121
     public function dissociateProducts()
122 122
     {
123
-        $this->model->products()->each(function (Product $product) {
123
+        $this->model->products()->each(function(Product $product) {
124 124
             $product->brand_id = null;
125 125
             $product->save();
126 126
         });
Please login to merge, or discard this patch.