Loading core/.phpstan-baseline.php +0 −6 Original line number Diff line number Diff line Loading @@ -629,12 +629,6 @@ 'count' => 1, 'path' => __DIR__ . '/lib/Drupal/Core/Test/TestRunnerKernel.php', ]; $ignoreErrors[] = [ // identifier: return.missing 'message' => '#^Method Drupal\\\\Core\\\\Theme\\\\ThemeInitialization\\:\\:resolveStyleSheetPlaceholders\\(\\) should return string but return statement is missing\\.$#', 'count' => 1, 'path' => __DIR__ . '/lib/Drupal/Core/Theme/ThemeInitialization.php', ]; $ignoreErrors[] = [ // identifier: variable.undefined 'message' => '#^Variable \\$candidate might not be defined\\.$#', Loading core/lib/Drupal/Core/Theme/ThemeInitialization.php +0 −26 Original line number Diff line number Diff line Loading @@ -270,30 +270,4 @@ protected function getExtensions() { return $this->extensions; } /** * Gets CSS file where tokens have been resolved. * * @param string $css_file * CSS file which may contain tokens. * * @return string * CSS file where placeholders are replaced. * * @todo Remove in Drupal 9.0.x. */ protected function resolveStyleSheetPlaceholders($css_file) { $token_candidate = explode('/', $css_file)[0]; if (!preg_match('/@[A-z0-9_-]+/', $token_candidate)) { return $css_file; } $token = substr($token_candidate, 1); // Prime extensions. $extensions = $this->getExtensions(); if (isset($extensions[$token])) { return str_replace($token_candidate, $extensions[$token]->getPath(), $css_file); } } } Loading
core/.phpstan-baseline.php +0 −6 Original line number Diff line number Diff line Loading @@ -629,12 +629,6 @@ 'count' => 1, 'path' => __DIR__ . '/lib/Drupal/Core/Test/TestRunnerKernel.php', ]; $ignoreErrors[] = [ // identifier: return.missing 'message' => '#^Method Drupal\\\\Core\\\\Theme\\\\ThemeInitialization\\:\\:resolveStyleSheetPlaceholders\\(\\) should return string but return statement is missing\\.$#', 'count' => 1, 'path' => __DIR__ . '/lib/Drupal/Core/Theme/ThemeInitialization.php', ]; $ignoreErrors[] = [ // identifier: variable.undefined 'message' => '#^Variable \\$candidate might not be defined\\.$#', Loading
core/lib/Drupal/Core/Theme/ThemeInitialization.php +0 −26 Original line number Diff line number Diff line Loading @@ -270,30 +270,4 @@ protected function getExtensions() { return $this->extensions; } /** * Gets CSS file where tokens have been resolved. * * @param string $css_file * CSS file which may contain tokens. * * @return string * CSS file where placeholders are replaced. * * @todo Remove in Drupal 9.0.x. */ protected function resolveStyleSheetPlaceholders($css_file) { $token_candidate = explode('/', $css_file)[0]; if (!preg_match('/@[A-z0-9_-]+/', $token_candidate)) { return $css_file; } $token = substr($token_candidate, 1); // Prime extensions. $extensions = $this->getExtensions(); if (isset($extensions[$token])) { return str_replace($token_candidate, $extensions[$token]->getPath(), $css_file); } } }