Skip to content

Commit

Permalink
minor #1622 [doc]remove prepended doubleslash in exceptionmessage (Bu…
Browse files Browse the repository at this point in the history
…tterd)

This PR was merged into the 1.x-dev branch.

Discussion
----------

[doc]remove prepended doubleslash in exceptionmessage

Removes the prepended '\\' in the Exceptionmessage when encountering an invalid FCQN

#1615

#SymfonyHackday

Commits
-------

0e8eb58 [doc]remove prepended doubleslash in exceptionmessage #1615
  • Loading branch information
kbond committed Dec 10, 2024
2 parents 4a93f98 + 0e8eb58 commit 0624f13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function generateClass(string $className, string $templateName, array $va
$targetPath = $this->fileManager->getRelativePathForFutureClass($className);

if (null === $targetPath) {
throw new \LogicException(\sprintf('Could not determine where to locate the new class "%s", maybe try with a full namespace like "\\My\\Full\\Namespace\\%s"', $className, Str::getShortClassName($className)));
throw new \LogicException(\sprintf('Could not determine where to locate the new class "%s", maybe try with a full namespace like "My\\Full\\Namespace\\%s"', $className, Str::getShortClassName($className)));
}

$variables = array_merge($variables, [
Expand Down Expand Up @@ -97,7 +97,7 @@ final public function generateClassFromClassData(ClassData $classData, string $t
$targetPath = $this->fileManager->getRelativePathForFutureClass($classData->getFullClassName());

if (null === $targetPath) {
throw new \LogicException(\sprintf('Could not determine where to locate the new class "%s", maybe try with a full namespace like "\\My\\Full\\Namespace\\%s"', $classData->getFullClassName(), $classData->getClassName()));
throw new \LogicException(\sprintf('Could not determine where to locate the new class "%s", maybe try with a full namespace like "My\\Full\\Namespace\\%s"', $classData->getFullClassName(), $classData->getClassName()));
}

$globalTemplateVars = ['class_data' => $classData];
Expand Down

0 comments on commit 0624f13

Please sign in to comment.