From a791388ce4b7b5c03be109418336d41992d93b88 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Sat, 1 Jan 2022 13:54:36 +0100 Subject: Avoid func_get_args (#4108) Use variadic syntax instead https://php.net/manual/functions.arguments#functions.variable-arg-list And avoid dynamic functions names when possible to more easily identify calls and unused functions. Contributes to https://github.com/FreshRSS/FreshRSS/issues/4103 --- lib/lib_rss.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/lib_rss.php') diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 93463bace..2627773b6 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -18,11 +18,10 @@ if (COPY_SYSLOG_TO_STDERR) { /** * Build a directory path by concatenating a list of directory names. * - * @param $path_parts a list of directory names + * @param array $path_parts a list of directory names * @return string corresponding to the final pathname */ -function join_path() { - $path_parts = func_get_args(); +function join_path(...$path_parts) { return join(DIRECTORY_SEPARATOR, $path_parts); } -- cgit v1.2.3