diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-07-27 10:05:23 +0200 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-07-27 10:05:23 +0200 |
| commit | 5bf66662a9bdd62c5bccab15e607cd95cfb8fcab (patch) | |
| tree | 39a1a4629749056191c05dfd899f931701b7acf3 /srcs/phpmyadmin/libraries/classes/Twig/I18n/TokenParserTrans.php | |
| parent | 5afd237bbd22028b85532b8c0b3fcead49a00764 (diff) | |
| download | ft_server-5bf66662a9bdd62c5bccab15e607cd95cfb8fcab.tar.gz ft_server-5bf66662a9bdd62c5bccab15e607cd95cfb8fcab.tar.bz2 ft_server-5bf66662a9bdd62c5bccab15e607cd95cfb8fcab.zip | |
Removed wordpress and phpmyadmin, my server doesn't handle it well and it brings shame on my famillyHEADmaster
Diffstat (limited to 'srcs/phpmyadmin/libraries/classes/Twig/I18n/TokenParserTrans.php')
| -rw-r--r-- | srcs/phpmyadmin/libraries/classes/Twig/I18n/TokenParserTrans.php | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/srcs/phpmyadmin/libraries/classes/Twig/I18n/TokenParserTrans.php b/srcs/phpmyadmin/libraries/classes/Twig/I18n/TokenParserTrans.php deleted file mode 100644 index 25aade0..0000000 --- a/srcs/phpmyadmin/libraries/classes/Twig/I18n/TokenParserTrans.php +++ /dev/null @@ -1,85 +0,0 @@ -<?php -/* vim: set expandtab sw=4 ts=4 sts=4: */ -/** - * hold PhpMyAdmin\Twig\I18n\TokenParserTrans class - * - * @package PhpMyAdmin\Twig\I18n - */ -declare(strict_types=1); - -namespace PhpMyAdmin\Twig\I18n; - -use Twig\Extensions\Node\TransNode; -use Twig\Extensions\TokenParser\TransTokenParser; -use Twig\Token; -use Twig_Error_Syntax; - -/** - * Class TokenParserTrans - * - * @package PhpMyAdmin\Twig\I18n - */ -class TokenParserTrans extends TransTokenParser -{ - /** - * Parses a token and returns a node. - * - * @param Token $token Twig token to parse - * - * @return TransNode - * - * @throws Twig_Error_Syntax - */ - public function parse(Token $token) - { - $lineno = $token->getLine(); - $stream = $this->parser->getStream(); - $count = null; - $plural = null; - $notes = null; - $context = null; - - if (! $stream->test(Token::BLOCK_END_TYPE)) { - $body = $this->parser->getExpressionParser()->parseExpression(); - } else { - $stream->expect(Token::BLOCK_END_TYPE); - $body = $this->parser->subparse([$this, 'decideForFork']); - $next = $stream->next()->getValue(); - - if ('plural' === $next) { - $count = $this->parser->getExpressionParser()->parseExpression(); - $stream->expect(Token::BLOCK_END_TYPE); - $plural = $this->parser->subparse([$this, 'decideForFork']); - - if ('notes' === $stream->next()->getValue()) { - $stream->expect(Token::BLOCK_END_TYPE); - $notes = $this->parser->subparse([$this, 'decideForEnd'], true); - } - } elseif ('context' === $next) { - $stream->expect(Token::BLOCK_END_TYPE); - $context = $this->parser->subparse([$this, 'decideForEnd'], true); - } elseif ('notes' === $next) { - $stream->expect(Token::BLOCK_END_TYPE); - $notes = $this->parser->subparse([$this, 'decideForEnd'], true); - } - } - - $stream->expect(Token::BLOCK_END_TYPE); - - $this->checkTransString($body, $lineno); - - return new NodeTrans($body, $plural, $count, $context, $notes, $lineno, $this->getTag()); - } - - /** - * Tests the current token for a type. - * - * @param Token $token Twig token to test - * - * @return bool - */ - public function decideForFork(Token $token) - { - return $token->test(['plural', 'context', 'notes', 'endtrans']); - } -} |
