Skip to content
Permalink
Browse files

Add more impure functions to configuration (#2053)

* Add more impure functions to configuration

Closes #2050

* Change note
  • Loading branch information...
iluuu1994 authored and muglug committed Aug 23, 2019
1 parent 738ba81 commit e0cd04d809ae1612a8ea706b2ac2118ca092d34f
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/Psalm/Internal/Codebase/Functions.php
@@ -271,7 +271,7 @@ public function isCallMapFunctionPure(Codebase $codebase, string $function_id, a
'chdir', 'chgrp', 'chmod', 'chown', 'chroot', 'closedir', 'copy', 'file_put_contents',
'fopen', 'fread', 'fwrite', 'fclose', 'touch', 'fpassthru', 'fputs', 'fscanf', 'fseek',
'ftruncate', 'fprintf', 'symlink', 'mkdir', 'unlink', 'rename', 'rmdir', 'popen', 'pclose',
'fputcsv', 'umask',
'fputcsv', 'umask', 'finfo_close',
// stream/socket io
'stream_context_set_option', 'socket_write', 'stream_set_blocking', 'socket_close',
@@ -321,6 +321,15 @@ public function isCallMapFunctionPure(Codebase $codebase, string $function_id, a
// logging
'openlog', 'syslog', 'error_log', 'define_syslog_variables',
// session
'session_id', 'session_name', 'session_set_cookie_params',
// ldap
'ldap_set_option',
// iterators
'rewind',
];
if (\in_array(strtolower($function_id), $impure_functions, true)) {

0 comments on commit e0cd04d

Please sign in to comment.
You can’t perform that action at this time.