mirror of
https://github.com/Intervention/image.git
synced 2025-08-20 20:51:20 +02:00
Rename method
This commit is contained in:
@@ -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<mixed> $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;
|
||||
|
@@ -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]);
|
||||
}
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user