@@ -35,7 +35,7 @@ |
||
| 35 | 35 | public function handle($request, Closure $next) |
| 36 | 36 | { |
| 37 | 37 | $response = $next($request); |
| 38 | - if ($this->webartisan->isEnabled() and $request->url() != asset(config('webartisan.route_prefix').'/run')) { |
|
| 38 | + if ($this->webartisan->isEnabled() and $request->url() != asset(config('webartisan.route_prefix') . '/run')) { |
|
| 39 | 39 | try { |
| 40 | 40 | $response->getContent(); |
| 41 | 41 | } |
@@ -38,8 +38,7 @@ |
||
| 38 | 38 | if ($this->webartisan->isEnabled() and $request->url() != asset(config('webartisan.route_prefix').'/run')) { |
| 39 | 39 | try { |
| 40 | 40 | $response->getContent(); |
| 41 | - } |
|
| 42 | - catch (\ErrorException $e) { |
|
| 41 | + } catch (\ErrorException $e) { |
|
| 43 | 42 | return $response; |
| 44 | 43 | } |
| 45 | 44 | $this->webartisan->render($response); |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | public function boot() |
| 18 | 18 | { |
| 19 | 19 | $this->publishes([ |
| 20 | - __DIR__.'/../config/config.php' => config_path('webartisan.php'), |
|
| 20 | + __DIR__ . '/../config/config.php' => config_path('webartisan.php'), |
|
| 21 | 21 | ], 'config'); |
| 22 | 22 | |
| 23 | 23 | $routeConfig = [ |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | ]); |
| 34 | 34 | }); |
| 35 | 35 | |
| 36 | - $this->loadViewsFrom(__DIR__.'/Resources/Views', 'webartisan'); |
|
| 36 | + $this->loadViewsFrom(__DIR__ . '/Resources/Views', 'webartisan'); |
|
| 37 | 37 | |
| 38 | 38 | $this->registerMiddleware(WebArtisanEnabled::class); |
| 39 | 39 | } |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | public function register() |
| 47 | 47 | { |
| 48 | - $this->mergeConfigFrom(__DIR__.'/../config/config.php', 'webartisan'); |
|
| 48 | + $this->mergeConfigFrom(__DIR__ . '/../config/config.php', 'webartisan'); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | /** |
@@ -25,15 +25,15 @@ |
||
| 25 | 25 | * |
| 26 | 26 | * @param null $app |
| 27 | 27 | */ |
| 28 | - public function __construct($app = null) |
|
| 29 | - { |
|
| 28 | + public function __construct($app = null) |
|
| 29 | + { |
|
| 30 | 30 | if (!$app) { |
| 31 | 31 | $app = app(); //Fallback when $app is not given |
| 32 | 32 | } |
| 33 | 33 | $this->app = $app; |
| 34 | 34 | |
| 35 | 35 | $this->enabled = value($this->app['config']->get('webartisan.enabled')); |
| 36 | - } |
|
| 36 | + } |
|
| 37 | 37 | |
| 38 | 38 | /** |
| 39 | 39 | * Check if the Web Artisan is enabled |
@@ -28,7 +28,7 @@ |
||
| 28 | 28 | public function __construct($app = null) |
| 29 | 29 | { |
| 30 | 30 | if (!$app) { |
| 31 | - $app = app(); //Fallback when $app is not given |
|
| 31 | + $app = app(); //Fallback when $app is not given |
|
| 32 | 32 | } |
| 33 | 33 | $this->app = $app; |
| 34 | 34 | |
@@ -27,12 +27,12 @@ |
||
| 27 | 27 | ? $request->get('command') |
| 28 | 28 | : null; |
| 29 | 29 | |
| 30 | - if($this->command) { |
|
| 30 | + if ($this->command) { |
|
| 31 | 31 | $commandPrepared = $this->prepareCommand($this->command); |
| 32 | 32 | try { |
| 33 | 33 | Artisan::call($commandPrepared); |
| 34 | 34 | } |
| 35 | - catch(\Exception $e) { |
|
| 35 | + catch (\Exception $e) { |
|
| 36 | 36 | return $this->prepareResultToHtml($e->getMessage(), 'error'); |
| 37 | 37 | } |
| 38 | 38 | return $this->prepareResultToHtml(Artisan::output(), 'success'); |
@@ -31,8 +31,7 @@ |
||
| 31 | 31 | $commandPrepared = $this->prepareCommand($this->command); |
| 32 | 32 | try { |
| 33 | 33 | Artisan::call($commandPrepared); |
| 34 | - } |
|
| 35 | - catch(\Exception $e) { |
|
| 34 | + } catch(\Exception $e) { |
|
| 36 | 35 | return $this->prepareResultToHtml($e->getMessage(), 'error'); |
| 37 | 36 | } |
| 38 | 37 | return $this->prepareResultToHtml(Artisan::output(), 'success'); |