@@ -39,13 +39,9 @@ class DiscouragedFunctionSniff extends ForbiddenFunctionsSniff
39
39
'^call_user_func_array$ ' => null ,
40
40
'^chdir$ ' => null ,
41
41
'^chgrp$ ' => null ,
42
- // '^chmod$' => 'Magento\Framework\Filesystem\DriverInterface::changePermissions()
43
- // or Magento\Framework\Filesystem\DriverInterface::changePermissionsRecursively',
44
42
'^chown$ ' => null ,
45
43
'^chroot$ ' => null ,
46
44
'^com_load_typelib$ ' => null ,
47
- // '^copy$' => 'Magento\Framework\Filesystem\DriverInterface::copy',
48
- // '^curl_.*$' => null,
49
45
'^cyrus_connect$ ' => null ,
50
46
'^dba_.*$ ' => null ,
51
47
'^dbase_.*$ ' => null ,
@@ -54,21 +50,13 @@ class DiscouragedFunctionSniff extends ForbiddenFunctionsSniff
54
50
'^dcngettext$ ' => null ,
55
51
'^dgettext$ ' => null ,
56
52
'^dio_.*$ ' => null ,
57
- // '^dirname$' => 'Magento\Framework\Filesystem\DriverInterface::getParentDirectory',
58
53
'^dngettext$ ' => null ,
59
54
'^domxml_.*$ ' => null ,
60
55
'^fbsql_.*$ ' => null ,
61
56
'^fbsql$ ' => null ,
62
57
'^fdf_add_doc_javascript$ ' => null ,
63
58
'^fdf_open$ ' => null ,
64
- // '^fopen$' => 'Magento\Framework\Filesystem\DriverInterface::fileOpen',
65
- // '^fclose$' => 'Magento\Framework\Filesystem\DriverInterface::fileClose',
66
- // '^fsockopen$' => 'Magento\Framework\Filesystem\Driver\Http::open',
67
59
'^ftp_.*$ ' => null ,
68
- // '^fwrite$' => 'Magento\Framework\Filesystem\DriverInterface::fileWrite',
69
- // '^fputs$' => 'Magento\Framework\Filesystem\DriverInterface::fileWrite',
70
- // '^gettext$' => 'Magento\Framework\Translate\AdapterInterface::translate',
71
- // // '^_$' => 'Magento\Framework\Translate\AdapterInterface::translate',
72
60
'^gz.*$ ' => null ,
73
61
'^header$ ' => null ,
74
62
'^highlight_file$ ' => null ,
@@ -84,7 +72,6 @@ class DiscouragedFunctionSniff extends ForbiddenFunctionsSniff
84
72
'^link$ ' => null ,
85
73
'^mail$ ' => null ,
86
74
'^mb_send_mail$ ' => null ,
87
- // '^mkdir$' => 'Magento\Framework\Filesystem\DriverInterface::createDirectory',
88
75
'^move_uploaded_file$ ' => null ,
89
76
'^msession_.*$ ' => null ,
90
77
'^msg_send$ ' => null ,
@@ -94,15 +81,13 @@ class DiscouragedFunctionSniff extends ForbiddenFunctionsSniff
94
81
'^mysql_.*$ ' => null ,
95
82
'^mysql.*$ ' => null ,
96
83
'^odbc_.*$ ' => null ,
97
- '^opendir$ ' => null ,
98
84
'^openlog$ ' => null ,
99
85
'^ora_.*$ ' => null ,
100
86
'^ovrimos_.*$ ' => null ,
101
87
'^parse_ini_file$ ' => null ,
102
88
'^parse_str$ ' => null ,
103
89
'^parse_url$ ' => null ,
104
90
'^parsekit_compile_string$ ' => null ,
105
- // '^pathinfo$' => 'Magento\Framework\Filesystem\Io\File::getPathInfo',
106
91
'^pcntl_.*$ ' => null ,
107
92
'^posix_.*$ ' => null ,
108
93
'^pfpro_.*$ ' => null ,
@@ -112,32 +97,24 @@ class DiscouragedFunctionSniff extends ForbiddenFunctionsSniff
112
97
'^print_r$ ' => null ,
113
98
'^printf$ ' => null ,
114
99
'^putenv$ ' => null ,
115
- // '^readfile$' => 'Magento\Framework\Filesystem\DriverInterface::fileRead',
116
100
'^readgzfile$ ' => null ,
117
- // '^readline$' => 'Magento\Framework\Filesystem\DriverInterface::fileReadLine',
118
101
'^readlink$ ' => null ,
119
102
'^register_shutdown_function$ ' => null ,
120
103
'^register_tick_function$ ' => null ,
121
- // '^rename$' => 'Magento\Framework\Filesystem\DriverInterface::rename',
122
- // '^rmdir$' => 'Magento\Framework\Filesystem\DriverInterface::deleteDirectory',
123
104
'^scandir$ ' => null ,
124
105
'^session_.*$ ' => null ,
125
106
'^set_include_path$ ' => null ,
126
107
'^ini_set$ ' => null ,
127
108
'^ini_alter$ ' => null ,
128
109
'^set_time_limit$ ' => null ,
129
110
'^setcookie$ ' => null ,
130
- // '^setlocale$' => 'Magento\Framework\Translate\AdapterInterface::setLocale',
131
111
'^setrawcookie$ ' => null ,
132
112
'^sleep$ ' => null ,
133
113
'^socket_.*$ ' => null ,
134
114
'^stream_.*$ ' => null ,
135
115
'^sybase_.*$ ' => null ,
136
- // '^symlink$' => 'Magento\Framework\Filesystem\DriverInterface::symlink',
137
116
'^syslog$ ' => null ,
138
- // '^touch$' => 'Magento\Framework\Filesystem\DriverInterface::touch',
139
117
'^trigger_error$ ' => null ,
140
- '^unlink$ ' => null ,
141
118
'^vprintf$ ' => null ,
142
119
'^mysqli.*$ ' => null ,
143
120
'^oci_connect$ ' => null ,
@@ -158,7 +135,6 @@ class DiscouragedFunctionSniff extends ForbiddenFunctionsSniff
158
135
'^fdf_.*$ ' => null ,
159
136
'^fget.*$ ' => null ,
160
137
'^fread$ ' => null ,
161
- // '^fflush$' => 'Magento\Framework\Filesystem\DriverInterface::fileFlush',
162
138
'^get_browser$ ' => null ,
163
139
'^get_headers$ ' => null ,
164
140
'^get_meta_tags$ ' => null ,
@@ -204,40 +180,21 @@ class DiscouragedFunctionSniff extends ForbiddenFunctionsSniff
204
180
'^gettype$ ' => null ,
205
181
'^var_dump$ ' => null ,
206
182
'^tempnam$ ' => null ,
207
- // '^realpath$' => 'Magento\Framework\Filesystem\DriverInterface::getRealPath',
208
183
'^linkinfo$ ' => null ,
209
- // '^lstat$' => 'Magento\Framework\Filesystem\DriverInterface::stat',
210
184
'^stat$ ' => null ,
211
185
'^lchgrp$ ' => null ,
212
186
'^lchown$ ' => null ,
213
- // '^is_dir$' => 'Magento\Framework\Filesystem\DriverInterface::isDirectory',
214
187
'^is_executable$ ' => null ,
215
- // '^is_file$' => 'Magento\Framework\Filesystem\DriverInterface::isFile',
216
188
'^is_link$ ' => null ,
217
- // '^is_readable$' => 'Magento\Framework\Filesystem\DriverInterface::isReadable',
218
- // '^is_writable$' => 'Magento\Framework\Filesystem\DriverInterface::isWritable',
219
- // '^is_writeable$' => 'Magento\Framework\Filesystem\DriverInterface::isWritable',
220
189
'^is_uploaded_file$ ' => null ,
221
- // '^glob$' => 'Magento\Framework\Filesystem\Glob::glob',
222
190
'^ssh2_.*$ ' => null ,
223
- // '^delete$' => 'Magento\Framework\Filesystem\DriverInterface::deleteFile',
224
191
'^file.*$ ' => null ,
225
192
'^chop$ ' => 'rtrim() ' ,
226
193
'^sizeof$ ' => 'count() ' ,
227
194
'^is_null$ ' => 'strict comparison "=== null" ' ,
228
195
'^intval$ ' => '(int) construction ' ,
229
196
'^strval$ ' => '(string) construction ' ,
230
- // '^htmlspecialchars$' => '\Magento\Framework\Escaper->escapeHtml',
231
197
'^getimagesize$ ' => 'getimagesizefromstring ' ,
232
- // '^file_exists$' => 'Magento\Framework\Filesystem\DriverInterface::isExists',
233
- // '^file_get_contents$' => 'Magento\Framework\Filesystem\DriverInterface::fileGetContents',
234
- // '^file_put_contents$' => 'Magento\Framework\Filesystem\DriverInterface::filePutContents',
235
- // '^fgetcsv$' => 'Magento\Framework\Filesystem\DriverInterface::fileGetCsv',
236
- // '^fputcsv$' => 'Magento\Framework\Filesystem\DriverInterface::filePutCsv',
237
- // '^ftell$' => 'Magento\Framework\Filesystem\DriverInterface::fileTell',
238
- // '^fseek$' => 'Magento\Framework\Filesystem\DriverInterface::fileSeek',
239
- // '^feof$' => 'Magento\Framework\Filesystem\DriverInterface::endOfFile',
240
- // '^flock$' => 'Magento\Framework\Filesystem\DriverInterface::fileLock',
241
198
'^date_sunrise$ ' => 'date_sun_info ' ,
242
199
'^date_sunset$ ' => 'date_sun_info ' ,
243
200
'^strptime$ ' => 'date_parse_from_format ' ,
0 commit comments