Skip to content

Commit dfd316d

Browse files
authored
Merge pull request #129 from moufmouf/reedy-patch-1
Remove forward_static_call and forward_static_call_array from supported functions
2 parents bccaaa1 + 992f946 commit dfd316d

File tree

6 files changed

+4
-67
lines changed

6 files changed

+4
-67
lines changed

generated/fileinfo.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function finfo_close($finfo): void
4343
* @throws FileinfoException
4444
*
4545
*/
46-
function finfo_open(int $options = FILEINFO_NONE, ?string $magic_file = null)
46+
function finfo_open(int $options = FILEINFO_NONE, string $magic_file = "")
4747
{
4848
error_clear_last();
4949
$result = \finfo_open($options, $magic_file);

generated/filesystem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ function fopen(string $filename, string $mode, bool $use_include_path = false, $
800800

801801
/**
802802
* fputcsv formats a line (passed as a
803-
* fields array) as CSV and write it (terminated by a
803+
* fields array) as CSV and writes it (terminated by a
804804
* newline) to the specified file handle.
805805
*
806806
* @param resource $handle The file pointer must be valid, and must point to

generated/funchand.php

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -25,67 +25,6 @@ function create_function(string $args, string $code): string
2525
}
2626

2727

28-
/**
29-
* Calls a user defined function or method given by the function
30-
* parameter. This function must be called within a method context, it can't be
31-
* used outside a class.
32-
* It uses the late static
33-
* binding.
34-
* All arguments of the forwarded method are passed as values,
35-
* and as an array, similarly to call_user_func_array.
36-
*
37-
* @param callable $function The function or method to be called. This parameter may be an array,
38-
* with the name of the class, and the method, or a string, with a function
39-
* name.
40-
* @param array $parameters One parameter, gathering all the method parameter in one array.
41-
*
42-
* Note that the parameters for forward_static_call_array are
43-
* not passed by reference.
44-
* @return mixed Returns the function result.
45-
* @throws FunchandException
46-
*
47-
*/
48-
function forward_static_call_array(callable $function, array $parameters)
49-
{
50-
error_clear_last();
51-
$result = \forward_static_call_array($function, $parameters);
52-
if ($result === false) {
53-
throw FunchandException::createFromPhpError();
54-
}
55-
return $result;
56-
}
57-
58-
59-
/**
60-
* Calls a user defined function or method given by the function
61-
* parameter, with the following arguments. This function must be called within a method
62-
* context, it can't be used outside a class.
63-
* It uses the late static
64-
* binding.
65-
*
66-
* @param callable $function The function or method to be called. This parameter may be an array,
67-
* with the name of the class, and the method, or a string, with a function
68-
* name.
69-
* @param mixed $params Zero or more parameters to be passed to the function.
70-
* @return mixed Returns the function result.
71-
* @throws FunchandException
72-
*
73-
*/
74-
function forward_static_call(callable $function, ...$params)
75-
{
76-
error_clear_last();
77-
if ($params !== []) {
78-
$result = \forward_static_call($function, ...$params);
79-
} else {
80-
$result = \forward_static_call($function);
81-
}
82-
if ($result === false) {
83-
throw FunchandException::createFromPhpError();
84-
}
85-
return $result;
86-
}
87-
88-
8928
/**
9029
*
9130
*

generated/functionsList.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,6 @@
201201
'ftp_ssl_connect',
202202
'ftp_systype',
203203
'create_function',
204-
'forward_static_call_array',
205-
'forward_static_call',
206204
'register_tick_function',
207205
'gmp_binomial',
208206
'gmp_export',

generator/config/ignoredFunctions.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,6 @@
1212
'call_user_func_array',
1313
'mb_check_encoding',
1414
'array_search',
15+
'forward_static_call',
16+
'forward_static_call_array',
1517
];

rector-migrate.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,6 @@ services:
204204
ftp_ssl_connect: 'Safe\ftp_ssl_connect'
205205
ftp_systype: 'Safe\ftp_systype'
206206
create_function: 'Safe\create_function'
207-
forward_static_call_array: 'Safe\forward_static_call_array'
208-
forward_static_call: 'Safe\forward_static_call'
209207
register_tick_function: 'Safe\register_tick_function'
210208
gmp_binomial: 'Safe\gmp_binomial'
211209
gmp_export: 'Safe\gmp_export'

0 commit comments

Comments
 (0)