diff --git a/src/Analyzers/PixelColorAnalyzer.php b/src/Analyzers/PixelColorAnalyzer.php index acd2f58..aa91b00 100644 --- a/src/Analyzers/PixelColorAnalyzer.php +++ b/src/Analyzers/PixelColorAnalyzer.php @@ -36,7 +36,7 @@ protected function colorAt(ColorspaceInterface $colorspace, VipsImage $vipsImage return $this->driver() ->colorProcessor($colorspace) ->nativeToColor(array_map( - fn ($value): int => (int) min($value, 255), + fn(int|float $value): int => (int) min($value, 255), $vipsImage->getpoint($x, $y) )); } diff --git a/src/ColorProcessor.php b/src/ColorProcessor.php index 042a456..418492e 100644 --- a/src/ColorProcessor.php +++ b/src/ColorProcessor.php @@ -32,7 +32,7 @@ public function __construct(protected ColorspaceInterface $colorspace) */ public function colorToNative(ColorInterface $color) { - return array_map(fn($value) => $value * 255, $color->normalize()); + return array_map(fn(float $value) => $value * 255, $color->normalize()); } /**