Skip to content

Commit 48c6e43

Browse files
committed
Fix namespace in MakeEntity
1 parent 04f1fdf commit 48c6e43

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Maker/MakeEntity.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ public function interact(InputInterface $input, ConsoleStyle $io, Command $comma
143143
if (
144144
!$input->getOption('api-resource')
145145
&& class_exists(ApiResource::class)
146-
&& !class_exists($this->generator->createClassNameDetails($entityClassName, $this->getEntityNamespace())->getFullName())
146+
&& !class_exists($this->generator->createClassNameDetails($entityClassName, $this->generator->getNamespacesHelper()->getEntityNamespace())->getFullName())
147147
) {
148148
$description = $command->getDefinition()->getOption('api-resource')->getDescription();
149149
$question = new ConfirmationQuestion($description, false);
@@ -155,7 +155,7 @@ public function interact(InputInterface $input, ConsoleStyle $io, Command $comma
155155
if (
156156
!$input->getOption('broadcast')
157157
&& class_exists(Broadcast::class)
158-
&& !class_exists($this->generator->createClassNameDetails($entityClassName, $this->getEntityNamespace())->getFullName())
158+
&& !class_exists($this->generator->createClassNameDetails($entityClassName, $this->generator->getNamespacesHelper()->getEntityNamespace())->getFullName())
159159
) {
160160
$description = $command->getDefinition()->getOption('broadcast')->getDescription();
161161
$question = new ConfirmationQuestion($description, false);
@@ -184,7 +184,7 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen
184184

185185
$entityClassDetails = $generator->createClassNameDetails(
186186
$input->getArgument('name'),
187-
$this->getEntityNamespace()
187+
$generator->getNamespacesHelper()->getEntityNamespace(),
188188
);
189189

190190
$classExists = class_exists($entityClassDetails->getFullName());

0 commit comments

Comments
 (0)