Skip to content

Commit 877b305

Browse files
committed
style: remove constuctor
1 parent 351b8da commit 877b305

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

src/Generators/NovaTestGenerator.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,8 @@
1717

1818
class NovaTestGenerator extends AbstractTestsGenerator
1919
{
20-
protected string $novaPath;
21-
2220
protected string $novaResourceClassName;
2321

24-
public function __construct()
25-
{
26-
parent::__construct();
27-
28-
$this->novaPath = base_path($this->paths['nova']);
29-
}
30-
3122
public function generate(): void
3223
{
3324
if (class_exists(NovaServiceProvider::class)) {
@@ -116,7 +107,7 @@ protected function getActions(): array
116107

117108
protected function getNovaFiles(): Generator
118109
{
119-
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($this->novaPath));
110+
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(base_path($this->paths['nova'])));
120111

121112
foreach ($iterator as $file) {
122113
if ($file->isFile() && $file->getExtension() === 'php') {
@@ -130,7 +121,7 @@ protected function getCommonNovaResources(): array
130121
$resources = [];
131122

132123
foreach ($this->getNovaFiles() as $file) {
133-
$relativePath = Str::after($file->getPathname(), $this->novaPath . DIRECTORY_SEPARATOR);
124+
$relativePath = Str::after($file->getPathname(), $this->paths['nova'] . DIRECTORY_SEPARATOR);
134125

135126
$class = Str::before($relativePath, '.');
136127

0 commit comments

Comments
 (0)