Loading core/lib/Drupal/Core/Asset/AssetResolver.php +2 −2 Original line number Diff line number Diff line Loading @@ -155,7 +155,7 @@ public function getCssAssets(AttachedAssetsInterface $assets, $optimize) { $this->themeManager->alter('css', $css, $assets); // Sort CSS items, so that they appear in the correct order. uasort($css, 'static::sort'); uasort($css, [static::class, 'sort']); if ($optimize) { $css = \Drupal::service('asset.css.collection_optimizer')->optimize($css); Loading Loading @@ -262,7 +262,7 @@ public function getJsAssets(AttachedAssetsInterface $assets, $optimize) { $this->themeManager->alter('js', $javascript, $assets); // Sort JavaScript assets, so that they appear in the correct order. uasort($javascript, 'static::sort'); uasort($javascript, [static::class, 'sort']); // Prepare the return value: filter JavaScript assets per scope. $js_assets_header = []; Loading core/lib/Drupal/Core/Mail/MailFormatHelper.php +1 −1 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ public static function htmlToText($string, $allowed_tags = NULL) { // 'See the Drupal site [1]' with the URL included as a footnote. static::htmlToMailUrls(NULL, TRUE); $pattern = '@(<a[^>]+?href="([^"]*)"[^>]*?>(.+?)</a>)@i'; $string = preg_replace_callback($pattern, 'static::htmlToMailUrls', $string); $string = preg_replace_callback($pattern, [static::class, 'htmlToMailUrls'], $string); $urls = static::htmlToMailUrls(); $footnotes = ''; if (count($urls)) { Loading core/lib/Drupal/Core/Render/Element.php +1 −1 Original line number Diff line number Diff line Loading @@ -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::property'); return array_filter(array_keys($element), [static::class, 'property']); } /** Loading core/modules/user/src/Entity/Role.php +1 −1 Original line number Diff line number Diff line Loading @@ -169,7 +169,7 @@ public static function postLoad(EntityStorageInterface $storage, array &$entitie parent::postLoad($storage, $entities); // Sort the queried roles by their weight. // See \Drupal\Core\Config\Entity\ConfigEntityBase::sort(). uasort($entities, 'static::sort'); uasort($entities, [static::class, 'sort']); } /** Loading core/modules/views/src/Plugin/views/filter/Date.php +1 −1 Original line number Diff line number Diff line Loading @@ -111,7 +111,7 @@ protected function hasValidGroupedValue(array $group) { // one greater. $operators = $this->operators(); $expected = $operators[$group['operator']]['values'] + 1; $actual = count(array_filter($group['value'], 'static::arrayFilterZero')); $actual = count(array_filter($group['value'], [static::class, 'arrayFilterZero'])); return $actual == $expected; } Loading Loading
core/lib/Drupal/Core/Asset/AssetResolver.php +2 −2 Original line number Diff line number Diff line Loading @@ -155,7 +155,7 @@ public function getCssAssets(AttachedAssetsInterface $assets, $optimize) { $this->themeManager->alter('css', $css, $assets); // Sort CSS items, so that they appear in the correct order. uasort($css, 'static::sort'); uasort($css, [static::class, 'sort']); if ($optimize) { $css = \Drupal::service('asset.css.collection_optimizer')->optimize($css); Loading Loading @@ -262,7 +262,7 @@ public function getJsAssets(AttachedAssetsInterface $assets, $optimize) { $this->themeManager->alter('js', $javascript, $assets); // Sort JavaScript assets, so that they appear in the correct order. uasort($javascript, 'static::sort'); uasort($javascript, [static::class, 'sort']); // Prepare the return value: filter JavaScript assets per scope. $js_assets_header = []; Loading
core/lib/Drupal/Core/Mail/MailFormatHelper.php +1 −1 Original line number Diff line number Diff line Loading @@ -125,7 +125,7 @@ public static function htmlToText($string, $allowed_tags = NULL) { // 'See the Drupal site [1]' with the URL included as a footnote. static::htmlToMailUrls(NULL, TRUE); $pattern = '@(<a[^>]+?href="([^"]*)"[^>]*?>(.+?)</a>)@i'; $string = preg_replace_callback($pattern, 'static::htmlToMailUrls', $string); $string = preg_replace_callback($pattern, [static::class, 'htmlToMailUrls'], $string); $urls = static::htmlToMailUrls(); $footnotes = ''; if (count($urls)) { Loading
core/lib/Drupal/Core/Render/Element.php +1 −1 Original line number Diff line number Diff line Loading @@ -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::property'); return array_filter(array_keys($element), [static::class, 'property']); } /** Loading
core/modules/user/src/Entity/Role.php +1 −1 Original line number Diff line number Diff line Loading @@ -169,7 +169,7 @@ public static function postLoad(EntityStorageInterface $storage, array &$entitie parent::postLoad($storage, $entities); // Sort the queried roles by their weight. // See \Drupal\Core\Config\Entity\ConfigEntityBase::sort(). uasort($entities, 'static::sort'); uasort($entities, [static::class, 'sort']); } /** Loading
core/modules/views/src/Plugin/views/filter/Date.php +1 −1 Original line number Diff line number Diff line Loading @@ -111,7 +111,7 @@ protected function hasValidGroupedValue(array $group) { // one greater. $operators = $this->operators(); $expected = $operators[$group['operator']]['values'] + 1; $actual = count(array_filter($group['value'], 'static::arrayFilterZero')); $actual = count(array_filter($group['value'], [static::class, 'arrayFilterZero'])); return $actual == $expected; } Loading