Open pschaub opened 6 years ago
There are a few functions that are using "func_get_args()". We should not use it. Code lines: https://github.com/Folkloreatelier/laravel-graphql/search?utf8=%E2%9C%93&q=func_get_args&type=
Instead we should use the new "..." (triple dots) language feature which is included since PHP 5.6, see http://php.net/manual/en/functions.arguments.php#functions.variable-arg-list
Reasons:
For example the function rules() has function arguments but the developer does not see that there are function arguments. With the "..." token the developer will see that he can use function arguments there.
Here is an example where developers didn't know that there are function parameters hidden through "func_get_args()": https://github.com/Folkloreatelier/laravel-graphql/issues/47
The code will be cleaner and smaller with "..." tokens instead of "func_get_args()"
Note: This improvement is only possible with PHP 5.6+. The current library supports PHP 5.5.9+.
There are a few functions that are using "func_get_args()". We should not use it. Code lines: https://github.com/Folkloreatelier/laravel-graphql/search?utf8=%E2%9C%93&q=func_get_args&type=
Instead we should use the new "..." (triple dots) language feature which is included since PHP 5.6, see http://php.net/manual/en/functions.arguments.php#functions.variable-arg-list
Reasons:
For example the function rules() has function arguments but the developer does not see that there are function arguments. With the "..." token the developer will see that he can use function arguments there.
Here is an example where developers didn't know that there are function parameters hidden through "func_get_args()": https://github.com/Folkloreatelier/laravel-graphql/issues/47
The code will be cleaner and smaller with "..." tokens instead of "func_get_args()"