From 715e7a531bdae109a828f9e91629e5b3b2926beb Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Thu, 11 Feb 2021 20:34:41 +0100 Subject: [PATCH] Modernize func_get_args() calls to variadic parameters --- Filesystem.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Filesystem.php b/Filesystem.php index 4053d9e6a..b5eb6b5c3 100644 --- a/Filesystem.php +++ b/Filesystem.php @@ -746,14 +746,16 @@ private function getSchemeAndHierarchy(string $filename): array } /** + * @param mixed ...$args + * * @return mixed */ - private static function box(callable $func) + private static function box(callable $func, ...$args) { self::$lastError = null; set_error_handler(__CLASS__.'::handleError'); try { - $result = $func(...\array_slice(\func_get_args(), 1)); + $result = $func(...$args); restore_error_handler(); return $result;