Skip to content

Commit a8a55ed

Browse files
committed
add possibility to set naming on service creation
1 parent 5571542 commit a8a55ed

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Contracts/ServiceAbstract.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,14 @@ abstract class ServiceAbstract
1414

1515
protected $filesystem;
1616

17-
public function __construct(CommandAbstract $command)
17+
public function __construct(CommandAbstract $command, ?NamingAbstract $naming = null)
1818
{
1919
$this->command = $command;
2020
$this->filesystem = new Filesystem();
2121

22-
if ($this->key) {
22+
$this->naming = $naming;
23+
24+
if (is_null($naming) && $this->key) {
2325
$this->naming = $this->command->naming[$this->key];
2426
}
2527
}

src/Services/SidebarService.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace Webfactor\Laravel\Generators\Services;
44

5-
use Illuminate\Filesystem\Filesystem;
6-
use Webfactor\Laravel\Generators\Commands\MakeEntity;
75
use Webfactor\Laravel\Generators\Contracts\ServiceAbstract;
86
use Webfactor\Laravel\Generators\Contracts\ServiceInterface;
97

0 commit comments

Comments
 (0)