From 61d7cdbac21a64e5a3e8b5ceb5f6a27a939dc24d Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Sun, 17 Dec 2023 09:36:24 +0100 Subject: [PATCH] Add minor code improvements --- src/Drivers/AbstractDecoder.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Drivers/AbstractDecoder.php b/src/Drivers/AbstractDecoder.php index 71b02d32..1378684f 100644 --- a/src/Drivers/AbstractDecoder.php +++ b/src/Drivers/AbstractDecoder.php @@ -17,7 +17,6 @@ abstract class AbstractDecoder implements DecoderInterface public function __construct(protected ?AbstractDecoder $successor = null) { - // } /** @@ -27,7 +26,7 @@ abstract class AbstractDecoder implements DecoderInterface * @return ImageInterface|ColorInterface * @throws DecoderException */ - final public function handle($input): ImageInterface|ColorInterface + final public function handle(mixed $input): ImageInterface|ColorInterface { try { $decoded = $this->decode($input); @@ -117,7 +116,7 @@ abstract class AbstractDecoder implements DecoderInterface $result = preg_match($pattern, $value, $matches); - return new class($matches, $result) + return new class ($matches, $result) { private $matches; private $result;