Loading composer/Plugin/Scaffold/Plugin.php +1 −1 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ class Plugin implements PluginInterface, EventSubscriberInterface, Capable { /** * Record whether the 'require' command was called. * * @param bool * @var bool */ protected $requireWasCalled; Loading core/includes/bootstrap.inc +2 −5 Original line number Diff line number Diff line Loading @@ -441,7 +441,7 @@ function drupal_static_reset($name = NULL) { * * @param callable $callback * The shutdown function to register. * @param ... * @param ...$args * Additional arguments to pass to the shutdown function. * * @return array Loading @@ -450,7 +450,7 @@ function drupal_static_reset($name = NULL) { * @see register_shutdown_function() * @ingroup php_wrappers */ function &drupal_register_shutdown_function($callback = NULL) { function &drupal_register_shutdown_function($callback = NULL, ...$args) { // We cannot use drupal_static() here because the static cache is reset during // batch processing, which breaks batch handling. static $callbacks = []; Loading @@ -460,9 +460,6 @@ function &drupal_register_shutdown_function($callback = NULL) { if (empty($callbacks)) { register_shutdown_function('_drupal_shutdown_function'); } $args = func_get_args(); // Remove $callback from the arguments. unset($args[0]); // Save callback and arguments $callbacks[] = ['callback' => $callback, 'arguments' => $args]; } Loading core/lib/Drupal/Component/Assertion/Inspector.php +2 −2 Original line number Diff line number Diff line Loading @@ -184,7 +184,7 @@ public static function assertAllStrictArrays($traversable) { * * @param mixed $traversable * Variable to be examined. * @param string ... * @param ...$keys * Keys to be searched for. * * @return bool Loading Loading @@ -370,7 +370,7 @@ public static function assertAllRegularExpressionMatch($pattern, $traversable) { * * @param mixed $traversable * Variable to be examined. * @param string ... * @param ...$classes * Classes and interfaces to test objects against. * * @return bool Loading core/lib/Drupal/Component/Utility/NestedArray.php +3 −3 Original line number Diff line number Diff line Loading @@ -286,7 +286,7 @@ public static function keyExists(array $array, array $parents) { * $correct = NestedArray::mergeDeep($link_options_1, $link_options_2); * @endcode * * @param array ... * @param array ...$arrays * Arrays to merge. * * @return array Loading @@ -294,8 +294,8 @@ public static function keyExists(array $array, array $parents) { * * @see NestedArray::mergeDeepArray() */ public static function mergeDeep() { return self::mergeDeepArray(func_get_args()); public static function mergeDeep(...$arrays) { return self::mergeDeepArray($arrays); } /** Loading core/lib/Drupal/Core/Cache/Cache.php +3 −3 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ class Cache { /** * Merges lists of cache contexts and removes duplicates. * * @param list<string> ... * @param list<string> ...$cache_contexts * Cache contexts to merge. * * @return list<string> Loading @@ -42,7 +42,7 @@ public static function mergeContexts(array ...$cache_contexts) { * allows items to be invalidated based on all tags attached to the content * they're constituted from. * * @param list<string> ... * @param list<string> ...$cache_tags * Cache tags to merge. * * @return list<string> Loading @@ -59,7 +59,7 @@ public static function mergeTags(array ...$cache_tags) { * * Ensures infinite max-age (Cache::PERMANENT) is taken into account. * * @param int ... * @param int ...$max_ages * Max age values to merge. * * @return int Loading Loading
composer/Plugin/Scaffold/Plugin.php +1 −1 Original line number Diff line number Diff line Loading @@ -47,7 +47,7 @@ class Plugin implements PluginInterface, EventSubscriberInterface, Capable { /** * Record whether the 'require' command was called. * * @param bool * @var bool */ protected $requireWasCalled; Loading
core/includes/bootstrap.inc +2 −5 Original line number Diff line number Diff line Loading @@ -441,7 +441,7 @@ function drupal_static_reset($name = NULL) { * * @param callable $callback * The shutdown function to register. * @param ... * @param ...$args * Additional arguments to pass to the shutdown function. * * @return array Loading @@ -450,7 +450,7 @@ function drupal_static_reset($name = NULL) { * @see register_shutdown_function() * @ingroup php_wrappers */ function &drupal_register_shutdown_function($callback = NULL) { function &drupal_register_shutdown_function($callback = NULL, ...$args) { // We cannot use drupal_static() here because the static cache is reset during // batch processing, which breaks batch handling. static $callbacks = []; Loading @@ -460,9 +460,6 @@ function &drupal_register_shutdown_function($callback = NULL) { if (empty($callbacks)) { register_shutdown_function('_drupal_shutdown_function'); } $args = func_get_args(); // Remove $callback from the arguments. unset($args[0]); // Save callback and arguments $callbacks[] = ['callback' => $callback, 'arguments' => $args]; } Loading
core/lib/Drupal/Component/Assertion/Inspector.php +2 −2 Original line number Diff line number Diff line Loading @@ -184,7 +184,7 @@ public static function assertAllStrictArrays($traversable) { * * @param mixed $traversable * Variable to be examined. * @param string ... * @param ...$keys * Keys to be searched for. * * @return bool Loading Loading @@ -370,7 +370,7 @@ public static function assertAllRegularExpressionMatch($pattern, $traversable) { * * @param mixed $traversable * Variable to be examined. * @param string ... * @param ...$classes * Classes and interfaces to test objects against. * * @return bool Loading
core/lib/Drupal/Component/Utility/NestedArray.php +3 −3 Original line number Diff line number Diff line Loading @@ -286,7 +286,7 @@ public static function keyExists(array $array, array $parents) { * $correct = NestedArray::mergeDeep($link_options_1, $link_options_2); * @endcode * * @param array ... * @param array ...$arrays * Arrays to merge. * * @return array Loading @@ -294,8 +294,8 @@ public static function keyExists(array $array, array $parents) { * * @see NestedArray::mergeDeepArray() */ public static function mergeDeep() { return self::mergeDeepArray(func_get_args()); public static function mergeDeep(...$arrays) { return self::mergeDeepArray($arrays); } /** Loading
core/lib/Drupal/Core/Cache/Cache.php +3 −3 Original line number Diff line number Diff line Loading @@ -19,7 +19,7 @@ class Cache { /** * Merges lists of cache contexts and removes duplicates. * * @param list<string> ... * @param list<string> ...$cache_contexts * Cache contexts to merge. * * @return list<string> Loading @@ -42,7 +42,7 @@ public static function mergeContexts(array ...$cache_contexts) { * allows items to be invalidated based on all tags attached to the content * they're constituted from. * * @param list<string> ... * @param list<string> ...$cache_tags * Cache tags to merge. * * @return list<string> Loading @@ -59,7 +59,7 @@ public static function mergeTags(array ...$cache_tags) { * * Ensures infinite max-age (Cache::PERMANENT) is taken into account. * * @param int ... * @param int ...$max_ages * Max age values to merge. * * @return int Loading