mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-12 18:36:53 +00:00
fixed some CS issues
This commit is contained in:
@@ -705,7 +705,7 @@ class Twig_Environment
|
||||
|
||||
foreach ($this->getExtensions() as $extension) {
|
||||
$parsers = $extension->getTokenParsers();
|
||||
foreach($parsers as $parser) {
|
||||
foreach ($parsers as $parser) {
|
||||
if ($parser instanceof Twig_TokenParserInterface) {
|
||||
$this->parsers->addTokenParser($parser);
|
||||
} elseif ($parser instanceof Twig_TokenParserBrokerInterface) {
|
||||
|
||||
@@ -8,7 +8,7 @@ class Twig_NodeVisitor_SafeAnalysis implements Twig_NodeVisitorInterface
|
||||
{
|
||||
$hash = spl_object_hash($node);
|
||||
if (isset($this->data[$hash])) {
|
||||
foreach($this->data[$hash] as $bucket) {
|
||||
foreach ($this->data[$hash] as $bucket) {
|
||||
if ($bucket['key'] === $node) {
|
||||
return $bucket['value'];
|
||||
}
|
||||
@@ -22,7 +22,7 @@ class Twig_NodeVisitor_SafeAnalysis implements Twig_NodeVisitorInterface
|
||||
{
|
||||
$hash = spl_object_hash($node);
|
||||
if (isset($this->data[$hash])) {
|
||||
foreach($this->data[$hash] as &$bucket) {
|
||||
foreach ($this->data[$hash] as &$bucket) {
|
||||
if ($bucket['key'] === $node) {
|
||||
$bucket['value'] = $safe;
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ class Twig_TokenParser_From extends Twig_TokenParser
|
||||
|
||||
$node = new Twig_Node_Import($macro, new Twig_Node_Expression_AssignName($this->parser->getVarName(), $token->getLine()), $token->getLine(), $this->getTag());
|
||||
|
||||
foreach($targets as $name => $alias) {
|
||||
foreach ($targets as $name => $alias) {
|
||||
$this->parser->addImportedFunction($alias, 'get'.$name, $node->getNode('var'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user