Passed
Pull Request — master (#71)
by Adeniyi
05:43
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/Addresses/AddressController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             $list = $this->addressRepo->searchAddress(request()->input('q'));
54 54
         }
55 55
 
56
-        $addresses = $list->map(function (Address $address) {
56
+        $addresses = $list->map(function(Address $address) {
57 57
             return $this->transformAddress($address);
58 58
         })->all();
59 59
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     {
122 122
         $countries = $this->countryRepo->listCountries();
123 123
 
124
-        $country = $countries->filter(function ($country) {
124
+        $country = $countries->filter(function($country) {
125 125
             return $country == env('COUNTRY_ID', 1);
126 126
         })->first();
127 127
 
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/Http/Controllers/Front/AccountsController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
         $customerRepo = new CustomerRepository($customer);
32 32
         $orders = $customerRepo->findOrders();
33 33
 
34
-        $orders->transform(function (Order $order) {
34
+        $orders->transform(function(Order $order) {
35 35
             return $this->transformOrder($order);
36 36
         });
37 37
 
Please login to merge, or discard this patch.
app/Http/Controllers/Front/CheckoutController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
         $paymentMethods = config('payees.name');
80 80
         $payees = explode(',', $paymentMethods);
81 81
 
82
-        $paymentGateways = collect($payees)->transform(function ($name) {
82
+        $paymentGateways = collect($payees)->transform(function($name) {
83 83
             return config($name);
84 84
         })->filter()->all();
85 85
 
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/Shop/Carts/Repositories/CartRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
163 163
      */
164 164
     public function getCartItemsTransformed() : Collection
165 165
     {
166
-        return $this->getCartItems()->map(function (CartItem $item) {
166
+        return $this->getCartItems()->map(function(CartItem $item) {
167 167
             $productRepo = new ProductRepository(new Product());
168 168
             $product = $productRepo->findProductById($item->id);
169 169
             $item->product = $product;
Please login to merge, or discard this patch.
app/Providers/GlobalTemplateServiceProvider.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,17 +25,17 @@
 block discarded – undo
25 25
      */
26 26
     public function boot()
27 27
     {
28
-        view()->composer('layouts.admin.app', function ($view) {
28
+        view()->composer('layouts.admin.app', function($view) {
29 29
             $view->with('user', Auth::guard('admin')->user());
30 30
             $view->with('admin', $this->isAdmin(Auth::guard('admin')->user()));
31 31
         });
32 32
 
33
-        view()->composer(['layouts.front.app', 'front.categories.sidebar-category'], function ($view) {
33
+        view()->composer(['layouts.front.app', 'front.categories.sidebar-category'], function($view) {
34 34
             $view->with('categories', $this->getCategories());
35 35
             $view->with('cartCount', $this->getCartCount());
36 36
         });
37 37
 
38
-        view()->composer(['layouts.front.category-nav'], function ($view) {
38
+        view()->composer(['layouts.front.category-nav'], function($view) {
39 39
             $view->with('categories', $this->getCategories());
40 40
         });
41 41
     }
Please login to merge, or discard this patch.