Skip to content

Commit

Permalink
Adjust doc blocks according to convention.
Browse files Browse the repository at this point in the history
  • Loading branch information
euromark committed Apr 14, 2014
1 parent 6a3cae0 commit b1897f5
Show file tree
Hide file tree
Showing 246 changed files with 1,103 additions and 1,148 deletions.
20 changes: 10 additions & 10 deletions src/Cache/Cache.php
Expand Up @@ -72,7 +72,7 @@ class Cache {
/**
* Flag for tracking whether or not caching is enabled.
*
* @var boolean
* @var bool
*/
protected static $_enabled = true;

Expand Down Expand Up @@ -151,7 +151,7 @@ public static function engine($config) {
* Permanently remove all expired and deleted data
*
* @param string $config [optional] The config name you wish to have garbage collected. Defaults to 'default'
* @param integer $expires [optional] An expires timestamp. Defaults to NULL
* @param int $expires [optional] An expires timestamp. Defaults to NULL
* @return void
*/
public static function gc($config = 'default', $expires = null) {
Expand Down Expand Up @@ -179,7 +179,7 @@ public static function gc($config = 'default', $expires = null) {
* @param string $key Identifier for the data
* @param mixed $value Data to be cached - anything except a resource
* @param string $config Optional string configuration name to write to. Defaults to 'default'
* @return boolean True if the data was successfully cached, false on failure
* @return bool True if the data was successfully cached, false on failure
*/
public static function write($key, $value, $config = 'default') {
$engine = static::engine($config);
Expand Down Expand Up @@ -232,7 +232,7 @@ public static function read($key, $config = 'default') {
* Increment a number under the key and return incremented value.
*
* @param string $key Identifier for the data
* @param integer $offset How much to add
* @param int $offset How much to add
* @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 All @@ -250,7 +250,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 subtract
* @param int $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 @@ -279,7 +279,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 successfully deleted, false if it didn't exist or couldn't be removed
* @return bool 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') {
$engine = static::engine($config);
Expand All @@ -293,9 +293,9 @@ public static function delete($key, $config = 'default') {
/**
* Delete all keys from the cache.
*
* @param boolean $check if true will check expiration, otherwise delete all
* @param bool $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 successfully cleared, false otherwise
* @return bool True if the cache was successfully cleared, false otherwise
*/
public static function clear($check = false, $config = 'default') {
$engine = static::engine($config);
Expand All @@ -311,7 +311,7 @@ public static function clear($check = false, $config = 'default') {
*
* @param string $group name of the group to be cleared
* @param string $config name of the configuration to use. Defaults to 'default'
* @return boolean True if the cache group was successfully cleared, false otherwise
* @return bool True if the cache group was successfully cleared, false otherwise
*/
public static function clearGroup($group, $config = 'default') {
$engine = static::engine($config);
Expand Down Expand Up @@ -374,7 +374,7 @@ public static function disable() {
/**
* Check whether or not caching is enabled.
*
* @return boolean
* @return bool
*/
public static function enabled() {
return static::$_enabled;
Expand Down
18 changes: 9 additions & 9 deletions src/Cache/CacheEngine.php
Expand Up @@ -61,7 +61,7 @@ abstract class CacheEngine {
* before use.
*
* @param array $config Associative array of parameters for the engine
* @return boolean True if the engine has been successfully initialized, false if not
* @return bool True if the engine has been successfully initialized, false if not
*/
public function init(array $config = []) {
$this->config($config);
Expand All @@ -82,7 +82,7 @@ public function init(array $config = []) {
*
* Permanently remove all expired and deleted data
*
* @param integer $expires [optional] An expires timestamp, invalidating all data before.
* @param int $expires [optional] An expires timestamp, invalidating all data before.
* @return void
*/
public function gc($expires = null) {
Expand All @@ -93,7 +93,7 @@ public function gc($expires = null) {
*
* @param string $key Identifier for the data
* @param mixed $value Data to be cached
* @return boolean True if the data was successfully cached, false on failure
* @return bool True if the data was successfully cached, false on failure
*/
abstract public function write($key, $value);

Expand All @@ -109,7 +109,7 @@ abstract public function read($key);
* Increment a number under the key and return incremented value
*
* @param string $key Identifier for the data
* @param integer $offset How much to add
* @param int $offset How much to add
* @return bool|int New incremented value, false otherwise
*/
abstract public function increment($key, $offset = 1);
Expand All @@ -118,7 +118,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 $offset How much to subtract
* @param int $offset How much to subtract
* @return bool|int New incremented value, false otherwise
*/
abstract public function decrement($key, $offset = 1);
Expand All @@ -127,15 +127,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 successfully deleted, false if it didn't exist or couldn't be removed
* @return bool 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 successfully cleared, false otherwise
* @param bool $check if true will check expiration, otherwise delete all
* @return bool True if the cache was successfully cleared, false otherwise
*/
abstract public function clear($check);

Expand All @@ -145,7 +145,7 @@ abstract public function clear($check);
* the same result.
*
* @param string $group name of the group to be cleared
* @return boolean
* @return bool
*/
public function clearGroup($group) {
return false;
Expand Down
16 changes: 8 additions & 8 deletions src/Cache/Engine/ApcEngine.php
Expand Up @@ -39,7 +39,7 @@ class ApcEngine extends CacheEngine {
* Called automatically by the cache frontend
*
* @param array $config array of setting for the engine
* @return boolean True if the engine has been successfully initialized, false if not
* @return bool True if the engine has been successfully initialized, false if not
*/
public function init(array $config = []) {
if (!isset($config['prefix'])) {
Expand All @@ -54,7 +54,7 @@ public function init(array $config = []) {
*
* @param string $key Identifier for the data
* @param mixed $value Data to be cached
* @return boolean True if the data was successfully cached, false on failure
* @return bool True if the data was successfully cached, false on failure
*/
public function write($key, $value) {
$key = $this->_key($key);
Expand Down Expand Up @@ -89,7 +89,7 @@ public function read($key) {
* Increments the value of an integer cached key
*
* @param string $key Identifier for the data
* @param integer $offset How much to increment
* @param int $offset How much to increment
* @return bool|int New incremented value, false otherwise
*/
public function increment($key, $offset = 1) {
Expand All @@ -102,7 +102,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 subtract
* @param int $offset How much to subtract
* @return bool|int New decremented value, false otherwise
*/
public function decrement($key, $offset = 1) {
Expand All @@ -115,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 successfully deleted, false if it didn't exist or couldn't be removed
* @return bool True if the value was successfully deleted, false if it didn't exist or couldn't be removed
*/
public function delete($key) {
$key = $this->_key($key);
Expand All @@ -126,9 +126,9 @@ public function delete($key) {
/**
* Delete all keys from the cache. This will clear every cache config using APC.
*
* @param boolean $check If true, nothing will be cleared, as entries are removed
* @param bool $check If true, nothing will be cleared, as entries are removed
* from APC as they expired. This flag is really only used by FileEngine.
* @return boolean True Returns true.
* @return bool True Returns true.
*/
public function clear($check) {
if ($check) {
Expand Down Expand Up @@ -183,7 +183,7 @@ public function groups() {
* old values will remain in storage until they expire.
*
* @param string $group name of the group to be cleared
* @return boolean success
* @return bool success
*/
public function clearGroup($group) {
apc_inc($this->_config['prefix'] . $group, 1, $success);
Expand Down
32 changes: 16 additions & 16 deletions src/Cache/Engine/FileEngine.php
Expand Up @@ -75,7 +75,7 @@ class FileEngine extends CacheEngine {
/**
* True unless FileEngine::__active(); fails
*
* @var boolean
* @var bool
*/
protected $_init = true;

Expand All @@ -85,7 +85,7 @@ class FileEngine extends CacheEngine {
* Called automatically by the cache frontend.
*
* @param array $config array of setting for the engine
* @return boolean True if the engine has been successfully initialized, false if not
* @return bool True if the engine has been successfully initialized, false if not
*/
public function init(array $config = []) {
parent::init($config);
Expand All @@ -105,8 +105,8 @@ public function init(array $config = []) {
/**
* Garbage collection. Permanently remove all expired and deleted data
*
* @param integer $expires [optional] An expires timestamp, invalidating all data before.
* @return boolean True if garbage collection was successful, false on failure
* @param int $expires [optional] An expires timestamp, invalidating all data before.
* @return bool True if garbage collection was successful, false on failure
*/
public function gc($expires = null) {
return $this->clear(true);
Expand All @@ -117,7 +117,7 @@ public function gc($expires = null) {
*
* @param string $key Identifier for the data
* @param mixed $data Data to be cached
* @return boolean True if the data was successfully cached, false on failure
* @return bool True if the data was successfully cached, false on failure
*/
public function write($key, $data) {
if ($data === '' || !$this->_init) {
Expand Down Expand Up @@ -216,7 +216,7 @@ public function read($key) {
* Delete a key from the cache
*
* @param string $key Identifier for the data
* @return boolean True if the value was successfully deleted, false if it didn't exist or couldn't be removed
* @return bool True if the value was successfully deleted, false if it didn't exist or couldn't be removed
*/
public function delete($key) {
$key = $this->_key($key);
Expand All @@ -236,8 +236,8 @@ 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 successfully cleared, false otherwise
* @param bool $check Optional - only delete expired cache items
* @return bool True if the cache was successfully cleared, false otherwise
*/
public function clear($check) {
if (!$this->_init) {
Expand Down Expand Up @@ -274,8 +274,8 @@ public function clear($check) {
* Used to clear a directory of matching files.
*
* @param string $path The path to search.
* @param integer $now The current timestamp
* @param integer $threshold Any file not modified after this value will be deleted.
* @param int $now The current timestamp
* @param int $threshold Any file not modified after this value will be deleted.
* @return void
*/
protected function _clearDirectory($path, $now, $threshold) {
Expand Down Expand Up @@ -323,7 +323,7 @@ protected function _clearDirectory($path, $now, $threshold) {
* Not implemented
*
* @param string $key
* @param integer $offset
* @param int $offset
* @return void
* @throws \Cake\Error\Exception
*/
Expand All @@ -335,7 +335,7 @@ public function decrement($key, $offset = 1) {
* Not implemented
*
* @param string $key
* @param integer $offset
* @param int $offset
* @return void
* @throws \Cake\Error\Exception
*/
Expand All @@ -348,8 +348,8 @@ public function increment($key, $offset = 1) {
* for the cache file the key is referring to.
*
* @param string $key The key
* @param boolean $createKey Whether the key should be created if it doesn't exists, or not
* @return boolean true if the cache key could be set, false otherwise
* @param bool $createKey Whether the key should be created if it doesn't exists, or not
* @return bool true if the cache key could be set, false otherwise
*/
protected function _setKey($key, $createKey = false) {
$groups = null;
Expand Down Expand Up @@ -389,7 +389,7 @@ protected function _setKey($key, $createKey = false) {
/**
* Determine is cache directory is writable
*
* @return boolean
* @return bool
*/
protected function _active() {
$dir = new \SplFileInfo($this->_config['path']);
Expand Down Expand Up @@ -426,7 +426,7 @@ public function key($key) {
* Recursively deletes all files under any directory named as $group
*
* @param string $group name of the group to be cleared
* @return boolean success
* @return bool success
*/
public function clearGroup($group) {
$this->_File = null;
Expand Down

0 comments on commit b1897f5

Please sign in to comment.