From 9bbe2c68dad3f02c2c3d529f9200bdcec23e7f9d Mon Sep 17 00:00:00 2001 From: tinect Date: Wed, 27 Dec 2023 01:43:33 +0100 Subject: [PATCH] style: apply codestyle --- src/AdapterTestUtilities/FilesystemAdapterTestCase.php | 2 +- src/InMemory/InMemoryFilesystemAdapter.php | 3 +-- src/ZipArchive/ZipArchiveAdapter.php | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/AdapterTestUtilities/FilesystemAdapterTestCase.php b/src/AdapterTestUtilities/FilesystemAdapterTestCase.php index c4bad0879..927874d04 100644 --- a/src/AdapterTestUtilities/FilesystemAdapterTestCase.php +++ b/src/AdapterTestUtilities/FilesystemAdapterTestCase.php @@ -4,7 +4,6 @@ namespace League\Flysystem\AdapterTestUtilities; -use League\Flysystem\UnableToDeleteFile; use const PHP_EOL; use DateInterval; use DateTimeImmutable; @@ -15,6 +14,7 @@ use League\Flysystem\FileAttributes; use League\Flysystem\FilesystemAdapter; use League\Flysystem\StorageAttributes; +use League\Flysystem\UnableToDeleteFile; use League\Flysystem\UnableToMoveFile; use League\Flysystem\UnableToProvideChecksum; use League\Flysystem\UnableToReadFile; diff --git a/src/InMemory/InMemoryFilesystemAdapter.php b/src/InMemory/InMemoryFilesystemAdapter.php index fe050bb46..a7389b6db 100644 --- a/src/InMemory/InMemoryFilesystemAdapter.php +++ b/src/InMemory/InMemoryFilesystemAdapter.php @@ -20,7 +20,6 @@ use function array_keys; use function rtrim; -use function strpos; class InMemoryFilesystemAdapter implements FilesystemAdapter { @@ -217,7 +216,7 @@ public function listContents(string $path, bool $deep): iterable continue; } - if ($deep === true || !str_contains($subPath, '/')) { + if ($deep === true || ! str_contains($subPath, '/')) { yield new FileAttributes(ltrim($filePath, '/'), $file->fileSize(), $file->visibility(), $file->lastModified(), $file->mimeType()); } } diff --git a/src/ZipArchive/ZipArchiveAdapter.php b/src/ZipArchive/ZipArchiveAdapter.php index a31d53797..52114ba37 100644 --- a/src/ZipArchive/ZipArchiveAdapter.php +++ b/src/ZipArchive/ZipArchiveAdapter.php @@ -169,7 +169,7 @@ public function deleteDirectory(string $path): void $itemPath = $stats['name']; - if (!str_starts_with($itemPath, $prefixedPath)) { + if ( ! str_starts_with($itemPath, $prefixedPath)) { continue; }