Skip to content

Commit 715e7a5

Browse files
committed
Modernize func_get_args() calls to variadic parameters
1 parent 83a6fee commit 715e7a5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Filesystem.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -746,14 +746,16 @@ private function getSchemeAndHierarchy(string $filename): array
746746
}
747747

748748
/**
749+
* @param mixed ...$args
750+
*
749751
* @return mixed
750752
*/
751-
private static function box(callable $func)
753+
private static function box(callable $func, ...$args)
752754
{
753755
self::$lastError = null;
754756
set_error_handler(__CLASS__.'::handleError');
755757
try {
756-
$result = $func(...\array_slice(\func_get_args(), 1));
758+
$result = $func(...$args);
757759
restore_error_handler();
758760

759761
return $result;

0 commit comments

Comments
 (0)