From 306f9e0ca204d93499ec9e1b88b10a606824d973 Mon Sep 17 00:00:00 2001 From: Benjamin Eberlei Date: Wed, 4 Apr 2012 23:21:06 +0200 Subject: [PATCH] [DDC-1766] Rename closure --- lib/Doctrine/ORM/AbstractQuery.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/Doctrine/ORM/AbstractQuery.php b/lib/Doctrine/ORM/AbstractQuery.php index be22ad895..956775b1a 100644 --- a/lib/Doctrine/ORM/AbstractQuery.php +++ b/lib/Doctrine/ORM/AbstractQuery.php @@ -670,7 +670,7 @@ abstract class AbstractQuery $this->setParameters($params); } - $saveCache = function() {}; + $setCacheEntry = function() {}; if ($this->_hydrationCacheProfile !== null) { list($cacheKey, $realCacheKey) = $this->getHydrationCacheId(); @@ -685,7 +685,8 @@ abstract class AbstractQuery if ( ! $result) { $result = array(); } - $saveCache = function($data) use ($cache, $result, $cacheKey, $realCacheKey, $qcp) { + + $setCacheEntry = function($data) use ($cache, $result, $cacheKey, $realCacheKey, $qcp) { $result[$realCacheKey] = $data; $cache->save($cacheKey, $result, $qcp->getLifetime()); }; @@ -694,7 +695,7 @@ abstract class AbstractQuery $stmt = $this->_doExecute(); if (is_numeric($stmt)) { - $saveCache($stmt); + $setCacheEntry($stmt); return $stmt; } @@ -702,7 +703,7 @@ abstract class AbstractQuery $stmt, $this->_resultSetMapping, $this->_hints ); - $saveCache($data); + $setCacheEntry($data); return $data; }