Skip to content

Commit

Permalink
PhpDoc fixes
Browse files Browse the repository at this point in the history
Signed-off-by: mark_story <mark@mark-story.com>
  • Loading branch information
evilbloodydemon authored and markstory committed Apr 17, 2011
1 parent 3ff9747 commit 86b7667
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 42 deletions.
27 changes: 13 additions & 14 deletions lib/Cake/Cache/Cache.php
Expand Up @@ -376,7 +376,7 @@ public static function increment($key, $offset = 1, $config = 'default') {
* Decrement a number under the key and return decremented value.
*
* @param string $key Identifier for the data
* @param integer $offset How much to substract
* @param integer $offset How much to subtract
* @param string $config Optional string configuration name. Defaults to 'default'
* @return mixed new value, or false if the data doesn't exist, is not integer,
* or if there was an error fetching it
Expand Down Expand Up @@ -414,7 +414,7 @@ public static function decrement($key, $offset = 1, $config = 'default') {
*
* @param string $key Identifier for the data
* @param string $config name of the configuration to use. Defaults to 'default'
* @return boolean True if the value was succesfully deleted, false if it didn't exist or couldn't be removed
* @return boolean True if the value was successfully deleted, false if it didn't exist or couldn't be removed
*/
public static function delete($key, $config = 'default') {
$settings = self::settings($config);
Expand All @@ -440,7 +440,7 @@ public static function delete($key, $config = 'default') {
*
* @param boolean $check if true will check expiration, otherwise delete all
* @param string $config name of the configuration to use. Defaults to 'default'
* @return boolean True if the cache was succesfully cleared, false otherwise
* @return boolean True if the cache was successfully cleared, false otherwise
*/
public static function clear($check = false, $config = 'default') {
if (!self::isInitialized($config)) {
Expand All @@ -454,21 +454,20 @@ public static function clear($check = false, $config = 'default') {
/**
* Check if Cache has initialized a working config for the given name.
*
* @param string $engine Name of the engine, Defaults to default
* @param string $config Name of the configuration setting
* @param string $config name of the configuration to use. Defaults to 'default'
* @return bool Whether or not the config name has been initialized.
*/
public static function isInitialized($name = 'default') {
public static function isInitialized($config = 'default') {
if (Configure::read('Cache.disable')) {
return false;
}
return isset(self::$_engines[$name]);
return isset(self::$_engines[$config]);
}

/**
* Return the settings for the named cache engine.
*
* @param string $engine Name of the configuration to get settings for. Defaults to 'default'
* @param string $name Name of the configuration to get settings for. Defaults to 'default'
* @return array list of settings for this engine
* @see Cache::config()
* @access public
Expand Down Expand Up @@ -502,8 +501,8 @@ abstract class CacheEngine {
*
* Called automatically by the cache frontend
*
* @param array $params Associative array of parameters for the engine
* @return boolean True if the engine has been succesfully initialized, false if not
* @param array $settings Associative array of parameters for the engine
* @return boolean True if the engine has been successfully initialized, false if not
*/
public function init($settings = array()) {
$this->settings = array_merge(
Expand Down Expand Up @@ -531,7 +530,7 @@ public function gc() { }
* @param string $key Identifier for the data
* @param mixed $value Data to be cached
* @param mixed $duration How long to cache for.
* @return boolean True if the data was succesfully cached, false on failure
* @return boolean True if the data was successfully cached, false on failure
*/
abstract public function write($key, $value, $duration);

Expand All @@ -556,7 +555,7 @@ abstract public function increment($key, $offset = 1);
* Decrement a number under the key and return decremented value
*
* @param string $key Identifier for the data
* @param integer $value How much to substract
* @param integer $offset How much to subtract
* @return New incremented value, false otherwise
*/
abstract public function decrement($key, $offset = 1);
Expand All @@ -565,15 +564,15 @@ abstract public function decrement($key, $offset = 1);
* Delete a key from the cache
*
* @param string $key Identifier for the data
* @return boolean True if the value was succesfully deleted, false if it didn't exist or couldn't be removed
* @return boolean True if the value was successfully deleted, false if it didn't exist or couldn't be removed
*/
abstract public function delete($key);

/**
* Delete all keys from the cache
*
* @param boolean $check if true will check expiration, otherwise delete all
* @return boolean True if the cache was succesfully cleared, false otherwise
* @return boolean True if the cache was successfully cleared, false otherwise
*/
abstract public function clear($check);

Expand Down
12 changes: 5 additions & 7 deletions lib/Cake/Cache/Engine/ApcEngine.php
Expand Up @@ -31,7 +31,7 @@ class ApcEngine extends CacheEngine {
* Called automatically by the cache frontend
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
*
* @param array $setting array of setting for the engine
* @param array $settings array of setting for the engine
* @return boolean True if the engine has been successfully initialized, false if not
* @see CacheEngine::__defaults
*/
Expand All @@ -46,7 +46,7 @@ public function init($settings = array()) {
* @param string $key Identifier for the data
* @param mixed $value Data to be cached
* @param integer $duration How long to cache the data, in seconds
* @return boolean True if the data was succesfully cached, false on failure
* @return boolean True if the data was successfully cached, false on failure
*/
public function write($key, $value, $duration) {
$expires = time() + $duration;
Expand Down Expand Up @@ -74,7 +74,6 @@ public function read($key) {
*
* @param string $key Identifier for the data
* @param integer $offset How much to increment
* @param integer $duration How long to cache the data, in seconds
* @return New incremented value, false otherwise
*/
public function increment($key, $offset = 1) {
Expand All @@ -85,8 +84,7 @@ public function increment($key, $offset = 1) {
* Decrements the value of an integer cached key
*
* @param string $key Identifier for the data
* @param integer $offset How much to substract
* @param integer $duration How long to cache the data, in seconds
* @param integer $offset How much to subtract
* @return New decremented value, false otherwise
*/
public function decrement($key, $offset = 1) {
Expand All @@ -97,7 +95,7 @@ public function decrement($key, $offset = 1) {
* Delete a key from the cache
*
* @param string $key Identifier for the data
* @return boolean True if the value was succesfully deleted, false if it didn't exist or couldn't be removed
* @return boolean True if the value was successfully deleted, false if it didn't exist or couldn't be removed
*/
public function delete($key) {
return apc_delete($key);
Expand All @@ -106,7 +104,7 @@ public function delete($key) {
/**
* Delete all keys from the cache. This will clear every cache config using APC.
*
* @return boolean True if the cache was succesfully cleared, false otherwise
* @return boolean True if the cache was successfully cleared, false otherwise
*/
public function clear($check) {
return apc_clear_cache('user');
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Cache/Engine/FileEngine.php
Expand Up @@ -63,7 +63,7 @@ class FileEngine extends CacheEngine {
* Called automatically by the cache frontend
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
*
* @param array $setting array of setting for the engine
* @param array $settings array of setting for the engine
* @return boolean True if the engine has been successfully initialized, false if not
*/
public function init($settings = array()) {
Expand Down Expand Up @@ -99,7 +99,7 @@ public function gc() {
* @param string $key Identifier for the data
* @param mixed $data Data to be cached
* @param mixed $duration How long to cache the data, in seconds
* @return boolean True if the data was succesfully cached, false on failure
* @return boolean True if the data was successfully cached, false on failure
*/
public function write($key, $data, $duration) {
if ($data === '' || !$this->_init) {
Expand Down Expand Up @@ -204,7 +204,7 @@ public function delete($key) {
* Delete all values from the cache
*
* @param boolean $check Optional - only delete expired cache items
* @return boolean True if the cache was succesfully cleared, false otherwise
* @return boolean True if the cache was successfully cleared, false otherwise
*/
public function clear($check) {
if (!$this->_init) {
Expand Down
12 changes: 5 additions & 7 deletions lib/Cake/Cache/Engine/MemcacheEngine.php
Expand Up @@ -53,7 +53,7 @@ class MemcacheEngine extends CacheEngine {
* Called automatically by the cache frontend
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
*
* @param array $setting array of setting for the engine
* @param array $settings array of setting for the engine
* @return boolean True if the engine has been successfully initialized, false if not
*/
public function init($settings = array()) {
Expand Down Expand Up @@ -121,7 +121,7 @@ function _parseServerString($server) {
* @param string $key Identifier for the data
* @param mixed $value Data to be cached
* @param integer $duration How long to cache the data, in seconds
* @return boolean True if the data was succesfully cached, false on failure
* @return boolean True if the data was successfully cached, false on failure
* @see http://php.net/manual/en/memcache.set.php
*/
public function write($key, $value, $duration) {
Expand All @@ -146,7 +146,6 @@ public function read($key) {
*
* @param string $key Identifier for the data
* @param integer $offset How much to increment
* @param integer $duration How long to cache the data, in seconds
* @return New incremented value, false otherwise
* @throws CacheException when you try to increment with compress = true
*/
Expand All @@ -163,8 +162,7 @@ public function increment($key, $offset = 1) {
* Decrements the value of an integer cached key
*
* @param string $key Identifier for the data
* @param integer $offset How much to substract
* @param integer $duration How long to cache the data, in seconds
* @param integer $offset How much to subtract
* @return New decremented value, false otherwise
* @throws CacheException when you try to decrement with compress = true
*/
Expand All @@ -181,7 +179,7 @@ public function decrement($key, $offset = 1) {
* Delete a key from the cache
*
* @param string $key Identifier for the data
* @return boolean True if the value was succesfully deleted, false if it didn't exist or couldn't be removed
* @return boolean True if the value was successfully deleted, false if it didn't exist or couldn't be removed
*/
public function delete($key) {
return $this->_Memcache->delete($key);
Expand All @@ -190,7 +188,7 @@ public function delete($key) {
/**
* Delete all keys from the cache
*
* @return boolean True if the cache was succesfully cleared, false otherwise
* @return boolean True if the cache was successfully cleared, false otherwise
*/
public function clear($check) {
return $this->_Memcache->flush();
Expand Down
14 changes: 6 additions & 8 deletions lib/Cake/Cache/Engine/XcacheEngine.php
Expand Up @@ -42,7 +42,7 @@ class XcacheEngine extends CacheEngine {
* Called automatically by the cache frontend
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
*
* @param array $setting array of setting for the engine
* @param array $settings array of setting for the engine
* @return boolean True if the engine has been successfully initialized, false if not
*/
public function init($settings) {
Expand All @@ -62,7 +62,7 @@ public function init($settings) {
* @param string $key Identifier for the data
* @param mixed $value Data to be cached
* @param integer $duration How long to cache the data, in seconds
* @return boolean True if the data was succesfully cached, false on failure
* @return boolean True if the data was successfully cached, false on failure
*/
public function write($key, $value, $duration) {
$expires = time() + $duration;
Expand Down Expand Up @@ -94,7 +94,6 @@ public function read($key) {
*
* @param string $key Identifier for the data
* @param integer $offset How much to increment
* @param integer $duration How long to cache the data, in seconds
* @return New incremented value, false otherwise
*/
public function increment($key, $offset = 1) {
Expand All @@ -106,8 +105,7 @@ public function increment($key, $offset = 1) {
* If the cache key is not an integer it will be treated as 0
*
* @param string $key Identifier for the data
* @param integer $offset How much to substract
* @param integer $duration How long to cache the data, in seconds
* @param integer $offset How much to subtract
* @return New decremented value, false otherwise
*/
public function decrement($key, $offset = 1) {
Expand All @@ -117,7 +115,7 @@ public function decrement($key, $offset = 1) {
* Delete a key from the cache
*
* @param string $key Identifier for the data
* @return boolean True if the value was succesfully deleted, false if it didn't exist or couldn't be removed
* @return boolean True if the value was successfully deleted, false if it didn't exist or couldn't be removed
*/
public function delete($key) {
return xcache_unset($key);
Expand All @@ -126,7 +124,7 @@ public function delete($key) {
/**
* Delete all keys from the cache
*
* @return boolean True if the cache was succesfully cleared, false otherwise
* @return boolean True if the cache was successfully cleared, false otherwise
*/
public function clear($check) {
$this->__auth();
Expand All @@ -145,7 +143,7 @@ public function clear($check) {
* This has to be done because xcache_clear_cache() needs to pass Basic Http Auth
* (see xcache.admin configuration settings)
*
* @param boolean Revert changes
* @param boolean $reverse Revert changes
* @access private
*/
function __auth($reverse = false) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/ComponentCollection.php
Expand Up @@ -32,7 +32,7 @@ class ComponentCollection extends ObjectCollection {
* Initializes all the Components for a controller.
* Attaches a reference of each component to the Controller.
*
* @param Controller $controller Controller to initialize components for.
* @param Controller $Controller Controller to initialize components for.
* @return void
*/
public function init(Controller $Controller) {
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Controller/Controller.php
Expand Up @@ -353,7 +353,7 @@ public function __isset($name) {
}

/**
* Provides backwards compatbility access to the request object properties.
* Provides backwards compatibility access to the request object properties.
* Also provides the params alias.
*
* @return void
Expand All @@ -376,7 +376,7 @@ public function __get($name) {
}

/**
* Provides backwards compatiblity access for setting values to the request object.
* Provides backwards compatibility access for setting values to the request object.
*
* @return void
*/
Expand Down

0 comments on commit 86b7667

Please sign in to comment.