Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
tabacitu authored and StyleCIBot committed Oct 12, 2021
1 parent 8c838a2 commit 027a2c6
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 62 deletions.
14 changes: 5 additions & 9 deletions src/Console/Commands/ChartControllerBackpackCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ class ChartControllerBackpackCommand extends GeneratorCommand
/**
* Get the destination class path.
*
* @param string $name
*
* @param string $name
* @return string
*/
protected function getPath($name)
Expand All @@ -62,8 +61,7 @@ protected function getStub()
/**
* Get the default namespace for the class.
*
* @param string $rootNamespace
*
* @param string $rootNamespace
* @return string
*/
protected function getDefaultNamespace($rootNamespace)
Expand All @@ -74,9 +72,8 @@ protected function getDefaultNamespace($rootNamespace)
/**
* Replace the table name for the given stub.
*
* @param string $stub
* @param string $name
*
* @param string $stub
* @param string $name
* @return string
*/
protected function replaceRouteStrings(&$stub)
Expand All @@ -89,8 +86,7 @@ protected function replaceRouteStrings(&$stub)
/**
* Build the class with the given name.
*
* @param string $name
*
* @param string $name
* @return string
*/
protected function buildClass($name)
Expand Down
9 changes: 3 additions & 6 deletions src/Console/Commands/ConfigBackpackCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ public function fire()
/**
* Determine if the class already exists.
*
* @param string $name
*
* @param string $name
* @return bool
*/
protected function alreadyExists($name)
Expand All @@ -94,8 +93,7 @@ protected function alreadyExists($name)
/**
* Get the destination class path.
*
* @param string $name
*
* @param string $name
* @return string
*/
protected function getPath($name)
Expand All @@ -106,8 +104,7 @@ protected function getPath($name)
/**
* Build the class with the given name.
*
* @param string $name
*
* @param string $name
* @return string
*/
protected function buildClass($name)
Expand Down
1 change: 0 additions & 1 deletion src/Console/Commands/CrudBackpackCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ public function handle()
$nameKebab = Str::kebab($nameTitle);
$namePlural = ucfirst(str_replace('-', ' ', Str::plural($nameKebab)));


// Create the CRUD Model and show output
$this->call('backpack:crud-model', ['name' => $nameTitle]);

