Tool erronously performs transformation also when the word 'namespace' is present in input files but has no syntactical meaning
Actually Symfony validation library contains a comment with the word 'namespace'
https://github.com/symfony/validator/blob/f7c32e309885a97fc9572335e22c2c2d31f328c4/Mapping/ClassMetadata.php#L114
Original (untrasformed) source code
[...]
private \ReflectionClass $reflClass;
public function __construct(string $class)
{
$this->name = $class;
// class name without namespace
if (false !== $nsSep = strrpos($class, '\\')) {
$this->defaultGroup = substr($class, $nsSep + 1);
} else {
$this->defaultGroup = $class;
}
}
Transformed output (broken) source code
[...]
private \ReflectionClass $reflClass;
public function __construct(string $class)
{
$this->name = $class;
// class name without namespace My\Custom\Wrapper\if (false !== $nsSep = strrpos($class, '\\')) {
$this->defaultGroup = substr($class, $nsSep + 1);
} else {
$this->defaultGroup = $class;
}
}
Tool erronously performs transformation also when the word 'namespace' is present in input files but has no syntactical meaning
Actually Symfony validation library contains a comment with the word 'namespace'
https://github.com/symfony/validator/blob/f7c32e309885a97fc9572335e22c2c2d31f328c4/Mapping/ClassMetadata.php#L114
Original (untrasformed) source code
[...] private \ReflectionClass $reflClass; public function __construct(string $class) { $this->name = $class; // class name without namespace if (false !== $nsSep = strrpos($class, '\\')) { $this->defaultGroup = substr($class, $nsSep + 1); } else { $this->defaultGroup = $class; } }Transformed output (broken) source code
[...] private \ReflectionClass $reflClass; public function __construct(string $class) { $this->name = $class; // class name without namespace My\Custom\Wrapper\if (false !== $nsSep = strrpos($class, '\\')) { $this->defaultGroup = substr($class, $nsSep + 1); } else { $this->defaultGroup = $class; } }