Skip to content

Commit 4b2dd76

Browse files
authored
Merge pull request #133 from shochdoerfer/feature/omit_proxy_namespace
Omit namespace for non-namespace Proxy
2 parents 17a2473 + 9cc980c commit 4b2dd76

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/bitExpert/PHPStan/Magento/Autoload/ProxyAutoloader.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,11 @@ protected function getFileContents(string $class): string
113113
}
114114

115115
$template = "<?php\n";
116-
$template .= "namespace {NAMESPACE};\n";
116+
117+
if ($namespace !== '') {
118+
$template .= "namespace {NAMESPACE};\n\n";
119+
}
120+
117121
$template .= "/**\n";
118122
$template .= " * Proxy class for @see {CLASSNAME}\n";
119123
$template .= " */\n";

0 commit comments

Comments
 (0)