-
-
Notifications
You must be signed in to change notification settings - Fork 947
checkImplicitMixed reports "mixed given" on an array #10704
Copy link
Copy link
Closed
Labels
Milestone
Description
Bug report
To reproduce (not possible on https://phpstan.org/try cause checkImplicitMixed must be enabled):
<?php declare(strict_types = 1);
$hosts = [];
$weights = [];
$success = getmxrr('', $hosts, $weights);
echo count($hosts);PHPStan 1.10.60 is reporting:
Parameter #1 $value of function count expects array|Countable, mixed given.
But the function signature of getmxrr() says it's an array: https://github.com/phpstan/phpstan-src/blob/1.11.x/resources/functionMap.php#L3337
Code snippet that reproduces the problem
No response
Expected output
No error.
Did PHPStan help you today? Did it make you happy in any way?
Yes! :-)
Reactions are currently unavailable