From 5ac20ed80b53ecdc0cd79a88a699a510bda99a95 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Tue, 22 May 2012 12:04:55 +0200 Subject: [PATCH] [HttpKernel] renamed a method --- .../HttpKernel/Profiler/PdoProfilerStorage.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php b/src/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php index 5196e4a077..4091232f13 100644 --- a/src/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php +++ b/src/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php @@ -11,7 +11,6 @@ namespace Symfony\Component\HttpKernel\Profiler; - /** * Base PDO storage for profiling information in a PDO database. * @@ -92,7 +91,7 @@ abstract class PdoProfilerStorage implements ProfilerStorageInterface ); try { - if ($this->tokenDataExists($profile->getToken())) { + if ($this->has($profile->getToken())) { $this->exec($db, 'UPDATE sf_profiler_data SET parent = :parent, data = :data, ip = :ip, method = :method, url = :url, time = :time, created_at = :created_at WHERE token = :token', $args); } else { $this->exec($db, 'INSERT INTO sf_profiler_data (token, parent, data, ip, method, url, time, created_at) VALUES (:token, :parent, :data, :ip, :method, :url, :time, :created_at)', $args); @@ -240,10 +239,11 @@ abstract class PdoProfilerStorage implements ProfilerStorageInterface /** * Returns whether data for the given token already exists in storage. * - * @param string $token - * @return boolean + * @param string $token The profile token + * + * @return Boolean */ - protected function tokenDataExists($token) + protected function has($token) { $db = $this->initDb(); $tokenExists = $this->fetch($db, 'SELECT 1 FROM sf_profiler_data WHERE token = :token LIMIT 1', array(':token' => $token)); @@ -252,4 +252,3 @@ abstract class PdoProfilerStorage implements ProfilerStorageInterface return !empty($tokenExists); } } -