From 28dea6eb9a74edc4ba4447106cac4e2baff8c468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bar=C3=A1=C5=A1ek?= Date: Wed, 10 Feb 2021 11:50:46 +0100 Subject: [PATCH] Fix PhpStan --- src/MandelbrotSet.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MandelbrotSet.php b/src/MandelbrotSet.php index 0596727..1d278d2 100644 --- a/src/MandelbrotSet.php +++ b/src/MandelbrotSet.php @@ -60,7 +60,7 @@ public function generate(MandelbrotSetRequest $request): void $blackColor = imagecolorallocate($im, 0, 0, 0); $alpha_color = imagecolorallocatealpha($im, 0, 0, 0, 127); - imagefill($im, 0, 0, $alpha_color); + imagefill($im, 0, 0, (int) $alpha_color); for ($y = 0; $y <= $dim_y; $y++) { // browsing and evaluating each point for ($x = 0; $x <= $dim_x; $x++) { // find the coordinates of the point that is added in each iteration @@ -100,7 +100,7 @@ public function generate(MandelbrotSetRequest $request): void // if in each iteration he held a new point at a distance of 2 or less, the original point is filled. if ($i >= $itt) { - imagesetpixel($im, (int) round($x), (int) round($y), $blackColor); + imagesetpixel($im, (int) round($x), (int) round($y), (int) $blackColor); } } }