diff --git a/src/Psalm/Internal/CallMap.php b/src/Psalm/Internal/CallMap.php index f4d5ace27..79ef16ff2 100644 --- a/src/Psalm/Internal/CallMap.php +++ b/src/Psalm/Internal/CallMap.php @@ -1533,7 +1533,7 @@ return [ 'Couchbase\WildcardSearchQuery::jsonSerialize' => ['array'], 'Couchbase\zlibCompress' => ['string', 'data'=>'string'], 'Couchbase\zlibDecompress' => ['string', 'data'=>'string'], -'count' => ['int', 'var'=>'Countable|array', 'mode='=>'int'], +'count' => ['int', 'var'=>'Countable|array|SimpleXMLElement|ResourceBundle', 'mode='=>'int'], 'count_chars' => ['mixed', 'input'=>'string', 'mode='=>'int'], 'Countable::count' => ['int'], 'crack_check' => ['bool', 'dictionary'=>'', 'password'=>'string'], diff --git a/tests/FunctionCallTest.php b/tests/FunctionCallTest.php index 3cc83f97e..4afdd4d56 100644 --- a/tests/FunctionCallTest.php +++ b/tests/FunctionCallTest.php @@ -1675,6 +1675,11 @@ class FunctionCallTest extends TestCase takesString($s); }', ], + 'countableSimpleXmlElement' => [ + '"); + echo count($xml);' + ], ]; }