From 9859a7e1755ff4a9d60d6e6f26231cc6ae5ed8ed Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 4 Aug 2013 15:08:44 +0200 Subject: [PATCH] fixed CS --- lib/Twig/Environment.php | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Twig/Environment.php b/lib/Twig/Environment.php index 3967d78..d11df2e 100644 --- a/lib/Twig/Environment.php +++ b/lib/Twig/Environment.php @@ -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; } /** -- 1.7.2.5