From: Fabien Potencier Date: Tue, 29 May 2012 18:38:42 +0000 (+0200) Subject: fixed some CS issues X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=b5b7224d5d62f4ace97f839bddfc7039491ac274;p=web%2Fkonrad%2Ftwig.git fixed some CS issues --- 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')); }