@@ -72,7 +72,7 @@ public function __construct(
7272
7373 public function getFileDestPath (DocumentTypeInterface $ documentType , string $ filePath ): string
7474 {
75- return $ this ->resolveDestFilePath ($ documentType , $ filePath , $ this ->resolvePath ($ documentType, ' file ' ));
75+ return $ this ->resolveDestFilePath ($ documentType , $ filePath , $ this ->resolvePath ($ documentType ));
7676 }
7777
7878 public function getImageDestPath (DocumentTypeInterface $ documentType , string $ filePath ): string
@@ -88,7 +88,8 @@ public function getFilePath(DocumentInterface $document): string
8888
8989 public function getImagePath (DocumentInterface $ document ): string
9090 {
91- return $ this ->filesystem ->getDirectoryRead (DirectoryList::MEDIA )->getAbsolutePath ($ document ->getImageFileName ());
91+ return $ this ->filesystem ->getDirectoryRead (DirectoryList::MEDIA )
92+ ->getAbsolutePath ($ document ->getImageFileName ());
9293 }
9394
9495 public function getRelativeFilePath (string $ filePath ): string
@@ -99,7 +100,7 @@ public function getRelativeFilePath(string $filePath): string
99100 public function lookupFiles (DocumentTypeInterface $ documentType , ?int $ flags = null ): array
100101 {
101102 $ sourcePath = rtrim ($ this ->filesystem ->getDirectoryRead (DirectoryList::MEDIA )->getAbsolutePath (
102- $ this ->resolvePath ($ documentType, ' file ' ) . ltrim ($ documentType ->getFileSourcePath (), DIRECTORY_SEPARATOR )
103+ $ this ->resolvePath ($ documentType ) . ltrim ($ documentType ->getFileSourcePath (), DIRECTORY_SEPARATOR )
103104 ), DIRECTORY_SEPARATOR );
104105
105106 return Glob::glob (
@@ -129,21 +130,21 @@ public function deleteFile(string $filePath): bool
129130 return false ;
130131 }
131132
132- private function resolvePath (DocumentTypeInterface $ documentType, string $ fileType ): string
133+ private function resolvePath (DocumentTypeInterface $ documentType ): string
133134 {
134- return $ this ->pathResolver ->resolvePath ($ documentType ) . DIRECTORY_SEPARATOR . $ fileType . DIRECTORY_SEPARATOR ;
135+ return $ this ->pathResolver ->resolvePath ($ documentType );
135136 }
136137
137138 private function resolveFileSubPath (DocumentTypeInterface $ documentType , string $ fileName ): string
138139 {
139140 return implode (
140- DIRECTORY_SEPARATOR ,
141- array_slice (
142- (array ) mb_str_split (strtolower (preg_replace ('/\W+/ ' , '' , pathinfo ($ fileName , PATHINFO_FILENAME )))),
143- 0 ,
144- $ documentType ->getSubPathLength ()
145- )
146- ) . DIRECTORY_SEPARATOR . $ fileName ;
141+ DIRECTORY_SEPARATOR ,
142+ array_slice (
143+ (array ) mb_str_split (strtolower (preg_replace ('/\W+/ ' , '' , pathinfo ($ fileName , PATHINFO_FILENAME )))),
144+ 0 ,
145+ $ documentType ->getSubPathLength ()
146+ )
147+ ) . DIRECTORY_SEPARATOR . $ fileName ;
147148 }
148149
149150 private function resolveDestFilePath (
0 commit comments