From 04c843b17bffd5c0e6a55881491503578f0a8cd5 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 3 Mar 2012 17:34:13 -0500 Subject: [PATCH] Fix coding standards in Cache/ --- lib/Cake/Cache/Cache.php | 1 + lib/Cake/Cache/CacheEngine.php | 4 +++- lib/Cake/Cache/Engine/ApcEngine.php | 4 ++-- lib/Cake/Cache/Engine/FileEngine.php | 3 ++- lib/Cake/Cache/Engine/MemcacheEngine.php | 1 + lib/Cake/Cache/Engine/XcacheEngine.php | 1 + 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/Cake/Cache/Cache.php b/lib/Cake/Cache/Cache.php index 1bed46a8d..9ca6c3547 100644 --- a/lib/Cake/Cache/Cache.php +++ b/lib/Cake/Cache/Cache.php @@ -477,5 +477,6 @@ class Cache { } return array(); } + } diff --git a/lib/Cake/Cache/CacheEngine.php b/lib/Cake/Cache/CacheEngine.php index 0b0e1b625..8930a195e 100644 --- a/lib/Cake/Cache/CacheEngine.php +++ b/lib/Cake/Cache/CacheEngine.php @@ -53,7 +53,8 @@ abstract class CacheEngine { * Permanently remove all expired and deleted data * @return void */ - public function gc() { } + public function gc() { + } /** * Write value for a key into cache @@ -129,4 +130,5 @@ abstract class CacheEngine { $key = Inflector::underscore(str_replace(array(DS, '/', '.'), '_', strval($key))); return $key; } + } diff --git a/lib/Cake/Cache/Engine/ApcEngine.php b/lib/Cake/Cache/Engine/ApcEngine.php index a6ca486fd..1ce19a473 100644 --- a/lib/Cake/Cache/Engine/ApcEngine.php +++ b/lib/Cake/Cache/Engine/ApcEngine.php @@ -54,7 +54,7 @@ class ApcEngine extends CacheEngine { } else { $expires = time() + $duration; } - apc_store($key.'_expires', $expires, $duration); + apc_store($key . '_expires', $expires, $duration); return apc_store($key, $value, $duration); } @@ -66,7 +66,7 @@ class ApcEngine extends CacheEngine { */ public function read($key) { $time = time(); - $cachetime = intval(apc_fetch($key.'_expires')); + $cachetime = intval(apc_fetch($key . '_expires')); if ($cachetime !== 0 && ($cachetime < $time || ($time + $this->settings['duration']) < $cachetime)) { return false; } diff --git a/lib/Cake/Cache/Engine/FileEngine.php b/lib/Cake/Cache/Engine/FileEngine.php index 4a1993b92..df472caff 100644 --- a/lib/Cake/Cache/Engine/FileEngine.php +++ b/lib/Cake/Cache/Engine/FileEngine.php @@ -299,7 +299,7 @@ class FileEngine extends CacheEngine { } unset($path); - if (!$exists && !chmod($this->_File->getPathname(), (int) $this->settings['mask'])) { + if (!$exists && !chmod($this->_File->getPathname(), (int)$this->settings['mask'])) { trigger_error(__d( 'cake_dev', 'Could not apply permission mask "%s" on cache file "%s"', array($this->_File->getPathname(), $this->settings['mask'])), E_USER_WARNING); @@ -322,4 +322,5 @@ class FileEngine extends CacheEngine { } return true; } + } diff --git a/lib/Cake/Cache/Engine/MemcacheEngine.php b/lib/Cake/Cache/Engine/MemcacheEngine.php index 0cbc84902..0738ed468 100644 --- a/lib/Cake/Cache/Engine/MemcacheEngine.php +++ b/lib/Cake/Cache/Engine/MemcacheEngine.php @@ -234,4 +234,5 @@ class MemcacheEngine extends CacheEngine { } return true; } + } diff --git a/lib/Cake/Cache/Engine/XcacheEngine.php b/lib/Cake/Cache/Engine/XcacheEngine.php index 950d47945..561123f5f 100644 --- a/lib/Cake/Cache/Engine/XcacheEngine.php +++ b/lib/Cake/Cache/Engine/XcacheEngine.php @@ -173,4 +173,5 @@ class XcacheEngine extends CacheEngine { } } } + }