From ec2d50889e66f4ca6fe85593cabb18e9fc2ff80e Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Sat, 21 Jun 2025 16:00:22 +0200 Subject: [PATCH] Rename method --- src/Drivers/AbstractDecoder.php | 4 ++-- src/ImageManager.php | 2 +- src/Interfaces/ImageManagerInterface.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Drivers/AbstractDecoder.php b/src/Drivers/AbstractDecoder.php index 1c27c2cd..2e495a44 100644 --- a/src/Drivers/AbstractDecoder.php +++ b/src/Drivers/AbstractDecoder.php @@ -96,7 +96,7 @@ abstract class AbstractDecoder implements DecoderInterface $result = preg_match($pattern, (string) $input, $matches); - return new class ($matches, $result) + return new class($matches, $result) { /** * @param array $matches @@ -172,7 +172,7 @@ abstract class AbstractDecoder implements DecoderInterface } if (!@is_file($path)) { - throw new DecoderException("File ('" . $basename . "') not found."); + throw new DecoderException("File ('" . $basename . "') not found in directory ('" . $dirname . "')."); } return $path; diff --git a/src/ImageManager.php b/src/ImageManager.php index 8bb62f5b..94371bbb 100644 --- a/src/ImageManager.php +++ b/src/ImageManager.php @@ -89,7 +89,7 @@ final class ImageManager implements ImageManagerInterface * * @see ImageManagerInterface::create() */ - public function createFromFilePath(string $path): ImageInterface + public function createFromPath(string $path): ImageInterface { return $this->driver->handleInput($path, [FilePathImageDecoder::class]); } diff --git a/src/Interfaces/ImageManagerInterface.php b/src/Interfaces/ImageManagerInterface.php index 84fe82a6..cd477554 100644 --- a/src/Interfaces/ImageManagerInterface.php +++ b/src/Interfaces/ImageManagerInterface.php @@ -24,7 +24,7 @@ interface ImageManagerInterface * * @throws DecoderException */ - public function createFromFilePath(string $path): ImageInterface; + public function createFromPath(string $path): ImageInterface; /** * Create new image instance from given image binary data