File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -110,10 +110,9 @@ public function getPath(string $fqcn): string
110110 public function getFilenameFromPathAndName (string $ path , string $ name ): string
111111 {
112112 $ filePath = $ this ->getSourceFolder () . DIRECTORY_SEPARATOR ;
113+ $ filePath .= $ this ->normalizePath ($ path ) . DIRECTORY_SEPARATOR ;
113114
114- if ($ path = \trim ($ path , '/ ' )) {
115- $ filePath .= $ this ->normalizePath ($ path ) . DIRECTORY_SEPARATOR ;
116- }
115+ $ filePath = \str_replace ('// ' , '/ ' , $ filePath );
117116
118117 return $ filePath . $ name . '.php ' ;
119118 }
Original file line number Diff line number Diff line change @@ -42,6 +42,15 @@ public function it_can_be_created_from_composer(): void
4242
4343 $ this ->assertSame ('OpenCodeModelingTest \\CodeAst ' , $ psr4InfoList [3 ]->getPackagePrefix ());
4444 $ this ->assertSame ('/service/tests ' , $ psr4InfoList [3 ]->getSourceFolder ());
45+
46+ $ this ->assertSame (
47+ '/service/src/Domain/Model/Building/Building.php ' ,
48+ $ psr4InfoList [0 ]->getFilenameFromPathAndName ('/service/src/Domain/Model/Building ' , 'Building ' )
49+ );
50+ $ this ->assertSame (
51+ '/service/src/Domain/Model/Building/Building.php ' ,
52+ $ psr4InfoList [0 ]->getFilenameFromPathAndName ('Domain/Model/Building ' , 'Building ' )
53+ );
4554 }
4655
4756 /**
You can’t perform that action at this time.
0 commit comments