Skip to content

Commit 0214e48

Browse files
committed
renamed "not needed" to "already existed"
1 parent 5c117e2 commit 0214e48

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Console/Commands/CrudControllerBackpackCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function handle()
5656
// to create the class and overwrite the user's code. So, we will bail out so the
5757
// code is untouched. Otherwise, we will continue generating this class' files.
5858
if ((! $this->hasOption('force') || ! $this->option('force')) && $this->alreadyExists($this->getNameInput())) {
59-
$this->closeProgressBlock('Not needed', 'yellow');
59+
$this->closeProgressBlock('Already existed', 'yellow');
6060

6161
return false;
6262
}
@@ -130,7 +130,7 @@ protected function replaceNameStrings(&$stub, $name)
130130
protected function getAttributes($model)
131131
{
132132
$attributes = [];
133-
$model = new $model;
133+
$model = new $model();
134134

135135
// if fillable was defined, use that as the attributes
136136
if (count($model->getFillable())) {

src/Console/Commands/CrudModelBackpackCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function handle()
7777
}
7878

7979
// Model exists
80-
$this->closeProgressBlock('Not needed', 'yellow');
80+
$this->closeProgressBlock('Already existed', 'yellow');
8181

8282
// If it was found on both namespaces, we'll ask user to pick one of them
8383
if ($existsOnApp && $existsOnModels) {
@@ -105,7 +105,7 @@ public function handle()
105105
// check if it already uses CrudTrait
106106
// if it does, do nothing
107107
if (Str::contains($file, $this->crudTrait)) {
108-
$this->closeProgressBlock('NOT NEEDED', 'yellow');
108+
$this->closeProgressBlock('Already existed', 'yellow');
109109

110110
return;
111111
}

src/Console/Commands/CrudRequestBackpackCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function handle()
5454
// to create the class and overwrite the user's code. So, we will bail out so the
5555
// code is untouched. Otherwise, we will continue generating this class' files.
5656
if ((! $this->hasOption('force') || ! $this->option('force')) && $this->alreadyExists($this->getNameInput())) {
57-
$this->closeProgressBlock('Not needed', 'yellow');
57+
$this->closeProgressBlock('Already existed', 'yellow');
5858

5959
return false;
6060
}

0 commit comments

Comments
 (0)