mirror of
https://github.com/Intervention/image.git
synced 2025-08-10 07:53:58 +02:00
Add minor code improvements
This commit is contained in:
@@ -17,7 +17,6 @@ abstract class AbstractDecoder implements DecoderInterface
|
|||||||
|
|
||||||
public function __construct(protected ?AbstractDecoder $successor = null)
|
public function __construct(protected ?AbstractDecoder $successor = null)
|
||||||
{
|
{
|
||||||
//
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -27,7 +26,7 @@ abstract class AbstractDecoder implements DecoderInterface
|
|||||||
* @return ImageInterface|ColorInterface
|
* @return ImageInterface|ColorInterface
|
||||||
* @throws DecoderException
|
* @throws DecoderException
|
||||||
*/
|
*/
|
||||||
final public function handle($input): ImageInterface|ColorInterface
|
final public function handle(mixed $input): ImageInterface|ColorInterface
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$decoded = $this->decode($input);
|
$decoded = $this->decode($input);
|
||||||
@@ -117,7 +116,7 @@ abstract class AbstractDecoder implements DecoderInterface
|
|||||||
|
|
||||||
$result = preg_match($pattern, $value, $matches);
|
$result = preg_match($pattern, $value, $matches);
|
||||||
|
|
||||||
return new class($matches, $result)
|
return new class ($matches, $result)
|
||||||
{
|
{
|
||||||
private $matches;
|
private $matches;
|
||||||
private $result;
|
private $result;
|
||||||
|
Reference in New Issue
Block a user