Allow aliased non-compound use statements in the code section.
Follow up to: c1bb695f4b (diff-2040a96d3a0b43fe38675a7ee54fd8d6)
This commit is contained in:
parent
c23daf13f3
commit
edae0c2476
|
|
@ -141,7 +141,8 @@ class CodeParser
|
|||
$fileContents = '<?php '.PHP_EOL;
|
||||
|
||||
foreach ($namespaces[0] as $namespace) {
|
||||
if (str_contains($namespace, '\\')) {
|
||||
// Only allow compound or aliased use statements
|
||||
if (str_contains($namespace, '\\') || str_contains($namespace, ' as ')) {
|
||||
$fileContents .= trim($namespace).PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue