From b5b7224d5d62f4ace97f839bddfc7039491ac274 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 29 May 2012 20:38:42 +0200 Subject: [PATCH] fixed some CS issues --- lib/Twig/Environment.php | 2 +- lib/Twig/NodeVisitor/SafeAnalysis.php | 4 ++-- lib/Twig/TokenParser/From.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Twig/Environment.php b/lib/Twig/Environment.php index 5d391ed..d328238 100644 --- a/lib/Twig/Environment.php +++ b/lib/Twig/Environment.php @@ -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) { diff --git a/lib/Twig/NodeVisitor/SafeAnalysis.php b/lib/Twig/NodeVisitor/SafeAnalysis.php index 9f511b5..7cc2e22 100644 --- a/lib/Twig/NodeVisitor/SafeAnalysis.php +++ b/lib/Twig/NodeVisitor/SafeAnalysis.php @@ -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; diff --git a/lib/Twig/TokenParser/From.php b/lib/Twig/TokenParser/From.php index 4e20f5c..16999bc 100644 --- a/lib/Twig/TokenParser/From.php +++ b/lib/Twig/TokenParser/From.php @@ -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')); } -- 1.7.2.5