File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -47,7 +47,8 @@ public function getClassNameFromFile($file)
4747 for (; $ i < count ($ tokens ); $ i ++) {
4848 if ($ tokens [$ i ][0 ] === \T_NAMESPACE ) {
4949 for ($ j = $ i + 1 ; $ j < count ($ tokens ); $ j ++) {
50- if ($ tokens [$ j ][0 ] === T_STRING ) {
50+ $ tokenId = $ tokens [$ j ][0 ];
51+ if ($ tokenId === T_STRING || $ tokenId === 314 ) {
5152 $ namespace .= '\\' . $ tokens [$ j ][1 ];
5253 } elseif ($ tokens [$ j ] === '{ ' || $ tokens [$ j ] === '; ' ) {
5354 break ;
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public function testClassToFile()
3030 ]), $ candidates );
3131 }
3232
33- public function testClassToFileDeeper ()
33+ public function testClassToFileDeeper (): void
3434 {
3535 $ candidates = $ this ->classToFile ->classToFileCandidates (ClassName::fromString ('Acme \\NamespaceHere \\Hallo ' ));
3636
You can’t perform that action at this time.
0 commit comments