diff --git a/core/lib/Drupal/Core/Asset/AssetResolver.php b/core/lib/Drupal/Core/Asset/AssetResolver.php index 42b51c39d8..7a1d2ccd7d 100644 --- a/core/lib/Drupal/Core/Asset/AssetResolver.php +++ b/core/lib/Drupal/Core/Asset/AssetResolver.php @@ -161,7 +161,7 @@ public function getCssAssets(AttachedAssetsInterface $assets, $optimize, Languag $this->themeManager->alter('css', $css, $assets, $language); // Sort CSS items, so that they appear in the correct order. - uasort($css, [static::class, 'sort']); + uasort($css, static::sort(...)); if ($optimize) { $css = \Drupal::service('asset.css.collection_optimizer')->optimize($css, $libraries_to_load, $language); @@ -273,7 +273,7 @@ public function getJsAssets(AttachedAssetsInterface $assets, $optimize, Language $this->themeManager->alter('js', $javascript, $assets, $language); // Sort JavaScript assets, so that they appear in the correct order. - uasort($javascript, [static::class, 'sort']); + uasort($javascript, static::sort(...)); // Prepare the return value: filter JavaScript assets per scope. $js_assets_header = []; diff --git a/core/lib/Drupal/Core/Render/Element.php b/core/lib/Drupal/Core/Render/Element.php index 88793bc217..f9ee6c3e6a 100644 --- a/core/lib/Drupal/Core/Render/Element.php +++ b/core/lib/Drupal/Core/Render/Element.php @@ -37,7 +37,7 @@ public static function property($key) { * An array of property keys for the element. */ public static function properties(array $element) { - return array_filter(array_keys($element), [static::class, 'property']); + return array_filter(array_keys($element), static::property(...)); } /** diff --git a/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php b/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php index d489c561d5..18b9333776 100644 --- a/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php +++ b/core/modules/views/src/Plugin/views/filter/FilterPluginBase.php @@ -713,7 +713,7 @@ protected function hasValidGroupedValue(array $group) { // types). Ensure at least the minimum number of values is present for // this entry to be considered valid. $min_values = $operators[$group['operator']]['values']; - $actual_values = count(array_filter($group['value'], [static::class, 'arrayFilterZero'])); + $actual_values = count(array_filter($group['value'], static::arrayFilterZero(...))); return $actual_values >= $min_values; } } diff --git a/core/modules/views/src/Plugin/views/filter/ManyToOne.php b/core/modules/views/src/Plugin/views/filter/ManyToOne.php index 846f37b42f..ce19f4fe9e 100644 --- a/core/modules/views/src/Plugin/views/filter/ManyToOne.php +++ b/core/modules/views/src/Plugin/views/filter/ManyToOne.php @@ -133,7 +133,7 @@ protected function opHelper() { } // Form API returns unchecked options in the form of option_id => 0. This // breaks the generated query for "is all of" filters so we remove them. - $this->value = array_filter($this->value, [static::class, 'arrayFilterZero']); + $this->value = array_filter($this->value, static::arrayFilterZero(...)); $this->helper->addFilter(); }