mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-05 06:56:51 +00:00
Fix CS
This commit is contained in:
@@ -15,7 +15,6 @@ use Twig\ExpressionParser\AbstractExpressionParser;
|
||||
use Twig\ExpressionParser\ExpressionParserDescriptionInterface;
|
||||
use Twig\ExpressionParser\InfixAssociativity;
|
||||
use Twig\ExpressionParser\InfixExpressionParserInterface;
|
||||
use Twig\ExpressionParser\PrecedenceChange;
|
||||
use Twig\Node\EmptyNode;
|
||||
use Twig\Node\Expression\AbstractExpression;
|
||||
use Twig\Parser;
|
||||
|
||||
@@ -83,7 +83,6 @@ final class LiteralExpressionParser extends AbstractExpressionParser implements
|
||||
default => throw new SyntaxError(\sprintf('Unexpected token "%s" of value "%s".', $token->toEnglish(), $token->getValue()), $token->getLine(), $stream->getSourceContext()),
|
||||
};
|
||||
|
||||
// no break
|
||||
case $token->test(Token::OPERATOR_TYPE):
|
||||
if ('[' === $token->getValue()) {
|
||||
return $this->parseSequenceExpression($parser);
|
||||
|
||||
@@ -80,8 +80,8 @@ use Twig\Node\Expression\Test\SameasTest;
|
||||
use Twig\Node\Expression\Unary\NegUnary;
|
||||
use Twig\Node\Expression\Unary\NotUnary;
|
||||
use Twig\Node\Expression\Unary\PosUnary;
|
||||
use Twig\Node\Expression\Variable\ContextVariable;
|
||||
use Twig\Node\Expression\Unary\SpreadUnary;
|
||||
use Twig\Node\Expression\Variable\ContextVariable;
|
||||
use Twig\Node\Node;
|
||||
use Twig\Parser;
|
||||
use Twig\Sandbox\SecurityNotAllowedMethodError;
|
||||
|
||||
@@ -28,7 +28,7 @@ final class EscaperExtension extends AbstractExtension
|
||||
* @see setDefaultStrategy()
|
||||
*/
|
||||
public function __construct(
|
||||
private $defaultStrategy = 'html'
|
||||
private $defaultStrategy = 'html',
|
||||
) {
|
||||
$this->setDefaultStrategy($defaultStrategy);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
namespace Twig\Extension;
|
||||
|
||||
use Twig\ExpressionParser\ExpressionParserInterface;
|
||||
use Twig\ExpressionParser\PrecedenceChange;
|
||||
use Twig\NodeVisitor\NodeVisitorInterface;
|
||||
use Twig\TokenParser\TokenParserInterface;
|
||||
use Twig\TwigFilter;
|
||||
|
||||
@@ -13,16 +13,10 @@ namespace Twig;
|
||||
|
||||
use Twig\Error\RuntimeError;
|
||||
use Twig\ExpressionParser\ExpressionParsers;
|
||||
use Twig\ExpressionParser\Infix\BinaryOperatorExpressionParser;
|
||||
use Twig\ExpressionParser\InfixAssociativity;
|
||||
use Twig\ExpressionParser\InfixExpressionParserInterface;
|
||||
use Twig\ExpressionParser\PrecedenceChange;
|
||||
use Twig\ExpressionParser\Prefix\UnaryOperatorExpressionParser;
|
||||
use Twig\Extension\ExtensionInterface;
|
||||
use Twig\Extension\GlobalsInterface;
|
||||
use Twig\Extension\LastModifiedExtensionInterface;
|
||||
use Twig\Extension\StagingExtension;
|
||||
use Twig\Node\Expression\AbstractExpression;
|
||||
use Twig\NodeVisitor\NodeVisitorInterface;
|
||||
use Twig\TokenParser\TokenParserInterface;
|
||||
|
||||
|
||||
@@ -36,6 +36,6 @@ class ForElseNode extends Node
|
||||
->subcompile($this->getNode('body'))
|
||||
->outdent()
|
||||
->write("}\n")
|
||||
;
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,9 +73,6 @@ final class Token
|
||||
return $this->lineno;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getValue()
|
||||
{
|
||||
return $this->value;
|
||||
|
||||
Reference in New Issue
Block a user