From dd240f0ebfc9896bb62d584337bab71328f950b3 Mon Sep 17 00:00:00 2001 From: PedroTroller Date: Mon, 26 Feb 2024 10:47:01 +0100 Subject: [PATCH] refactor: fix php-cs-fixer error --- composer.json | 10 +++++++++- src/Gaufrette/Util/Path.php | 7 ++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index ba659350..8fbeda20 100644 --- a/composer.json +++ b/composer.json @@ -16,7 +16,15 @@ } ], "require": { - "php": "^8.0" + "php": "^8.0", + "aws/aws-sdk-php": "^3.158", + "google/apiclient": "^2.12", + "doctrine/dbal": "^3.4", + "league/flysystem": "^1.0", + "microsoft/azure-storage-blob": "^1.0", + "phpseclib/phpseclib": "^2.0", + "mongodb/mongodb": "^1.1", + "async-aws/simple-s3": "^0.1.1" }, "conflict": { "microsoft/windowsazure": "<0.4.3" diff --git a/src/Gaufrette/Util/Path.php b/src/Gaufrette/Util/Path.php index c2d8d2af..54e788d7 100644 --- a/src/Gaufrette/Util/Path.php +++ b/src/Gaufrette/Util/Path.php @@ -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) {