diff --git a/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php b/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php index 8e835d8beb120..5a32945583956 100644 --- a/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php +++ b/src/Symfony/Component/ClassLoader/ClassCollectionLoader.php @@ -142,6 +142,12 @@ public static function fixNamespaceDeclarations($source) $token = $tokens[$i]; if (is_string($token)) { $output .= $token; + } elseif (T_WHITESPACE === $token[0]) { + if (isset($tokens[$i+1]) && T_COMMENT === $tokens[$i+1][0]) { + // remove spaces before a comment + $token[1] = str_replace(' ', '', $token[1]); + } + $output .= $token[1]; } elseif (in_array($token[0], array(T_COMMENT, T_DOC_COMMENT))) { // strip comments continue;
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: