Wrong return type of \Imagick::mergeImageLayers() #4450
-
Hello everyone I do have the following code for example: (This did not work on the playground because of missing Imagick class) <?php
declare(strict_types = 1);
class magicktest
{
public function imagick(): \Imagick
{
$img = new \Imagick(__DIR__."/image.jpg");
$img = $img->mergeImageLayers(\Imagick::LAYERMETHOD_FLATTEN);
var_dump($img);
$img->setImageCompressionQuality(90);
return $img;
}
}
$m = new magicktest;
$m->imagick(); When I run the code (with PHP 8) i get the following result.
But phpstan returns the following errors.
Now I don't know, where the problem really is. Where does phpstan get the return value from |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, phpstan.org reproduction works fine: https://phpstan.org/r/8e231f94-2f5d-47a4-9271-cef9062b95c3 You can follow this issue template (https://github.com/phpstan/phpstan/issues/new?assignees=&labels=&template=Function_signature_mismatch.md) which says:
Here's the mistake. Please check whether more methods need fixing. Thanks. |
Beta Was this translation helpful? Give feedback.
Hi, phpstan.org reproduction works fine: https://phpstan.org/r/8e231f94-2f5d-47a4-9271-cef9062b95c3
You can follow this issue template (https://github.com/phpstan/phpstan/issues/new?assignees=&labels=&template=Function_signature_mismatch.md) which says:
Here's the mistake. Please check whether more methods need fixing. Thanks.