| @@ -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 | |
| @@ -52,8 +52,8 @@ discard block | ||
| 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 | ||
| 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 | } | 
| @@ -174,7 +174,7 @@ discard block | ||
| 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 | ||
| 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); | 
| @@ -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 | }); | 
| @@ -29,16 +29,16 @@ | ||
| 29 | 29 | 'layouts.admin.app', | 
| 30 | 30 | 'layouts.admin.sidebar', | 
| 31 | 31 | 'admin.shared.products' | 
| 32 | -        ], function ($view) { | |
| 32 | +        ], function($view) { | |
| 33 | 33 |              $view->with('admin', Auth::guard('employee')->user()); | 
| 34 | 34 | }); | 
| 35 | 35 | |
| 36 | -        view()->composer(['layouts.front.app', 'front.categories.sidebar-category'], function ($view) { | |
| 36 | +        view()->composer(['layouts.front.app', 'front.categories.sidebar-category'], function($view) { | |
| 37 | 37 |              $view->with('categories', $this->getCategories()); | 
| 38 | 38 |              $view->with('cartCount', $this->getCartCount()); | 
| 39 | 39 | }); | 
| 40 | 40 | |
| 41 | -        view()->composer(['layouts.front.category-nav'], function ($view) { | |
| 41 | +        view()->composer(['layouts.front.category-nav'], function($view) { | |
| 42 | 42 |              $view->with('categories', $this->getCategories()); | 
| 43 | 43 | }); | 
| 44 | 44 | } |