fixed CS
authorFabien Potencier <fabien.potencier@gmail.com>
Sun, 4 Aug 2013 13:08:44 +0000 (15:08 +0200)
committerFabien Potencier <fabien.potencier@gmail.com>
Sun, 4 Aug 2013 13:08:44 +0000 (15:08 +0200)
lib/Twig/Environment.php

index 3967d78..d11df2e 100644 (file)
@@ -266,10 +266,11 @@ class Twig_Environment
     {
         $suffix = null === $index ? '' : '_'.$index;
         $cls = $name.$suffix;
-        if (!isset($this->templateClasses[$cls])) {
-            $this->templateClasses[$cls] = $this->templateClassPrefix.md5($this->getLoader()->getCacheKey($name)).$suffix;
+        if (isset($this->templateClasses[$cls])) {
+            return $this->templateClasses[$cls];
         }
-        return $this->templateClasses[$cls];
+
+        return $this->templateClasses[$cls] = $this->templateClassPrefix.md5($this->getLoader()->getCacheKey($name)).$suffix;
     }
 
     /**