mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
mark ftp_close as impure
in theory, all ftp_* functions are impure, but not marking them encourages the good practice of checking the return value. However, ftp_close(), while it's possible for it to fail, what good would checking the return type do? How is one supposed to handle the failure to close a stream in a way that affects future program flow?
This commit is contained in:
parent
06f7df9974
commit
ab9c82e251
@ -367,6 +367,9 @@ class Functions
|
||||
'mysqli_select_db', 'mysqli_dump_debug_info', 'mysqli_kill', 'mysqli_multi_query',
|
||||
'mysqli_next_result', 'mysqli_options', 'mysqli_ping', 'mysqli_query', 'mysqli_report',
|
||||
'mysqli_rollback', 'mysqli_savepoint', 'mysqli_set_charset', 'mysqli_ssl_set',
|
||||
|
||||
// ftp
|
||||
'ftp_close',
|
||||
];
|
||||
|
||||
if (\in_array(strtolower($function_id), $impure_functions, true)) {
|
||||
|
Loading…
Reference in New Issue
Block a user