From 7e38f9d79fbae58f57dc17724e297d294fd49f02 Mon Sep 17 00:00:00 2001 From: mark_story Date: Mon, 23 Apr 2012 22:27:27 -0400 Subject: [PATCH] Fix more coding standards errors. --- lib/Cake/Cache/CacheEngine.php | 10 +++++----- lib/Cake/Cache/Engine/RedisEngine.php | 6 +++--- lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php | 2 +- lib/Cake/Test/Case/Cache/Engine/RedisEngineTest.php | 3 +-- lib/Cake/View/HelperCollection.php | 4 +++- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/lib/Cake/Cache/CacheEngine.php b/lib/Cake/Cache/CacheEngine.php index 7b285e04181..72430ff73d6 100644 --- a/lib/Cake/Cache/CacheEngine.php +++ b/lib/Cake/Cache/CacheEngine.php @@ -129,7 +129,7 @@ abstract public function clear($check); * * @param string $groups name of the group to be cleared * @return boolean - **/ + */ public function clearGroup($group) { return false; } @@ -140,10 +140,10 @@ public function clearGroup($group) { * the token representing each group in the cache key * * @return array - **/ - public function groups() { - return $this->settings['groups']; - } + */ + public function groups() { + return $this->settings['groups']; + } /** * Cache Engine settings diff --git a/lib/Cake/Cache/Engine/RedisEngine.php b/lib/Cake/Cache/Engine/RedisEngine.php index 0ec2270cd06..faaaf5dad41 100644 --- a/lib/Cake/Cache/Engine/RedisEngine.php +++ b/lib/Cake/Cache/Engine/RedisEngine.php @@ -115,7 +115,7 @@ public function write($key, $value, $duration) { public function read($key) { $value = $this->_Redis->get($key); if (ctype_digit($value)) { - $value = (int) $value; + $value = (int)$value; } if ($value !== false && is_string($value)) { $value = unserialize($value); @@ -132,7 +132,7 @@ public function read($key) { * @throws CacheException when you try to increment with compress = true */ public function increment($key, $offset = 1) { - return (int) $this->_Redis->incrBy($key, $offset); + return (int)$this->_Redis->incrBy($key, $offset); } /** @@ -144,7 +144,7 @@ public function increment($key, $offset = 1) { * @throws CacheException when you try to decrement with compress = true */ public function decrement($key, $offset = 1) { - return (int) $this->_Redis->decrBy($key, $offset); + return (int)$this->_Redis->decrBy($key, $offset); } /** diff --git a/lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php b/lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php index 4d4301be291..b3fd48d5f0d 100644 --- a/lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php +++ b/lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php @@ -410,7 +410,7 @@ public function testGroupsReadWrite() { $this->assertTrue(Cache::write('test_groups3', 'value3', 'file_groups')); } - /** +/** * Tests that deleteing from a groups-enabled config is possible * * @return void diff --git a/lib/Cake/Test/Case/Cache/Engine/RedisEngineTest.php b/lib/Cake/Test/Case/Cache/Engine/RedisEngineTest.php index bf0d5b7de49..73dd557c4b1 100644 --- a/lib/Cake/Test/Case/Cache/Engine/RedisEngineTest.php +++ b/lib/Cake/Test/Case/Cache/Engine/RedisEngineTest.php @@ -220,7 +220,6 @@ public function testIncrement() { $this->assertEquals(3, $result); } - /** * test clearing redis. * @@ -333,4 +332,4 @@ public function testGroupClear() { $this->assertFalse(Cache::read('test_groups', 'redis_groups')); } -} \ No newline at end of file +} diff --git a/lib/Cake/View/HelperCollection.php b/lib/Cake/View/HelperCollection.php index 7fda46762ff..f07019c829a 100644 --- a/lib/Cake/View/HelperCollection.php +++ b/lib/Cake/View/HelperCollection.php @@ -50,7 +50,9 @@ public function __construct(View $view) { * * @param string $helper The helper name to be loaded * @return boolean wheter the helper could be loaded or not - **/ + * @throws MissingHelperException When a helper could not be found. + * App helpers are searched, and then plugin helpers. + */ public function __isset($helper) { if (parent::__isset($helper)) { return true;