diff --git a/core/lib/Drupal/Core/Template/TwigExtension.php b/core/lib/Drupal/Core/Template/TwigExtension.php index 29d34f3..9d3ecd3 100644 --- a/core/lib/Drupal/Core/Template/TwigExtension.php +++ b/core/lib/Drupal/Core/Template/TwigExtension.php @@ -232,7 +232,7 @@ public function getName() { * @see \Drupal\Core\Routing\UrlGeneratorInterface::generateFromRoute() */ public function getPath($name, $parameters = [], $options = []) { - assert('$this->urlGenerator instanceof \Drupal\Core\Routing\UrlGeneratorInterface', 'The URL Generator hasn\'t been set up. Any configuration YAML file with a service directive dealing with the twig configuration can cause this, most likely found in a recently installed or changed module.'); + assert('$this->urlGenerator instanceof \Drupal\Core\Routing\UrlGeneratorInterface', 'The URL generator hasn\'t been set up. Any configuration YAML file with a service directive dealing with the Twig configuration can cause this, most likely found in a recently installed or changed module.'); $options['absolute'] = FALSE; return $this->urlGenerator->generateFromRoute($name, $parameters, $options); } @@ -254,7 +254,7 @@ public function getPath($name, $parameters = [], $options = []) { * @todo Add an option for scheme-relative URLs. */ public function getUrl($name, $parameters = [], $options = []) { - assert('$this->urlGenerator instanceof \Drupal\Core\Routing\UrlGeneratorInterface', 'The URL Generator hasn\'t been set up. Any configuration YAML file with a service directive dealing with the twig configuration can cause this, most likely found in a recently installed or changed module.'); + assert('$this->urlGenerator instanceof \Drupal\Core\Routing\UrlGeneratorInterface', 'The URL generator hasn\'t been set up. Any configuration YAML file with a service directive dealing with the Twig configuration can cause this, most likely found in a recently installed or changed module.'); // Generate URL. $options['absolute'] = TRUE; @@ -280,8 +280,8 @@ public function getUrl($name, $parameters = [], $options = []) { * A render array representing a link to the given URL. */ public function getLink($text, $url, $attributes = []) { - assert('is_string($url) || $url instanceof \Drupal\Core\Url', 'Argument #2 must be a string or object of type \Drupal\Core\Url'); - assert('is_array($attributes) || $attributes instanceof \Drupal\Core\Template\Attribute', 'Argument #3, if set, must be an array or object of type \Drupal\Core\Template\Attribute'); + assert('is_string($url) || $url instanceof \Drupal\Core\Url', '$url must be a string or object of type \Drupal\Core\Url'); + assert('is_array($attributes) || $attributes instanceof \Drupal\Core\Template\Attribute', '$attributes, if set, must be an array or object of type \Drupal\Core\Template\Attribute'); if (!$url instanceof Url) { $url = Url::fromUri($url);