Skip to content

Commit

Permalink
Add pureUnlessCallableIsImpureParameters to functionMetadata_original…
Browse files Browse the repository at this point in the history
….php
  • Loading branch information
zonuexe committed Nov 19, 2024
1 parent 0019dcf commit 1cc1fad
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 20 deletions.
29 changes: 19 additions & 10 deletions bin/functionMetadata_original.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,43 @@
'array_diff' => ['hasSideEffects' => false],
'array_diff_assoc' => ['hasSideEffects' => false],
'array_diff_key' => ['hasSideEffects' => false],
'array_diff_uassoc' => ['hasSideEffects' => false],
'array_diff_ukey' => ['hasSideEffects' => false],
'array_diff_uassoc' => ['pureUnlessCallableIsImpureParameters' => ['key_compare_func' => true]],
'array_diff_ukey' => ['pureUnlessCallableIsImpureParameters' => ['key_comp_func' => true]],
'array_fill' => ['hasSideEffects' => false],
'array_fill_keys' => ['hasSideEffects' => false],
'array_filter' => ['pureUnlessCallableIsImpureParameters' => ['callback' => true]],
'array_find' => ['pureUnlessCallableIsImpureParameters' => ['callback' => true]],
'array_flip' => ['hasSideEffects' => false],
'array_intersect' => ['hasSideEffects' => false],
'array_intersect_assoc' => ['hasSideEffects' => false],
'array_intersect_key' => ['hasSideEffects' => false],
'array_intersect_uassoc' => ['hasSideEffects' => false],
'array_intersect_ukey' => ['hasSideEffects' => false],
'array_intersect_uassoc' => ['pureUnlessCallableIsImpureParameters' => ['key_compare_func' => true]],
'array_intersect_ukey' => ['pureUnlessCallableIsImpureParameters' => ['key_compare_func' => true]],
'array_key_first' => ['hasSideEffects' => false],
'array_key_last' => ['hasSideEffects' => false],
'array_key_exists' => ['hasSideEffects' => false],
'array_keys' => ['hasSideEffects' => false],
'array_map' => ['pureUnlessCallableIsImpureParameters' => ['callback' => true]],
'array_merge' => ['hasSideEffects' => false],
'array_merge_recursive' => ['hasSideEffects' => false],
'array_pad' => ['hasSideEffects' => false],
'array_pop' => ['hasSideEffects' => true],
'array_product' => ['hasSideEffects' => false],
'array_push' => ['hasSideEffects' => true],
'array_rand' => ['hasSideEffects' => false],
'array_reduce' => ['pureUnlessCallableIsImpureParameters' => ['callback' => true]],
'array_replace' => ['hasSideEffects' => false],
'array_replace_recursive' => ['hasSideEffects' => false],
'array_reverse' => ['hasSideEffects' => false],
'array_shift' => ['hasSideEffects' => true],
'array_slice' => ['hasSideEffects' => false],
'array_sum' => ['hasSideEffects' => false],
'array_udiff' => ['hasSideEffects' => false],
'array_udiff_assoc' => ['hasSideEffects' => false],
'array_udiff_uassoc' => ['hasSideEffects' => false],
'array_uintersect' => ['hasSideEffects' => false],
'array_uintersect_assoc' => ['hasSideEffects' => false],
'array_uintersect_uassoc' => ['hasSideEffects' => false],
'array_udiff' => ['pureUnlessCallableIsImpureParameters' => ['data_comp_func' => true]],
'array_udiff_assoc' => ['pureUnlessCallableIsImpureParameters' => ['key_comp_func' => true]],
'array_udiff_uassoc' => ['pureUnlessCallableIsImpureParameters' => ['data_comp_func' => true, 'key_comp_func' => true]],
'array_uintersect' => ['pureUnlessCallableIsImpureParameters' => ['data_compare_func' => true]],
'array_uintersect_assoc' => ['pureUnlessCallableIsImpureParameters' => ['data_compare_func' => true]],
'array_uintersect_uassoc' => ['pureUnlessCallableIsImpureParameters' => ['data_compare_func' => true, 'key_compare_func' => true]],
'array_unique' => ['hasSideEffects' => false],
'array_unshift' => ['hasSideEffects' => true],
'array_values' => ['hasSideEffects' => false],
Expand All @@ -64,6 +68,8 @@
'bcdiv' => ['hasSideEffects' => false],
'bcmod' => ['hasSideEffects' => false],
'bcmul' => ['hasSideEffects' => false],
'call_user_func' => ['pureUnlessCallableIsImpureParameters' => ['function' => true]],
'call_user_func_array' => ['pureUnlessCallableIsImpureParameters' => ['function' => true]],
// continue functionMap.php, line 424
'chgrp' => ['hasSideEffects' => true],
'chmod' => ['hasSideEffects' => true],
Expand All @@ -83,6 +89,8 @@
'file_put_contents' => ['hasSideEffects' => true],
'flock' => ['hasSideEffects' => true],
'fopen' => ['hasSideEffects' => true],
'forward_static_call' => ['pureUnlessCallableIsImpureParameters' => ['function' => true]],
'forward_static_call_array' => ['pureUnlessCallableIsImpureParameters' => ['function' => true]],
'fpassthru' => ['hasSideEffects' => true],
'fputcsv' => ['hasSideEffects' => true],
'fputs' => ['hasSideEffects' => true],
Expand All @@ -100,6 +108,7 @@
'move_uploaded_file' => ['hasSideEffects' => true],
'pclose' => ['hasSideEffects' => true],
'popen' => ['hasSideEffects' => true],
'preg_replace_callback' => ['pureUnlessCallableIsImpureParameters' => ['callback' => true]],
'readfile' => ['hasSideEffects' => true],
'rename' => ['hasSideEffects' => true],
'rewind' => ['hasSideEffects' => true],
Expand Down
29 changes: 19 additions & 10 deletions resources/functionMetadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -700,41 +700,45 @@
'array_diff' => ['hasSideEffects' => false],
'array_diff_assoc' => ['hasSideEffects' => false],
'array_diff_key' => ['hasSideEffects' => false],
'array_diff_uassoc' => ['hasSideEffects' => false],
'array_diff_ukey' => ['hasSideEffects' => false],
'array_diff_uassoc' => ['pureUnlessCallableIsImpureParameters' => ['key_compare_func' => true]],
'array_diff_ukey' => ['pureUnlessCallableIsImpureParameters' => ['key_comp_func' => true]],
'array_fill' => ['hasSideEffects' => false],
'array_fill_keys' => ['hasSideEffects' => false],
'array_filter' => ['pureUnlessCallableIsImpureParameters' => ['callback' => true]],
'array_find' => ['pureUnlessCallableIsImpureParameters' => ['callback' => true]],
'array_flip' => ['hasSideEffects' => false],
'array_intersect' => ['hasSideEffects' => false],
'array_intersect_assoc' => ['hasSideEffects' => false],
'array_intersect_key' => ['hasSideEffects' => false],
'array_intersect_uassoc' => ['hasSideEffects' => false],
'array_intersect_ukey' => ['hasSideEffects' => false],
'array_intersect_uassoc' => ['pureUnlessCallableIsImpureParameters' => ['key_compare_func' => true]],
'array_intersect_ukey' => ['pureUnlessCallableIsImpureParameters' => ['key_compare_func' => true]],
'array_is_list' => ['hasSideEffects' => false],
'array_key_exists' => ['hasSideEffects' => false],
'array_key_first' => ['hasSideEffects' => false],
'array_key_last' => ['hasSideEffects' => false],
'array_keys' => ['hasSideEffects' => false],
'array_map' => ['pureUnlessCallableIsImpureParameters' => ['callback' => true]],
'array_merge' => ['hasSideEffects' => false],
'array_merge_recursive' => ['hasSideEffects' => false],
'array_pad' => ['hasSideEffects' => false],
'array_pop' => ['hasSideEffects' => true],
'array_product' => ['hasSideEffects' => false],
'array_push' => ['hasSideEffects' => true],
'array_rand' => ['hasSideEffects' => false],
'array_reduce' => ['pureUnlessCallableIsImpureParameters' => ['callback' => true]],
'array_replace' => ['hasSideEffects' => false],
'array_replace_recursive' => ['hasSideEffects' => false],
'array_reverse' => ['hasSideEffects' => false],
'array_search' => ['hasSideEffects' => false],
'array_shift' => ['hasSideEffects' => true],
'array_slice' => ['hasSideEffects' => false],
'array_sum' => ['hasSideEffects' => false],
'array_udiff' => ['hasSideEffects' => false],
'array_udiff_assoc' => ['hasSideEffects' => false],
'array_udiff_uassoc' => ['hasSideEffects' => false],
'array_uintersect' => ['hasSideEffects' => false],
'array_uintersect_assoc' => ['hasSideEffects' => false],
'array_uintersect_uassoc' => ['hasSideEffects' => false],
'array_udiff' => ['pureUnlessCallableIsImpureParameters' => ['data_comp_func' => true]],
'array_udiff_assoc' => ['pureUnlessCallableIsImpureParameters' => ['key_comp_func' => true]],
'array_udiff_uassoc' => ['pureUnlessCallableIsImpureParameters' => ['data_comp_func' => true ,'key_comp_func' => true]],
'array_uintersect' => ['pureUnlessCallableIsImpureParameters' => ['data_compare_func' => true]],
'array_uintersect_assoc' => ['pureUnlessCallableIsImpureParameters' => ['data_compare_func' => true]],
'array_uintersect_uassoc' => ['pureUnlessCallableIsImpureParameters' => ['data_compare_func' => true ,'key_compare_func' => true]],
'array_unique' => ['hasSideEffects' => false],
'array_unshift' => ['hasSideEffects' => true],
'array_values' => ['hasSideEffects' => false],
Expand Down Expand Up @@ -765,6 +769,8 @@
'bzerror' => ['hasSideEffects' => false],
'bzerrstr' => ['hasSideEffects' => false],
'bzopen' => ['hasSideEffects' => false],
'call_user_func' => ['pureUnlessCallableIsImpureParameters' => ['function' => true]],
'call_user_func_array' => ['pureUnlessCallableIsImpureParameters' => ['function' => true]],
'ceil' => ['hasSideEffects' => false],
'checkdate' => ['hasSideEffects' => false],
'checkdnsrr' => ['hasSideEffects' => false],
Expand Down Expand Up @@ -915,6 +921,8 @@
'fmod' => ['hasSideEffects' => false],
'fnmatch' => ['hasSideEffects' => false],
'fopen' => ['hasSideEffects' => true],
'forward_static_call' => ['pureUnlessCallableIsImpureParameters' => ['function' => true]],
'forward_static_call_array' => ['pureUnlessCallableIsImpureParameters' => ['function' => true]],
'fpassthru' => ['hasSideEffects' => true],
'fputcsv' => ['hasSideEffects' => true],
'fputs' => ['hasSideEffects' => true],
Expand Down Expand Up @@ -1447,6 +1455,7 @@
'preg_last_error' => ['hasSideEffects' => false],
'preg_last_error_msg' => ['hasSideEffects' => false],
'preg_quote' => ['hasSideEffects' => false],
'preg_replace_callback' => ['pureUnlessCallableIsImpureParameters' => ['callback' => true]],
'preg_split' => ['hasSideEffects' => false],
'property_exists' => ['hasSideEffects' => false],
'quoted_printable_decode' => ['hasSideEffects' => false],
Expand Down

0 comments on commit 1cc1fad

Please sign in to comment.