@@ -220,18 +220,18 @@ |
||
220 | 220 | if ($recursive === true && $directory === '') { |
221 | 221 | $regex = '/^.*$/'; |
222 | 222 | } else if ($recursive === true && $directory !== '') { |
223 | - $regex = '/^' . preg_quote($directory) . '\/.*$/'; |
|
223 | + $regex = '/^'.preg_quote($directory).'\/.*$/'; |
|
224 | 224 | } else if ($recursive === false && $directory === '') { |
225 | 225 | $regex = '/^(?!.*\\/).*$/'; |
226 | 226 | } else if ($recursive === false && $directory !== '') { |
227 | - $regex = '/^' . preg_quote($directory) . '\/(?!.*\\/).*$/'; |
|
227 | + $regex = '/^'.preg_quote($directory).'\/(?!.*\\/).*$/'; |
|
228 | 228 | } else { |
229 | 229 | throw new \InvalidArgumentException(); |
230 | 230 | } |
231 | - $fileObjects = array_filter($fileObjects, function ($fileObject) use ($directory, $regex) { |
|
231 | + $fileObjects = array_filter($fileObjects, function($fileObject) use ($directory, $regex) { |
|
232 | 232 | return 1 === preg_match($regex, $fileObject->getName()); |
233 | 233 | }); |
234 | - $normalized = array_map(function ($fileObject) { |
|
234 | + $normalized = array_map(function($fileObject) { |
|
235 | 235 | return $this->getFileInfo($fileObject); |
236 | 236 | }, $fileObjects); |
237 | 237 | return array_values($normalized); |