From 0b8613dc57b614562d63966bb765610ba670e7ff Mon Sep 17 00:00:00 2001 From: Cyvelnet Date: Wed, 13 Mar 2024 10:30:03 +0800 Subject: [PATCH] Apply fixes from StyleCI (#49) Co-authored-by: StyleCI Bot --- src/Cyvelnet/Laravel5Fractal/Commands/Command.php | 3 +-- .../Laravel5Fractal/Commands/TransformerGeneratorCommand.php | 1 - .../Laravel5Fractal/Laravel5FractalServiceProvider.php | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Cyvelnet/Laravel5Fractal/Commands/Command.php b/src/Cyvelnet/Laravel5Fractal/Commands/Command.php index b65fa18..764ccb5 100644 --- a/src/Cyvelnet/Laravel5Fractal/Commands/Command.php +++ b/src/Cyvelnet/Laravel5Fractal/Commands/Command.php @@ -69,7 +69,6 @@ protected function getOptions() */ protected function getTransformerProperties($class, $namespace, $storePath) { - // check if class contains additional level if (strpos($class, '/') !== false) { $additionalLevel = substr($class, 0, strrpos($class, '/')); @@ -135,7 +134,7 @@ protected function getModelColumns($class) } } else { $this->error("Your model {$class} was not found in {$this->config->get('fractal.model_namespace')}\\ \r\nIf this is the first time you get this message, try to update /config/fractal.php to make changes to model_namespace accordingly."); - exit(); + exit; } } diff --git a/src/Cyvelnet/Laravel5Fractal/Commands/TransformerGeneratorCommand.php b/src/Cyvelnet/Laravel5Fractal/Commands/TransformerGeneratorCommand.php index 2c3c0a7..2a244f9 100644 --- a/src/Cyvelnet/Laravel5Fractal/Commands/TransformerGeneratorCommand.php +++ b/src/Cyvelnet/Laravel5Fractal/Commands/TransformerGeneratorCommand.php @@ -64,7 +64,6 @@ public function __construct(Config $config, View $view, File $filesystem, $app) public function handle() { try { - // replace all space after ucwords $class_name = preg_replace('/\s+/', '', ucwords($this->argument('name'))); diff --git a/src/Cyvelnet/Laravel5Fractal/Laravel5FractalServiceProvider.php b/src/Cyvelnet/Laravel5Fractal/Laravel5FractalServiceProvider.php index 92c696e..c9fd293 100644 --- a/src/Cyvelnet/Laravel5Fractal/Laravel5FractalServiceProvider.php +++ b/src/Cyvelnet/Laravel5Fractal/Laravel5FractalServiceProvider.php @@ -39,7 +39,6 @@ public function register() $this->mergeConfigFrom($source_config, 'fractal'); $this->app->singleton('fractal', function ($app) { - // retrieves configurations $autoload = $app['config']->get('fractal.autoload');