Expand Down
20 changes: 7 additions & 13 deletions src/Console/Commands/CrudControllerBackpackCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ class CrudControllerBackpackCommand extends GeneratorCommand
/**
* Get the destination class path.
*
* @param string $name
*
* @param string $name
* @return string
*/
protected function getPath($name)
Expand All @@ -63,8 +62,7 @@ protected function getStub()
/**
* Get the default namespace for the class.
*
* @param string $rootNamespace
*
* @param string $rootNamespace
* @return string
*/
protected function getDefaultNamespace($rootNamespace)
Expand All @@ -75,9 +73,8 @@ protected function getDefaultNamespace($rootNamespace)
/**
* Replace the table name for the given stub.
*
* @param string $stub
* @param string $name
*
* @param string $stub
* @param string $name
* @return string
*/
protected function replaceNameStrings(&$stub, $name)
Expand Down Expand Up @@ -114,9 +111,8 @@ protected function getAttributes($model)
/**
* Replace the table name for the given stub.
*
* @param string $stub
* @param string $name
*
* @param string $stub
* @param string $name
* @return string
*/
protected function replaceSetFromDb(&$stub, $name)
Expand Down Expand Up @@ -158,7 +154,6 @@ protected function replaceSetFromDb(&$stub, $name)
*
* @param string $stub
* @param string $name
*
* @return string
*/
protected function replaceModel(&$stub, $name)
Expand All @@ -172,8 +167,7 @@ protected function replaceModel(&$stub, $name)
/**
* Build the class with the given name.
*
* @param string $name
*
* @param string $name
* @return string
*/
protected function buildClass($name)
Expand Down
8 changes: 3 additions & 5 deletions src/Console/Commands/CrudModelBackpackCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,8 @@ protected function getStub()
/**
* Replace the table name for the given stub.
*
* @param string $stub
* @param string $name
*
* @param string $stub
* @param string $name
* @return string
*/
protected function replaceTable(&$stub, $name)
Expand All @@ -166,8 +165,7 @@ protected function replaceTable(&$stub, $name)
/**
* Build the class with the given name.
*
* @param string $name
*
* @param string $name
* @return string
*/
protected function buildClass($name)
Expand Down
14 changes: 5 additions & 9 deletions src/Console/Commands/CrudOperationBackpackCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ class CrudOperationBackpackCommand extends GeneratorCommand
/**
* Get the destination class path.
*
* @param string $name
*
* @param string $name
* @return string
*/
protected function getPath($name)
Expand All @@ -62,8 +61,7 @@ protected function getStub()
/**
* Get the default namespace for the class.
*
* @param string $rootNamespace
*
* @param string $rootNamespace
* @return string
*/
protected function getDefaultNamespace($rootNamespace)
Expand All @@ -74,9 +72,8 @@ protected function getDefaultNamespace($rootNamespace)
/**
* Replace the table name for the given stub.
*
* @param string $stub
* @param string $name
*
* @param string $stub
* @param string $name
* @return string
*/
protected function replaceNameStrings(&$stub, $name)
Expand All @@ -92,8 +89,7 @@ protected function replaceNameStrings(&$stub, $name)
/**
* Build the class with the given name.
*
* @param string $name
*
* @param string $name
* @return string
*/
protected function buildClass($name)
Expand Down
6 changes: 2 additions & 4 deletions src/Console/Commands/CrudRequestBackpackCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ class CrudRequestBackpackCommand extends GeneratorCommand
/**
* Get the destination class path.
*
* @param string $name
*
* @param string $name
* @return string
*/
protected function getPath($name)
Expand All @@ -61,8 +60,7 @@ protected function getStub()
/**
* Get the default namespace for the class.
*
* @param string $rootNamespace
*
* @param string $rootNamespace
* @return string
*/
protected function getDefaultNamespace($rootNamespace)
Expand Down
11 changes: 4 additions & 7 deletions src/Console/Commands/ModelBackpackCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ protected function getStub()
/**
* Get the default namespace for the class.
*
* @param string $rootNamespace
*
* @param string $rootNamespace
* @return string
*/
protected function getDefaultNamespace($rootNamespace)
Expand All @@ -64,9 +63,8 @@ protected function getDefaultNamespace($rootNamespace)
/**
* Replace the table name for the given stub.
*
* @param string $stub
* @param string $name
*
* @param string $stub
* @param string $name
* @return string
*/
protected function replaceTable(&$stub, $name)
Expand All @@ -83,8 +81,7 @@ protected function replaceTable(&$stub, $name)
/**
* Build the class with the given name.
*
* @param string $name
*
* @param string $name
* @return string
*/
protected function buildClass($name)
Expand Down
3 changes: 1 addition & 2 deletions src/Console/Commands/RequestBackpackCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ protected function getStub()
/**
* Get the default namespace for the class.
*
* @param string $rootNamespace
*
* @param string $rootNamespace
* @return string
*/
protected function getDefaultNamespace($rootNamespace)
Expand Down
9 changes: 3 additions & 6 deletions src/Console/Commands/ViewBackpackCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ public function fire()
/**
* Determine if the class already exists.
*
* @param string $name
*
* @param string $name
* @return bool
*/
protected function alreadyExists($name)
Expand All @@ -98,8 +97,7 @@ protected function alreadyExists($name)
/**
* Get the destination class path.
*
* @param string $name
*
* @param string $name
* @return string
*/
protected function getPath($name)
Expand All @@ -110,8 +108,7 @@ protected function getPath($name)
/**
* Build the class with the given name.
*
* @param string $name
*
* @param string $name
* @return string
*/
protected function buildClass($name)
Expand Down

0 comments on commit 027a2c6

Please sign in to comment.