diff --git a/core/lib/Drupal/Core/Template/TwigEnvironment.php b/core/lib/Drupal/Core/Template/TwigEnvironment.php index a126b398a9..05a66dd581 100644 --- a/core/lib/Drupal/Core/Template/TwigEnvironment.php +++ b/core/lib/Drupal/Core/Template/TwigEnvironment.php @@ -36,10 +36,13 @@ class TwigEnvironment extends \Twig_Environment { */ protected $templateClasses; + /** + * The template cache filename prefix. + * + * @var string + */ protected $twigCachePrefix = ''; - protected $templateClassPrefix = '__TwigTemplate_'; - /** * Constructs a TwigEnvironment object and stores cache and storage * internally. diff --git a/core/lib/Drupal/Core/Template/TwigTransTokenParser.php b/core/lib/Drupal/Core/Template/TwigTransTokenParser.php index 4c1741ba5e..a7c0c785d2 100644 --- a/core/lib/Drupal/Core/Template/TwigTransTokenParser.php +++ b/core/lib/Drupal/Core/Template/TwigTransTokenParser.php @@ -54,6 +54,9 @@ public function parse(\Twig_Token $token) { /** * Detect a 'plural' switch or the end of a 'trans' tag. + * + * @param \Twig_Token $token + * The token to check to detect the start of subparsing. */ public function decideForFork(\Twig_Token $token) { return $token->test(['plural', 'endtrans']); @@ -61,6 +64,9 @@ public function decideForFork(\Twig_Token $token) { /** * Detect the end of a 'trans' tag. + * + * @param \Twig_Token $token + * The token to check to detect the end of a 'trans' tag. */ public function decideForEnd(\Twig_Token $token) { return $token->test('endtrans'); diff --git a/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php b/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php index ddd38b8fc2..f255e4c907 100644 --- a/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php +++ b/core/tests/Drupal/Tests/Core/Template/TwigExtensionTest.php @@ -10,20 +10,6 @@ use Drupal\Core\Template\TwigExtension; use Drupal\Core\Url; use Drupal\Tests\UnitTestCase; -/* -if (!function_exists(__NAMESPACE__ . 't')) { - - function t($string, array $args = []) { - return strtr($string, $args); - } - -} -if (!function_exists(__NAMESPACE__ . 'file_create_url')) { - - function file_create_url() { - } - -}*/ /** * Tests the twig extension.