diff --git a/src/Colors/AbstractColor.php b/src/Colors/AbstractColor.php index 49d1dd2a..be73c770 100644 --- a/src/Colors/AbstractColor.php +++ b/src/Colors/AbstractColor.php @@ -26,7 +26,7 @@ public function channel(string $classname): ColorChannelInterface }); if (count($channels) == 0) { - throw new ColorException('Channel ' . $classname . ' could not be found.'); + throw new ColorException('Color channel ' . $classname . ' could not be found.'); } return reset($channels); diff --git a/src/Drivers/Gd/ColorProcessor.php b/src/Drivers/Gd/ColorProcessor.php index caceff21..cbb593e4 100644 --- a/src/Drivers/Gd/ColorProcessor.php +++ b/src/Drivers/Gd/ColorProcessor.php @@ -40,7 +40,7 @@ public function colorToNative(ColorInterface $color): int public function nativeToColor(mixed $value): ColorInterface { if (! is_int($value)) { - throw new ColorException("GD driver can only decode colors in integer format."); + throw new ColorException('GD driver can only decode colors in integer format.'); } $a = ($value >> 24) & 0xFF; diff --git a/src/Drivers/Gd/Driver.php b/src/Drivers/Gd/Driver.php index 8c53957c..e8efe59c 100644 --- a/src/Drivers/Gd/Driver.php +++ b/src/Drivers/Gd/Driver.php @@ -32,7 +32,7 @@ public function checkHealth(): void { if (!extension_loaded('gd') || !function_exists('gd_info')) { throw new RuntimeException( - 'GD Library extension not available with this PHP installation.' + 'GD PHP extension must be installed to use this driver.' ); } } diff --git a/src/Drivers/Gd/Modifiers/ColorspaceModifier.php b/src/Drivers/Gd/Modifiers/ColorspaceModifier.php index 12e067c9..61e95ce7 100644 --- a/src/Drivers/Gd/Modifiers/ColorspaceModifier.php +++ b/src/Drivers/Gd/Modifiers/ColorspaceModifier.php @@ -16,7 +16,7 @@ public function apply(ImageInterface $image): ImageInterface { if (!is_a($this->targetColorspace(), RgbColorspace::class)) { throw new NotSupportedException( - 'Only RGB colorspace is supported with GD driver.' + 'Only RGB colorspace is supported by GD driver.' ); } diff --git a/src/Drivers/Imagick/Core.php b/src/Drivers/Imagick/Core.php index 96441b2d..4eabbf81 100644 --- a/src/Drivers/Imagick/Core.php +++ b/src/Drivers/Imagick/Core.php @@ -95,7 +95,7 @@ public function frame(int $position): FrameInterface } } - throw new AnimationException('Frame #' . $position . ' is not be found in the image.'); + throw new AnimationException('Frame #' . $position . ' could not be found in the image.'); } public function loops(): int diff --git a/src/Drivers/Imagick/Driver.php b/src/Drivers/Imagick/Driver.php index 99ea0449..cc3cc10e 100644 --- a/src/Drivers/Imagick/Driver.php +++ b/src/Drivers/Imagick/Driver.php @@ -34,7 +34,7 @@ public function checkHealth(): void { if (!extension_loaded('imagick') || !class_exists('Imagick')) { throw new RuntimeException( - 'ImageMagick extension not available with this PHP installation.' + 'Imagick PHP extension must be installed to use this driver.' ); } }