| @@ -17,13 +17,13 @@ | ||
| 17 | 17 | */ | 
| 18 | 18 | public function boot() | 
| 19 | 19 |      { | 
| 20 | - $this->publishes([ | |
| 21 | -	        __DIR__.'/../database/migrations/' => database_path('migrations') | |
| 22 | - ], 'migrations'); | |
| 20 | + $this->publishes([ | |
| 21 | +            __DIR__.'/../database/migrations/' => database_path('migrations') | |
| 22 | + ], 'migrations'); | |
| 23 | 23 | |
| 24 | - $this->publishes([ | |
| 25 | -	        __DIR__.'/../database/seeds/' => database_path('seeds') | |
| 26 | - ], 'seeds'); | |
| 24 | + $this->publishes([ | |
| 25 | +            __DIR__.'/../database/seeds/' => database_path('seeds') | |
| 26 | + ], 'seeds'); | |
| 27 | 27 | |
| 28 | 28 | } | 
| 29 | 29 | |
| @@ -34,7 +34,7 @@ | ||
| 34 | 34 | */ | 
| 35 | 35 | public function register() | 
| 36 | 36 |      { | 
| 37 | -        $this->app->singleton('hideyo', function () { | |
| 37 | +        $this->app->singleton('hideyo', function() { | |
| 38 | 38 | return true; | 
| 39 | 39 | }); | 
| 40 | 40 | } | 
| @@ -15,7 +15,7 @@ | ||
| 15 | 15 | */ | 
| 16 | 16 | public function register() | 
| 17 | 17 |      { | 
| 18 | -        $this->app->bind('ShopService', function ($app) { | |
| 18 | +        $this->app->bind('ShopService', function($app) { | |
| 19 | 19 | return new ShopService( | 
| 20 | 20 | // Injecting user interface to be used as user repository | 
| 21 | 21 |                  $app->make('Hideyo\Ecommerce\Framework\Services\Shop\Entity\ShopRepositoryInterface')); | 
| @@ -9,7 +9,7 @@ | ||
| 9 | 9 | */ | 
| 10 | 10 | protected function registerFormBuilder() | 
| 11 | 11 |      { | 
| 12 | -        $this->app->singleton('form', function ($app) { | |
| 12 | +        $this->app->singleton('form', function($app) { | |
| 13 | 13 | $form = new FormBuilder($app['html'], $app['url'], $app['view'], $app['session.store']->token()); | 
| 14 | 14 | return $form->setSessionStore($app['session.store']); | 
| 15 | 15 | }); | 
| @@ -51,10 +51,10 @@ discard block | ||
| 51 | 51 | protected function mapBackendRoutes() | 
| 52 | 52 |      { | 
| 53 | 53 | Route::group([ | 
| 54 | - 'middleware' => ['hideyobackend','auth.hideyo.backend'], | |
| 54 | + 'middleware' => ['hideyobackend', 'auth.hideyo.backend'], | |
| 55 | 55 | 'prefix' => 'admin', | 
| 56 | 56 | 'namespace' => 'App\Http\Controllers\Backend' | 
| 57 | -        ], function ($router) { | |
| 57 | +        ], function($router) { | |
| 58 | 58 |              require base_path('routes/backend.php'); | 
| 59 | 59 | }); | 
| 60 | 60 | } | 
| @@ -72,7 +72,7 @@ discard block | ||
| 72 | 72 | 'middleware' => ['hideyobackend'], | 
| 73 | 73 | 'prefix' => 'admin', | 
| 74 | 74 | 'namespace' => 'App\Http\Controllers\Backend' | 
| 75 | -        ], function ($router) { | |
| 75 | +        ], function($router) { | |
| 76 | 76 |              require base_path('routes/auth_backend.php'); | 
| 77 | 77 | }); | 
| 78 | 78 | } | 
| @@ -89,7 +89,7 @@ discard block | ||
| 89 | 89 | Route::group([ | 
| 90 | 90 | 'middleware' => ['web', 'detect.shop'], | 
| 91 | 91 | 'namespace' => $this->frontendNamespace, | 
| 92 | -        ], function ($router) { | |
| 92 | +        ], function($router) { | |
| 93 | 93 |              require base_path('routes/frontend.php'); | 
| 94 | 94 | }); | 
| 95 | 95 | } | 
| @@ -107,7 +107,7 @@ discard block | ||
| 107 | 107 | 'middleware' => 'api', | 
| 108 | 108 | 'namespace' => $this->apiNamespace, | 
| 109 | 109 | 'prefix' => 'api', | 
| 110 | -        ], function ($router) { | |
| 110 | +        ], function($router) { | |
| 111 | 111 |              require base_path('routes/api.php'); | 
| 112 | 112 | }); | 
| 113 | 113 | } | 
| @@ -57,7 +57,7 @@ | ||
| 57 | 57 | $html = array(); | 
| 58 | 58 |          if (is_array($selected)) { | 
| 59 | 59 |              foreach ($selected as $key => $value) { | 
| 60 | - $selected[$value] = $value; | |
| 60 | + $selected[$value] = $value; | |
| 61 | 61 | } | 
| 62 | 62 | } | 
| 63 | 63 | |
| @@ -47,7 +47,7 @@ discard block | ||
| 47 | 47 | |
| 48 | 48 | public function submit($value = null, $options = []) | 
| 49 | 49 |      { | 
| 50 | - $options['class'] = 'btn btn-cons btn-success' . (isset($options['class']) ? ' ' . $options['class'] : ''); | |
| 50 | + $options['class'] = 'btn btn-cons btn-success'.(isset($options['class']) ? ' '.$options['class'] : ''); | |
| 51 | 51 | return parent::submit($value, $options); | 
| 52 | 52 | } | 
| 53 | 53 | |
| @@ -63,7 +63,7 @@ discard block | ||
| 63 | 63 | |
| 64 | 64 | //dd($list, $selected); | 
| 65 | 65 |          foreach ($list as $value => $display) { | 
| 66 | - $sel = isset($selected[$value])?' selected="selected"':''; | |
| 66 | + $sel = isset($selected[$value]) ? ' selected="selected"' : ''; | |
| 67 | 67 | $html[] = '<option value="'.$value.'"'.$sel.'>'.e($display).'</option>'; | 
| 68 | 68 | } | 
| 69 | 69 | |
| @@ -34,7 +34,7 @@ | ||
| 34 | 34 | */ | 
| 35 | 35 | public function register() | 
| 36 | 36 |      { | 
| 37 | -        $this->app->singleton('cart', function ($app) { | |
| 37 | +        $this->app->singleton('cart', function($app) { | |
| 38 | 38 | |
| 39 | 39 | $storage = $app['session']; | 
| 40 | 40 | $events = $app['events']; | 
| @@ -24,7 +24,7 @@ | ||
| 24 | 24 | $sendingMethod->save(); | 
| 25 | 25 | |
| 26 | 26 | $sendingMethod2 = new SendingMethod; | 
| 27 | - $sendingMethod2->active = 1; | |
| 27 | + $sendingMethod2->active = 1; | |
| 28 | 28 | $sendingMethod2->title = 'Netherlands'; | 
| 29 | 29 | $sendingMethod2->tax_rate_id = $taxRate->id; | 
| 30 | 30 | $sendingMethod2->price = '30'; | 
| @@ -14,31 +14,31 @@ | ||
| 14 | 14 | DB::table($productRelatedProduct->getTable())->delete(); | 
| 15 | 15 | |
| 16 | 16 |          for ($x = 1; $x <= 10; $x++) { | 
| 17 | - $productRelatedProduct = new ProductRelatedProduct; | |
| 18 | - $productRelatedProduct->product_id = $x; | |
| 19 | - $productRelatedProduct->related_product_id = $x + 1; | |
| 20 | - $productRelatedProduct->save(); | |
| 21 | - } | |
| 17 | + $productRelatedProduct = new ProductRelatedProduct; | |
| 18 | + $productRelatedProduct->product_id = $x; | |
| 19 | + $productRelatedProduct->related_product_id = $x + 1; | |
| 20 | + $productRelatedProduct->save(); | |
| 21 | + } | |
| 22 | 22 | |
| 23 | 23 |          for ($x = 2; $x <= 10; $x++) { | 
| 24 | - $productRelatedProduct = new ProductRelatedProduct; | |
| 25 | - $productRelatedProduct->product_id = $x; | |
| 26 | - $productRelatedProduct->related_product_id = $x + 1; | |
| 27 | - $productRelatedProduct->save(); | |
| 28 | - } | |
| 24 | + $productRelatedProduct = new ProductRelatedProduct; | |
| 25 | + $productRelatedProduct->product_id = $x; | |
| 26 | + $productRelatedProduct->related_product_id = $x + 1; | |
| 27 | + $productRelatedProduct->save(); | |
| 28 | + } | |
| 29 | 29 | |
| 30 | 30 |          for ($x = 3; $x <= 10; $x++) { | 
| 31 | - $productRelatedProduct = new ProductRelatedProduct; | |
| 32 | - $productRelatedProduct->product_id = $x; | |
| 33 | - $productRelatedProduct->related_product_id = $x + 1; | |
| 34 | - $productRelatedProduct->save(); | |
| 35 | - } | |
| 31 | + $productRelatedProduct = new ProductRelatedProduct; | |
| 32 | + $productRelatedProduct->product_id = $x; | |
| 33 | + $productRelatedProduct->related_product_id = $x + 1; | |
| 34 | + $productRelatedProduct->save(); | |
| 35 | + } | |
| 36 | 36 | |
| 37 | 37 |          for ($x = 4; $x <= 10; $x++) { | 
| 38 | - $productRelatedProduct = new ProductRelatedProduct; | |
| 39 | - $productRelatedProduct->product_id = $x; | |
| 40 | - $productRelatedProduct->related_product_id = $x + 1; | |
| 41 | - $productRelatedProduct->save(); | |
| 42 | - } | |
| 38 | + $productRelatedProduct = new ProductRelatedProduct; | |
| 39 | + $productRelatedProduct->product_id = $x; | |
| 40 | + $productRelatedProduct->related_product_id = $x + 1; | |
| 41 | + $productRelatedProduct->save(); | |
| 42 | + } | |
| 43 | 43 | } | 
| 44 | 44 | } | 
| @@ -23,7 +23,7 @@ discard block | ||
| 23 | 23 | |
| 24 | 24 | |
| 25 | 25 | $storageImagePath = "/files/product/"; | 
| 26 | -        $publicImagePath = public_path() .config('hideyo.public_path'). "/product/"; | |
| 26 | +        $publicImagePath = public_path().config('hideyo.public_path')."/product/"; | |
| 27 | 27 | |
| 28 | 28 | |
| 29 | 29 |          $productCategory = ProductCategory::where('title', '=', 'Pants')->first(); | 
| @@ -134,7 +134,7 @@ discard block | ||
| 134 | 134 | $product2->product_category_id = $productCategory->id; | 
| 135 | 135 | $product2->tax_rate_id = $taxRate->id; | 
| 136 | 136 | |
| 137 | -        if (! $product2->save()) { | |
| 137 | +        if (!$product2->save()) { | |
| 138 | 138 |              Log::info('Unable to create product '.$product2->title, (array)$product2->errors()); | 
| 139 | 139 |          } else { | 
| 140 | 140 |              Log::info('Created product "'.$product2->title.'" <'.$product2->title.'>'); |