Skip to content

Commit

Permalink
refactor: fix php-cs-fixer error
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroTroller committed Feb 26, 2024
1 parent ecb8a4c commit 506c9ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Gaufrette/Filesystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Filesystem implements FilesystemInterface
/**
* Contains File objects created with $this->createFile() method.
*
* @var array<string, string|File>
* @var array<string, File>
*/
protected array $fileRegister = [];

Expand Down
7 changes: 6 additions & 1 deletion src/Gaufrette/Util/Path.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ public static function normalize(string $path): string
$path = str_replace('\\', '/', $path);
$prefix = static::getAbsolutePrefix($path);
$path = substr($path, strlen($prefix));
$parts = array_filter(explode('/', $path), 'strlen');
$parts = array_filter(
explode('/', $path),
function (string $part): bool {
return '' !== $part;
},
);
$tokens = [];

foreach ($parts as $part) {
Expand Down

0 comments on commit 506c9ab

Please sign in to comment.