Verified Commit fa1b1ef0 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3455557 by mstrelan: Remove ThemeInitialization::resolveStyleSheetPlaceholders

parent 77b8e596
Loading
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -634,12 +634,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\\.$#',
+0 −26
Original line number Diff line number Diff line
@@ -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);
    }
  }

}