Skip to content

Commit

Permalink
Remove duplicate methods
Browse files Browse the repository at this point in the history
  • Loading branch information
frankdejonge committed Jan 13, 2022
1 parent cec830e commit 4d70f2d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 19 deletions.
4 changes: 2 additions & 2 deletions src/FilesystemAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions src/FilesystemReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
7 changes: 0 additions & 7 deletions src/UnableToCheckDirectoryExistence.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 0 additions & 8 deletions src/UnableToCheckFileExistence.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4d70f2d

Please sign in to comment.