Skip to content

Commit 3137a00

Browse files
committed
fix: remarks from reviewer
1 parent 015df73 commit 3137a00

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/Exceptions/AbstractResourceException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ protected function getEntity(string $filePath): string
1313

1414
return Str::before($fileName, '.php');
1515
}
16-
}
16+
}

src/Exceptions/ResourceNotExistsException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ public function __construct(
1212

1313
parent::__construct("Cannot create {$entity} cause {$resource} does not exist. Create {$filePath} and run command again.");
1414
}
15-
}
15+
}

src/Generators/NovaResourceGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class NovaResourceGenerator extends EntityGenerator
5555
public function generate(): void
5656
{
5757
if (class_exists(NovaServiceProvider::class)) {
58-
$this->checkResourceNotExists('models', "{$this->model} Nova resource", $this->model, $this->modelSubFolder);
58+
$this->checkResourceNotExists('models', "{$this->model}Resource", $this->model, $this->modelSubFolder);
5959

6060
$this->checkResourceExists('nova', "{$this->model}Resource", $this->modelSubFolder);
6161

tests/NovaResourceGeneratorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function testCreateNovaResourceWithMissingModel()
4343

4444
$this->assertExceptionThrew(
4545
className: ResourceNotExistsException::class,
46-
message: 'Cannot create Post Nova resource cause Post does not exist. Create app/Models/Post.php and run command again.'
46+
message: 'Cannot create PostResource cause Post does not exist. Create app/Models/Post.php and run command again.'
4747
);
4848

4949
app(NovaResourceGenerator::class)

0 commit comments

Comments
 (0)