| @@ -41,7 +41,7 @@ | ||
| 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 | |
| @@ -116,7 +116,7 @@ | ||
| 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); | 
| @@ -45,7 +45,7 @@ | ||
| 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 | |
| @@ -166,7 +166,7 @@ | ||
| 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; | 
| @@ -81,7 +81,7 @@ discard block | ||
| 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 | ||
| 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 | ||
| 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: | 
| @@ -120,7 +120,7 @@ | ||
| 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 | }); | 
| @@ -36,7 +36,7 @@ | ||
| 36 | 36 | $list = $this->productRepo->listProducts(); | 
| 37 | 37 | } | 
| 38 | 38 | |
| 39 | -        $products = $list->where('status', 1)->map(function (Product $item) { | |
| 39 | +        $products = $list->where('status', 1)->map(function(Product $item) { | |
| 40 | 40 | return $this->transformProduct($item); | 
| 41 | 41 | }); | 
| 42 | 42 | |
| @@ -115,7 +115,7 @@ | ||
| 115 | 115 | } | 
| 116 | 116 | |
| 117 | 117 | // Get payment gateways | 
| 118 | -        $paymentGateways = collect(explode(',', config('payees.name')))->transform(function ($name) { | |
| 118 | +        $paymentGateways = collect(explode(',', config('payees.name')))->transform(function($name) { | |
| 119 | 119 | return config($name); | 
| 120 | 120 | })->all(); | 
| 121 | 121 | |
| @@ -44,7 +44,7 @@ | ||
| 44 | 44 | $customerRepo = new CustomerRepository($customer); | 
| 45 | 45 | $orders = $customerRepo->findOrders(['*'], 'created_at'); | 
| 46 | 46 | |
| 47 | -        $orders->transform(function (Order $order) { | |
| 47 | +        $orders->transform(function(Order $order) { | |
| 48 | 48 | return $this->transformOrder($order); | 
| 49 | 49 | }); | 
| 50 | 50 | |