diff --git a/src/Console/Command/MakeFormParamCommand.php b/src/Console/Command/MakeFormParamCommand.php index 25c8186..dcaa120 100644 --- a/src/Console/Command/MakeFormParamCommand.php +++ b/src/Console/Command/MakeFormParamCommand.php @@ -304,9 +304,9 @@ public function fromEntity(Entity \$entity): self EOF; } - + $template = (string) str_replace('%from_entity%', $result, $content); - + return str_replace('%template_entity%', $templateEntity, $template); } diff --git a/src/Console/MakeCommand.php b/src/Console/MakeCommand.php index 1e128df..cf81c52 100644 --- a/src/Console/MakeCommand.php +++ b/src/Console/MakeCommand.php @@ -176,7 +176,7 @@ public function interact(Reader $reader, Writer $writer): void $this->className = $name; } - + /** * Return the base class name * @param string|object $fullClassName @@ -189,7 +189,7 @@ public function getClassBaseName($fullClassName): string } $temp = explode('\\', $fullClassName); - + return end($temp); } diff --git a/tests/Console/Command/MakeActionCommandTest.php b/tests/Console/Command/MakeActionCommandTest.php index fc2c321..3416069 100644 --- a/tests/Console/Command/MakeActionCommandTest.php +++ b/tests/Console/Command/MakeActionCommandTest.php @@ -48,7 +48,7 @@ public function testExecuteDefault(): void $o->bind($consoleApp); $o->parse(['platine', $actionName]); $this->assertEquals('make:action', $o->getName()); - + // Only to coverage tests $this->assertEquals('MakeActionCommandTest', $o->getClassBaseName($this)); $this->assertEquals(stdClass::class, $o->getClassBaseName(stdClass::class));