psalm
psalm copied to clipboard
False UnusedFunctionCall error
This shouldn't throw a UnusedFunctionCall error: https://psalm.dev/r/6a2fe4fa74
I found these snippets:
https://psalm.dev/r/6a2fe4fa74
<?php
$parser = xml_parser_create('');
xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, "UTF-8");
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
Psalm output (using commit ef3b018):
ERROR: UnusedFunctionCall - 4:1 - The call to xml_parser_set_option is not used
ERROR: UnusedFunctionCall - 5:1 - The call to xml_parser_set_option is not used
ERROR: UnusedFunctionCall - 6:1 - The call to xml_parser_set_option is not used
Please add it to psalm dictionaries/ImpureFunctionsList.php as impure function and create a PR
Opened: #10887