-
-
Notifications
You must be signed in to change notification settings - Fork 946
Closed
phpstan/phpstan-src
#3017Labels
Milestone
Description
Bug report
Hello,
Analysis of \Imagick::identifyImage() is incorrect. As you can see in the first example in the PHP documentation https://www.php.net/manual/en/imagick.identifyimage.php, the method return an array with more than width and height. And about these two keys, the mapping is also incorrect as width and height are in a nested array with geometry key.
Example:
array:11 [
"imageName" => "foo.pdf"
"mimetype" => "application/pdf"
"format" => "PDF (Portable Document Format)"
"units" => "Undefined"
"colorSpace" => "sRGB"
"type" => "Bilevel"
"compression" => "Undefined"
"fileSize" => "5945B"
"geometry" => array:2 [
"width" => 842
"height" => 595
]
"resolution" => array:2 [
"x" => 72.0
"y" => 72.0
]
"signature" => "foo"
]
Code snippet that reproduces the problem
https://phpstan.org/r/a33b5101-d293-4da3-b4ef-cc71736ee6f4
Expected output
I think PHPStan return type of \Imagick::identifyImage() should be updated
Did PHPStan help you today? Did it make you happy in any way?
No response
Reactions are currently unavailable