Allow aliased non-compound use statements in the code section.

Follow up to: c1bb695f4b (diff-2040a96d3a0b43fe38675a7ee54fd8d6)
This commit is contained in:
Luke Towers 2020-08-23 01:23:06 -06:00
parent c23daf13f3
commit edae0c2476
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}
}