@@ -39,13 +39,13 @@ discard block |
||
39 | 39 | protected $router; |
40 | 40 | |
41 | 41 | /** |
42 | - * The attributes that can be set through this class. |
|
43 | - * |
|
44 | - * @var array |
|
45 | - */ |
|
42 | + * The attributes that can be set through this class. |
|
43 | + * |
|
44 | + * @var array |
|
45 | + */ |
|
46 | 46 | protected $allowedAttributes = [ |
47 | - 'as', 'domain', 'middleware', 'name', 'namespace', 'prefix', 'where', |
|
48 | - ]; |
|
47 | + 'as', 'domain', 'middleware', 'name', 'namespace', 'prefix', 'where', |
|
48 | + ]; |
|
49 | 49 | |
50 | 50 | /** |
51 | 51 | * The attributes that are aliased. |
@@ -53,8 +53,8 @@ discard block |
||
53 | 53 | * @var array |
54 | 54 | */ |
55 | 55 | protected $aliases = [ |
56 | - 'name' => 'as', |
|
57 | - ]; |
|
56 | + 'name' => 'as', |
|
57 | + ]; |
|
58 | 58 | |
59 | 59 | /** |
60 | 60 | * Create a new GeoGroup instance. |
@@ -153,7 +153,7 @@ |
||
153 | 153 | */ |
154 | 154 | public function attribute($key, $value) |
155 | 155 | { |
156 | - if (! in_array($key, $this->allowedAttributes)) { |
|
156 | + if (!in_array($key, $this->allowedAttributes)) { |
|
157 | 157 | throw new \InvalidArgumentException("Attribute [{$key}] does not exist."); |
158 | 158 | } |
159 | 159 |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $this->publishes([__DIR__ . '/../config' => config_path('geo-routes')], 'config'); |
26 | 26 | $this->registerMacros(); |
27 | 27 | $this->registerGlobalMiddleware(); |
28 | - $this->app->extend('command.route.list', function ($command, $app) { |
|
28 | + $this->app->extend('command.route.list', function($command, $app) { |
|
29 | 29 | return new RouteListCommand($app['router']); |
30 | 30 | }); |
31 | 31 | } |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | { |
40 | 40 | $router = $this->app->make('router'); |
41 | 41 | |
42 | - $this->app->singleton('georoutes.callbacks', function () { |
|
42 | + $this->app->singleton('georoutes.callbacks', function() { |
|
43 | 43 | $registrar = new CallbackRegistrar(); |
44 | 44 | $registrar->loadCallbacks(config('geo-routes.routes.callbacks')); |
45 | 45 | |
@@ -74,23 +74,23 @@ discard block |
||
74 | 74 | */ |
75 | 75 | protected function registerMacros() |
76 | 76 | { |
77 | - Route::macro('allowFrom', function (string ...$countries) { |
|
77 | + Route::macro('allowFrom', function(string ...$countries) { |
|
78 | 78 | return new GeoRoute($this, $countries, 'allow'); |
79 | 79 | }); |
80 | 80 | |
81 | - Route::macro('denyFrom', function (string ...$countries) { |
|
81 | + Route::macro('denyFrom', function(string ...$countries) { |
|
82 | 82 | return new GeoRoute($this, $countries, 'deny'); |
83 | 83 | }); |
84 | 84 | |
85 | - Route::macro('from', function (string ...$countries) { |
|
85 | + Route::macro('from', function(string ...$countries) { |
|
86 | 86 | return new GeoRoute($this, $countries, 'allow'); |
87 | 87 | }); |
88 | 88 | |
89 | - Route::macro('geo', function (array $attributes, Closure $routes) { |
|
89 | + Route::macro('geo', function(array $attributes, Closure $routes) { |
|
90 | 90 | return new GeoGroup($attributes, $routes); |
91 | 91 | }); |
92 | 92 | |
93 | - Router::macro('geo', function (array $attributes, Closure $routes) { |
|
93 | + Router::macro('geo', function(array $attributes, Closure $routes) { |
|
94 | 94 | return new GeoGroup($attributes, $routes); |
95 | 95 | }); |
96 | 96 | } |