diff --git a/src/FilesystemAdapter.php b/src/FilesystemAdapter.php index 31ffe9fc2..714309f31 100644 --- a/src/FilesystemAdapter.php +++ b/src/FilesystemAdapter.php @@ -8,13 +8,13 @@ interface FilesystemAdapter { /** * @throws FilesystemException - * @throws UnableToCheckFileExistence + * @throws UnableToCheckExistence */ public function fileExists(string $path): bool; /** * @throws FilesystemException - * @throws UnableToCheckDirectoryExistence + * @throws UnableToCheckExistence */ public function directoryExists(string $path): bool; diff --git a/src/FilesystemReader.php b/src/FilesystemReader.php index 62194d9a9..d08743f92 100644 --- a/src/FilesystemReader.php +++ b/src/FilesystemReader.php @@ -15,13 +15,13 @@ interface FilesystemReader /** * @throws FilesystemException - * @throws UnableToCheckFileExistence + * @throws UnableToCheckExistence */ public function fileExists(string $location): bool; /** * @throws FilesystemException - * @throws UnableToCheckDirectoryExistence + * @throws UnableToCheckExistence */ public function directoryExists(string $location): bool; diff --git a/src/UnableToCheckDirectoryExistence.php b/src/UnableToCheckDirectoryExistence.php index a935f012b..73ce858b9 100644 --- a/src/UnableToCheckDirectoryExistence.php +++ b/src/UnableToCheckDirectoryExistence.php @@ -4,15 +4,8 @@ namespace League\Flysystem; -use Throwable; - class UnableToCheckDirectoryExistence extends UnableToCheckExistence { - public static function forLocation(string $path, Throwable $exception = null): static - { - return new static("Unable to check directory existence for: ${path}", 0, $exception); - } - public function operation(): string { return FilesystemOperationFailed::OPERATION_DIRECTORY_EXISTS; diff --git a/src/UnableToCheckFileExistence.php b/src/UnableToCheckFileExistence.php index ba494b83e..bc0536dcb 100644 --- a/src/UnableToCheckFileExistence.php +++ b/src/UnableToCheckFileExistence.php @@ -4,16 +4,8 @@ namespace League\Flysystem; -use RuntimeException; -use Throwable; - class UnableToCheckFileExistence extends UnableToCheckExistence { - public static function forLocation(string $path, Throwable $exception = null): static - { - return new static("Unable to check existence for: ${path}", 0, $exception); - } - public function operation(): string { return FilesystemOperationFailed::OPERATION_FILE_EXISTS;