Correct doc blocks according to cs guidelines.

Remove superfluous empty lines.
This commit is contained in:
euromark 2014-07-03 15:36:42 +02:00
parent 65d14c7e97
commit 974ca851c2
271 changed files with 1383 additions and 1528 deletions

View file

@ -19,7 +19,6 @@
*/
/**
*
* Using the Schema command line utility
* cake schema run create DbAcl
*
@ -30,7 +29,7 @@ class DbAclSchema extends CakeSchema {
* Before event.
*
* @param array $event The event data.
* @return boolean success
* @return bool success
*/
public function before($event = array()) {
return true;

View file

@ -19,7 +19,6 @@
*/
/**
*
* Using the Schema command line utility
*
* Use it to configure database for i18n

View file

@ -278,7 +278,6 @@
//Configure::write('Config.timezone', 'Europe/Paris');
/**
*
* Cache Engine Configuration
* Default settings provided below
*

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* @link http://cakephp.org CakePHP(tm) Project
* @package app.View.Pages
* @since CakePHP(tm) v 0.10.0.1076

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*

View file

@ -160,7 +160,7 @@ class Cache {
* Finds and builds the instance of the required engine class.
*
* @param string $name Name of the config array that needs an engine instance built
* @return boolean
* @return bool
* @throws CacheException
*/
protected static function _buildEngine($name) {
@ -201,7 +201,7 @@ class Cache {
* the Engine instance is also unset.
*
* @param string $name A currently configured cache config you wish to remove.
* @return boolean success of the removal, returns false when the config does not exist.
* @return bool success of the removal, returns false when the config does not exist.
*/
public static function drop($name) {
if (!isset(self::$_config[$name])) {
@ -269,7 +269,7 @@ class Cache {
* 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) {
@ -292,7 +292,7 @@ class Cache {
* @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') {
$settings = self::settings($config);
@ -362,7 +362,7 @@ class Cache {
* 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.
@ -390,7 +390,7 @@ class Cache {
* 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
@ -429,7 +429,7 @@ class Cache {
*
* @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') {
$settings = self::settings($config);
@ -453,9 +453,9 @@ class Cache {
/**
* 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') {
if (!self::isInitialized($config)) {
@ -471,7 +471,7 @@ class Cache {
*
* @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') {
if (!self::isInitialized($config)) {
@ -486,7 +486,7 @@ class Cache {
* Check if Cache has initialized a working config for the given name.
*
* @param string $config name of the configuration to use. Defaults to 'default'
* @return boolean Whether or not the config name has been initialized.
* @return bool Whether or not the config name has been initialized.
*/
public static function isInitialized($config = 'default') {
if (Configure::read('Cache.disable')) {

View file

@ -42,7 +42,7 @@ abstract class CacheEngine {
* Called automatically by the cache frontend
*
* @param array $settings 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($settings = array()) {
$settings += $this->settings + array(
@ -67,7 +67,7 @@ abstract class CacheEngine {
*
* 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) {
@ -78,8 +78,8 @@ abstract class CacheEngine {
*
* @param string $key Identifier for the data
* @param mixed $value Data to be cached
* @param integer $duration How long to cache for.
* @return boolean True if the data was successfully cached, false on failure
* @param int $duration How long to cache for.
* @return bool True if the data was successfully cached, false on failure
*/
abstract public function write($key, $value, $duration);
@ -95,7 +95,7 @@ abstract class CacheEngine {
* 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 New incremented value, false otherwise
*/
abstract public function increment($key, $offset = 1);
@ -104,7 +104,7 @@ abstract class CacheEngine {
* 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 New incremented value, false otherwise
*/
abstract public function decrement($key, $offset = 1);
@ -113,15 +113,15 @@ abstract class CacheEngine {
* 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);
@ -131,7 +131,7 @@ abstract class CacheEngine {
* the same result.
*
* @param string $group name of the group to be cleared
* @return boolean
* @return bool
*/
public function clearGroup($group) {
return false;

View file

@ -38,7 +38,7 @@ class ApcEngine extends CacheEngine {
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
*
* @param array $settings 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
* @see CacheEngine::__defaults
*/
public function init($settings = array()) {
@ -55,8 +55,8 @@ class ApcEngine extends CacheEngine {
*
* @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 successfully cached, false on failure
* @param int $duration How long to cache the data, in seconds
* @return bool True if the data was successfully cached, false on failure
*/
public function write($key, $value, $duration) {
$expires = 0;
@ -86,7 +86,7 @@ class ApcEngine extends CacheEngine {
* 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 New incremented value, false otherwise
*/
public function increment($key, $offset = 1) {
@ -97,7 +97,7 @@ class ApcEngine extends CacheEngine {
* 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 New decremented value, false otherwise
*/
public function decrement($key, $offset = 1) {
@ -108,7 +108,7 @@ class ApcEngine extends CacheEngine {
* 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) {
return apc_delete($key);
@ -117,9 +117,9 @@ class ApcEngine extends CacheEngine {
/**
* 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) {
@ -181,7 +181,7 @@ class ApcEngine extends CacheEngine {
* old values will remain in storage until they expire.
*
* @param string $group The group to clear.
* @return boolean success
* @return bool success
*/
public function clearGroup($group) {
apc_inc($this->settings['prefix'] . $group, 1, $success);

View file

@ -53,7 +53,7 @@ class FileEngine extends CacheEngine {
/**
* True unless FileEngine::__active(); fails
*
* @var boolean
* @var bool
*/
protected $_init = true;
@ -64,7 +64,7 @@ class FileEngine extends CacheEngine {
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
*
* @param array $settings 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($settings = array()) {
$settings += array(
@ -93,8 +93,8 @@ class FileEngine extends CacheEngine {
/**
* 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);
@ -105,8 +105,8 @@ class FileEngine extends CacheEngine {
*
* @param string $key Identifier for the data
* @param mixed $data Data to be cached
* @param integer $duration How long to cache the data, in seconds
* @return boolean True if the data was successfully cached, false on failure
* @param int $duration How long to cache the data, in seconds
* @return bool True if the data was successfully cached, false on failure
*/
public function write($key, $data, $duration) {
if ($data === '' || !$this->_init) {
@ -200,7 +200,7 @@ class FileEngine extends CacheEngine {
* 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) {
if ($this->_setKey($key) === false || !$this->_init) {
@ -217,8 +217,8 @@ class FileEngine extends CacheEngine {
/**
* 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) {
@ -255,8 +255,8 @@ class FileEngine extends CacheEngine {
* 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) {
@ -304,7 +304,7 @@ class FileEngine extends CacheEngine {
* Not implemented
*
* @param string $key The key to decrement
* @param integer $offset The number to offset
* @param int $offset The number to offset
* @return void
* @throws CacheException
*/
@ -316,7 +316,7 @@ class FileEngine extends CacheEngine {
* Not implemented
*
* @param string $key The key to decrement
* @param integer $offset The number to offset
* @param int $offset The number to offset
* @return void
* @throws CacheException
*/
@ -329,8 +329,8 @@ class FileEngine extends CacheEngine {
* 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;
@ -369,7 +369,7 @@ class FileEngine extends CacheEngine {
/**
* Determine is cache directory is writable
*
* @return boolean
* @return bool
*/
protected function _active() {
$dir = new SplFileInfo($this->settings['path']);
@ -406,7 +406,7 @@ class FileEngine extends CacheEngine {
* Recursively deletes all files under any directory named as $group
*
* @param string $group The group to clear.
* @return boolean success
* @return bool success
*/
public function clearGroup($group) {
$this->_File = null;

View file

@ -59,7 +59,7 @@ class MemcacheEngine extends CacheEngine {
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
*
* @param array $settings 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($settings = array()) {
if (!class_exists('Memcache')) {
@ -131,8 +131,8 @@ class MemcacheEngine extends CacheEngine {
*
* @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 successfully cached, false on failure
* @param int $duration How long to cache the data, in seconds
* @return bool 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) {
@ -156,7 +156,7 @@ class MemcacheEngine extends CacheEngine {
* 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 New incremented value, false otherwise
* @throws CacheException when you try to increment with compress = true
*/
@ -173,7 +173,7 @@ class MemcacheEngine extends CacheEngine {
* 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 New decremented value, false otherwise
* @throws CacheException when you try to decrement with compress = true
*/
@ -190,7 +190,7 @@ class MemcacheEngine extends CacheEngine {
* 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) {
return $this->_Memcache->delete($key);
@ -199,9 +199,9 @@ class MemcacheEngine extends CacheEngine {
/**
* Delete all keys from the cache
*
* @param boolean $check If true no deletes will occur and instead CakePHP will rely
* @param bool $check If true no deletes will occur and instead CakePHP will rely
* on key TTL values.
* @return boolean True if the cache was successfully cleared, false otherwise
* @return bool True if the cache was successfully cleared, false otherwise
*/
public function clear($check) {
if ($check) {
@ -232,8 +232,8 @@ class MemcacheEngine extends CacheEngine {
* Connects to a server in connection pool
*
* @param string $host host ip address or name
* @param integer $port Server port
* @return boolean True if memcache server was connected
* @param int $port Server port
* @return bool True if memcache server was connected
*/
public function connect($host, $port = 11211) {
if ($this->_Memcache->getServerStatus($host, $port) === 0) {
@ -284,7 +284,7 @@ class MemcacheEngine extends CacheEngine {
* old values will remain in storage until they expire.
*
* @param string $group The group to clear.
* @return boolean success
* @return bool success
*/
public function clearGroup($group) {
return (bool)$this->_Memcache->increment($this->settings['prefix'] . $group);

View file

@ -70,7 +70,7 @@ class MemcachedEngine extends CacheEngine {
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
*
* @param array $settings 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
* @throws CacheException when you try use authentication without Memcached compiled with SASL support
*/
public function init($settings = array()) {
@ -199,8 +199,8 @@ class MemcachedEngine extends CacheEngine {
*
* @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 successfully cached, false on failure
* @param int $duration How long to cache the data, in seconds
* @return bool 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) {
@ -225,7 +225,7 @@ class MemcachedEngine extends CacheEngine {
* 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 New incremented value, false otherwise
* @throws CacheException when you try to increment with compress = true
*/
@ -237,7 +237,7 @@ class MemcachedEngine extends CacheEngine {
* 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 New decremented value, false otherwise
* @throws CacheException when you try to decrement with compress = true
*/
@ -249,7 +249,7 @@ class MemcachedEngine extends CacheEngine {
* 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) {
return $this->_Memcached->delete($key);
@ -258,9 +258,9 @@ class MemcachedEngine extends CacheEngine {
/**
* Delete all keys from the cache
*
* @param boolean $check If true no deletes will occur and instead CakePHP will rely
* @param bool $check If true no deletes will occur and instead CakePHP will rely
* on key TTL values.
* @return boolean True if the cache was successfully cleared, false otherwise
* @return bool True if the cache was successfully cleared, false otherwise
*/
public function clear($check) {
if ($check) {
@ -317,7 +317,7 @@ class MemcachedEngine extends CacheEngine {
* old values will remain in storage until they expire.
*
* @param string $group The group to clear.
* @return boolean success
* @return bool success
*/
public function clearGroup($group) {
return (bool)$this->_Memcached->increment($this->settings['prefix'] . $group);

View file

@ -51,7 +51,7 @@ class RedisEngine extends CacheEngine {
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
*
* @param array $settings 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($settings = array()) {
if (!class_exists('Redis')) {
@ -76,7 +76,7 @@ class RedisEngine extends CacheEngine {
/**
* Connects to a Redis server
*
* @return boolean True if Redis server was connected
* @return bool True if Redis server was connected
*/
protected function _connect() {
$return = false;
@ -107,8 +107,8 @@ class RedisEngine extends CacheEngine {
*
* @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 successfully cached, false on failure
* @param int $duration How long to cache the data, in seconds
* @return bool True if the data was successfully cached, false on failure
*/
public function write($key, $value, $duration) {
if (!is_int($value)) {
@ -142,7 +142,7 @@ class RedisEngine extends CacheEngine {
* 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 New incremented value, false otherwise
* @throws CacheException when you try to increment with compress = true
*/
@ -154,7 +154,7 @@ class RedisEngine extends CacheEngine {
* 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 New decremented value, false otherwise
* @throws CacheException when you try to decrement with compress = true
*/
@ -166,7 +166,7 @@ class RedisEngine extends CacheEngine {
* 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) {
return $this->_Redis->delete($key) > 0;
@ -175,9 +175,9 @@ class RedisEngine extends CacheEngine {
/**
* Delete all keys from the cache
*
* @param boolean $check Whether or not expiration keys should be checked. If
* @param bool $check Whether or not expiration keys should be checked. If
* true, no keys will be removed as cache will rely on redis TTL's.
* @return boolean True if the cache was successfully cleared, false otherwise
* @return bool True if the cache was successfully cleared, false otherwise
*/
public function clear($check) {
if ($check) {
@ -214,7 +214,7 @@ class RedisEngine extends CacheEngine {
* old values will remain in storage until they expire.
*
* @param string $group The group name to clear.
* @return boolean success
* @return bool success
*/
public function clearGroup($group) {
return (bool)$this->_Redis->incr($this->settings['prefix'] . $group);

View file

@ -40,7 +40,7 @@ class WincacheEngine extends CacheEngine {
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
*
* @param array $settings 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
* @see CacheEngine::__defaults
*/
public function init($settings = array()) {
@ -57,8 +57,8 @@ class WincacheEngine extends CacheEngine {
*
* @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 successfully cached, false on failure
* @param int $duration How long to cache the data, in seconds
* @return bool True if the data was successfully cached, false on failure
*/
public function write($key, $value, $duration) {
$expires = time() + $duration;
@ -91,7 +91,7 @@ class WincacheEngine extends CacheEngine {
* 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 New incremented value, false otherwise
*/
public function increment($key, $offset = 1) {
@ -102,7 +102,7 @@ class WincacheEngine extends CacheEngine {
* 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 New decremented value, false otherwise
*/
public function decrement($key, $offset = 1) {
@ -113,7 +113,7 @@ class WincacheEngine extends CacheEngine {
* 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) {
return wincache_ucache_delete($key);
@ -123,9 +123,9 @@ class WincacheEngine extends CacheEngine {
* Delete all keys from the cache. This will clear every
* item in the cache matching the cache config prefix.
*
* @param boolean $check If true, nothing will be cleared, as entries will
* @param bool $check If true, nothing will be cleared, as entries will
* naturally expire in wincache..
* @return boolean True Returns true.
* @return bool True Returns true.
*/
public function clear($check) {
if ($check) {
@ -180,7 +180,7 @@ class WincacheEngine extends CacheEngine {
* old values will remain in storage until they expire.
*
* @param string $group The group to clear.
* @return boolean success
* @return bool success
*/
public function clearGroup($group) {
$success = null;

View file

@ -41,7 +41,7 @@ class XcacheEngine extends CacheEngine {
* To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
*
* @param array $settings 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($settings = array()) {
if (php_sapi_name() !== 'cli') {
@ -62,8 +62,8 @@ class XcacheEngine extends CacheEngine {
*
* @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 successfully cached, false on failure
* @param int $duration How long to cache the data, in seconds
* @return bool True if the data was successfully cached, false on failure
*/
public function write($key, $value, $duration) {
$expires = time() + $duration;
@ -94,7 +94,7 @@ class XcacheEngine extends CacheEngine {
* 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 increment
* @param int $offset How much to increment
* @return New incremented value, false otherwise
*/
public function increment($key, $offset = 1) {
@ -106,7 +106,7 @@ class XcacheEngine extends CacheEngine {
* 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 subtract
* @param int $offset How much to subtract
* @return New decremented value, false otherwise
*/
public function decrement($key, $offset = 1) {
@ -117,7 +117,7 @@ class XcacheEngine extends CacheEngine {
* 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) {
return xcache_unset($key);
@ -126,9 +126,9 @@ class XcacheEngine extends CacheEngine {
/**
* Delete all keys from the cache
*
* @param boolean $check If true no deletes will occur and instead CakePHP will rely
* @param bool $check If true no deletes will occur and instead CakePHP will rely
* on key TTL values.
* @return boolean True if the cache was successfully cleared, false otherwise
* @return bool True if the cache was successfully cleared, false otherwise
*/
public function clear($check) {
$this->_auth();
@ -165,7 +165,7 @@ class XcacheEngine extends CacheEngine {
* old values will remain in storage until they expire.
*
* @param string $group The group to clear.
* @return boolean success
* @return bool success
*/
public function clearGroup($group) {
return (bool)xcache_inc($this->settings['prefix'] . $group, 1);
@ -178,7 +178,7 @@ class XcacheEngine extends CacheEngine {
* This has to be done because xcache_clear_cache() needs to pass Basic Http Auth
* (see xcache.admin configuration settings)
*
* @param boolean $reverse Revert changes
* @param bool $reverse Revert changes
* @return void
*/
protected function _auth($reverse = false) {

View file

@ -36,7 +36,7 @@ interface ConfigReaderInterface {
*
* @param string $key The identifier to write to.
* @param array $data The data to dump.
* @return boolean True on success or false on failure.
* @return bool True on success or false on failure.
*/
public function dump($key, $data);

View file

@ -153,7 +153,7 @@ class IniReader implements ConfigReaderInterface {
* @param string $key The identifier to write to. If the key has a . it will be treated
* as a plugin prefix.
* @param array $data The data to convert to ini file.
* @return integer Bytes saved.
* @return int Bytes saved.
*/
public function dump($key, $data) {
$result = array();

View file

@ -83,7 +83,7 @@ class PhpReader implements ConfigReaderInterface {
* @param string $key The identifier to write to. If the key has a . it will be treated
* as a plugin prefix.
* @param array $data Data to dump.
* @return integer Bytes saved.
* @return int Bytes saved.
*/
public function dump($key, $data) {
$contents = '<?php' . "\n" . '$config = ' . var_export($data, true) . ';';

View file

@ -220,7 +220,7 @@ class AclShell extends AppShell {
*
* @param string $class Class name that is being used.
* @param array $node Array of node information.
* @param integer $indent indent level.
* @param int $indent indent level.
* @return void
*/
protected function _outputNode($class, $node, $indent) {
@ -519,7 +519,7 @@ class AclShell extends AppShell {
/**
* Checks that given node exists
*
* @return boolean Success
* @return bool Success
*/
public function nodeExists() {
if (!isset($this->args[0]) || !isset($this->args[1])) {
@ -559,7 +559,7 @@ class AclShell extends AppShell {
*
* @param string $class Class type you want (Aro/Aco)
* @param string|array $identifier A mixed identifier for finding the node.
* @return integer Integer of NodeId. Will trigger an error if nothing is found.
* @return int Integer of NodeId. Will trigger an error if nothing is found.
*/
protected function _getNodeId($class, $identifier) {
$node = $this->Acl->{$class}->node($identifier);

View file

@ -484,7 +484,7 @@ class ConsoleShell extends AppShell {
* Tells if the specified model is included in the list of available models
*
* @param string $modelToCheck The model to check.
* @return boolean true if is an available model, false otherwise
* @return bool true if is an available model, false otherwise
*/
protected function _isValidModel($modelToCheck) {
return in_array($modelToCheck, $this->models);
@ -494,7 +494,7 @@ class ConsoleShell extends AppShell {
* Reloads the routes configuration from app/Config/routes.php, and compiles
* all routes found
*
* @return boolean True if config reload was a success, otherwise false
* @return bool True if config reload was a success, otherwise false
*/
protected function _loadRoutes() {
Router::reload();

View file

@ -39,7 +39,7 @@ class SchemaShell extends AppShell {
/**
* is this a dry run?
*
* @var boolean
* @var bool
*/
protected $_dry = null;

View file

@ -34,7 +34,7 @@ class ServerShell extends AppShell {
/**
* Default ListenPort
*
* @var integer
* @var int
*/
const DEFAULT_PORT = 80;

View file

@ -41,7 +41,7 @@ class BakeTask extends AppShell {
/**
* Flag for interactive mode
*
* @var boolean
* @var bool
*/
public $interactive = false;

View file

@ -285,7 +285,7 @@ class ControllerTask extends BakeTask {
*
* @param string $controllerName Controller name
* @param string $admin Admin route to use
* @param boolean $wannaUseSession Set to true to use sessions, false otherwise
* @param bool $wannaUseSession Set to true to use sessions, false otherwise
* @return string Baked actions
*/
public function bakeActions($controllerName, $admin = null, $wannaUseSession = true) {

View file

@ -200,7 +200,7 @@ class DbConfigTask extends AppShell {
* Output verification message and bake if it looks good
*
* @param array $config The config data.
* @return boolean True if user says it looks good, false otherwise
* @return bool True if user says it looks good, false otherwise
*/
protected function _verify($config) {
$config += $this->_defaultConfig;
@ -247,7 +247,7 @@ class DbConfigTask extends AppShell {
* Assembles and writes database.php
*
* @param array $configs Configuration settings to use
* @return boolean Success
* @return bool Success
*/
public function bake($configs) {
if (!is_dir($this->path)) {

View file

@ -44,7 +44,7 @@ class ExtractTask extends AppShell {
/**
* Merge all domain and category strings into the default.pot file
*
* @var boolean
* @var bool
*/
protected $_merge = false;
@ -93,21 +93,21 @@ class ExtractTask extends AppShell {
/**
* Holds whether this call should extract model validation messages
*
* @var boolean
* @var bool
*/
protected $_extractValidation = true;
/**
* Holds the validation string domain to use for validation messages when extracting
*
* @var boolean
* @var bool
*/
protected $_validationDomain = 'default';
/**
* Holds whether this call should extract the CakePHP Lib messages
*
* @var boolean
* @var bool
*/
protected $_extractCore = false;
@ -678,8 +678,8 @@ class ExtractTask extends AppShell {
/**
* Get the strings from the position forward
*
* @param integer &$position Actual position on tokens array
* @param integer $target Number of strings to extract
* @param int &$position Actual position on tokens array
* @param int $target Number of strings to extract
* @return array Strings extracted
*/
protected function _getStrings(&$position, $target) {
@ -728,9 +728,9 @@ class ExtractTask extends AppShell {
* Indicate an invalid marker on a processed file
*
* @param string $file File where invalid marker resides
* @param integer $line Line number
* @param int $line Line number
* @param string $marker Marker found
* @param integer $count Count
* @param int $count Count
* @return void
*/
protected function _markerError($file, $line, $marker, $count) {
@ -793,7 +793,7 @@ class ExtractTask extends AppShell {
* Returns whether this execution is meant to extract string only from directories in folder represented by the
* APP constant, i.e. this task is extracting strings from same application.
*
* @return boolean
* @return bool
*/
protected function _isExtractingApp() {
return $this->_paths === array(APP);
@ -803,7 +803,7 @@ class ExtractTask extends AppShell {
* Checks whether or not a given path is usable for writing.
*
* @param string $path Path to folder
* @return boolean true if it exists and is writable, false otherwise
* @return bool true if it exists and is writable, false otherwise
*/
protected function _isPathUsable($path) {
return is_dir($path) && is_writable($path);

View file

@ -316,7 +316,7 @@ class FixtureTask extends BakeTask {
* Generate String representation of Records
*
* @param array $tableInfo Table schema array
* @param integer $recordCount The number of records to generate.
* @param int $recordCount The number of records to generate.
* @return array Array of records to use in the fixture.
*/
protected function _generateRecords($tableInfo, $recordCount = 1) {

View file

@ -161,8 +161,8 @@ class ModelTask extends BakeTask {
*
* @param array $options Array of options to use for the selections. indexes must start at 0
* @param string $prompt Prompt to use for options list.
* @param integer $default The default option for the given prompt.
* @return integer Result of user choice.
* @param int $default The default option for the given prompt.
* @return int Result of user choice.
*/
public function inOptions($options, $prompt = null, $default = null) {
$valid = false;
@ -186,7 +186,7 @@ class ModelTask extends BakeTask {
/**
* Handles interactive baking
*
* @return boolean
* @return bool
*/
protected function _interactive() {
$this->hr();
@ -342,7 +342,7 @@ class ModelTask extends BakeTask {
* Handles Generation and user interaction for creating validation.
*
* @param Model $model Model to have validations generated for.
* @return array $validate Array of user selected validations.
* @return array validate Array of user selected validations.
*/
public function doValidation($model) {
if (!$model instanceof Model) {
@ -812,7 +812,7 @@ class ModelTask extends BakeTask {
* Assembles and writes a Model file.
*
* @param string|object $name Model name or object
* @param array|boolean $data if array and $name is not an object assume bake data, otherwise boolean.
* @param array|bool $data if array and $name is not an object assume bake data, otherwise boolean.
* @return string
*/
public function bake($name, $data = array()) {

View file

@ -90,7 +90,7 @@ class PluginTask extends AppShell {
* Bake the plugin, create directories and files
*
* @param string $plugin Name of the plugin in CamelCased format
* @return boolean
* @return bool
*/
public function bake($plugin) {
$pathOptions = App::path('plugins');

View file

@ -142,7 +142,7 @@ class ProjectTask extends AppShell {
/**
* Checks PHP's include_path for CakePHP.
*
* @return boolean Indicates whether or not CakePHP exists on include_path
* @return bool Indicates whether or not CakePHP exists on include_path
*/
public function cakeOnIncludePath() {
$paths = explode(PATH_SEPARATOR, ini_get('include_path'));
@ -231,7 +231,7 @@ class ProjectTask extends AppShell {
* and points app/console/cake.php to the right place
*
* @param string $path Project path.
* @return boolean success
* @return bool success
*/
public function consolePath($path) {
$File = new File($path . 'Console' . DS . 'cake.php');
@ -252,7 +252,7 @@ class ProjectTask extends AppShell {
* Generates and writes 'Security.salt'
*
* @param string $path Project path
* @return boolean Success
* @return bool Success
*/
public function securitySalt($path) {
$File = new File($path . 'Config' . DS . 'core.php');
@ -272,7 +272,7 @@ class ProjectTask extends AppShell {
* Generates and writes 'Security.cipherSeed'
*
* @param string $path Project path
* @return boolean Success
* @return bool Success
*/
public function securityCipherSeed($path) {
$File = new File($path . 'Config' . DS . 'core.php');
@ -293,7 +293,7 @@ class ProjectTask extends AppShell {
* Writes cache prefix using app's name
*
* @param string $dir Path to project
* @return boolean Success
* @return bool Success
*/
public function cachePrefix($dir) {
$app = basename($dir);
@ -310,8 +310,8 @@ class ProjectTask extends AppShell {
* Generates and writes CAKE_CORE_INCLUDE_PATH
*
* @param string $path Project path
* @param boolean $hardCode Whether or not define calls should be hardcoded.
* @return boolean Success
* @param bool $hardCode Whether or not define calls should be hardcoded.
* @return bool Success
*/
public function corePath($path, $hardCode = true) {
if (dirname($path) !== CAKE_CORE_INCLUDE_PATH) {
@ -331,8 +331,8 @@ class ProjectTask extends AppShell {
* Replaces the __CAKE_PATH__ placeholder in the template files.
*
* @param string $filename The filename to operate on.
* @param boolean $hardCode Whether or not the define should be uncommented.
* @return boolean Success
* @param bool $hardCode Whether or not the define should be uncommented.
* @return bool Success
*/
protected function _replaceCorePath($filename, $hardCode) {
$contents = file_get_contents($filename);
@ -354,7 +354,7 @@ class ProjectTask extends AppShell {
* Enables Configure::read('Routing.prefixes') in /app/Config/core.php
*
* @param string $name Name to use as admin routing
* @return boolean Success
* @return bool Success
*/
public function cakeAdmin($name) {
$path = (empty($this->configPath)) ? APP . 'Config' . DS : $this->configPath;

View file

@ -103,7 +103,7 @@ class TestTask extends BakeTask {
* Handles interactive baking
*
* @param string $type The type of object to bake a test for.
* @return string|boolean
* @return string|bool
*/
protected function _interactive($type = null) {
$this->interactive = true;
@ -129,7 +129,7 @@ class TestTask extends BakeTask {
*
* @param string $type Type of object to bake test case for ie. Model, Controller
* @param string $className the 'cake name' for the class ie. Posts for the PostsController
* @return string|boolean
* @return string|bool
*/
public function bake($type, $className) {
$plugin = null;
@ -242,7 +242,7 @@ class TestTask extends BakeTask {
* Currently only model, and controller are supported
*
* @param string $type The Type of object you are generating tests for eg. controller
* @return boolean
* @return bool
*/
public function typeCanDetectFixtures($type) {
$type = strtolower($type);
@ -254,7 +254,7 @@ class TestTask extends BakeTask {
*
* @param string $package The package of object you are generating tests for eg. controller
* @param string $class the Classname of the class the test is being generated for.
* @return boolean
* @return bool
*/
public function isLoadableClass($package, $class) {
App::uses($class, $package);
@ -466,7 +466,7 @@ class TestTask extends BakeTask {
* Controllers require a mock class.
*
* @param string $type The type of object tests are being generated for eg. controller.
* @return boolean
* @return bool
*/
public function hasMockClass($type) {
$type = strtolower($type);

View file

@ -342,7 +342,7 @@ class ViewTask extends BakeTask {
*
* @param string $action Action to bake
* @param string $content Content to write
* @return boolean Success
* @return bool Success
*/
public function bake($action, $content = '') {
if ($content === true) {
@ -455,7 +455,7 @@ class ViewTask extends BakeTask {
* Returns associations for controllers models.
*
* @param Model $model The Model instance.
* @return array $associations
* @return array associations
*/
protected function _associations(Model $model) {
$keys = array('belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany');

View file

@ -336,7 +336,7 @@ class TestShell extends Shell {
*
* @param string $file The file to map.
* @param string $category The test file category.
* @param boolean $throwOnMissingFile Whether or not to throw an exception.
* @param bool $throwOnMissingFile Whether or not to throw an exception.
* @return array array(type, case)
* @throws Exception
*/

View file

@ -67,10 +67,10 @@ class ConsoleErrorHandler {
* Handle errors in the console environment. Writes errors to stderr,
* and logs messages if Configure::read('debug') is 0.
*
* @param integer $code Error code
* @param int $code Error code
* @param string $description Description of the error.
* @param string $file The file the error occurred in.
* @param integer $line The line the error occurred on.
* @param int $line The line the error occurred on.
* @param array $context The backtrace of the error.
* @return void
*/
@ -95,7 +95,7 @@ class ConsoleErrorHandler {
/**
* Wrapper for exit(), used for testing.
*
* @param integer $code The exit code.
* @param int $code The exit code.
* @return void
*/
protected function _stop($code = 0) {

View file

@ -37,7 +37,7 @@ class ConsoleInput {
* 2. Handle we are attached to must be stdin.
* Allows rich editing with arrow keys and history when inputting a string.
*
* @var boolean
* @var bool
*/
protected $_canReadline;
@ -70,8 +70,8 @@ class ConsoleInput {
/**
* Checks if data is available on the stream
*
* @param integer $timeout An optional time to wait for data
* @return boolean True for data available, false otherwise
* @param int $timeout An optional time to wait for data
* @return bool True for data available, false otherwise
*/
public function dataAvailable($timeout = 0) {
$readFds = array($this->_input);

View file

@ -41,7 +41,7 @@ class ConsoleInputArgument {
/**
* Is this option required?
*
* @var boolean
* @var bool
*/
protected $_required;
@ -57,7 +57,7 @@ class ConsoleInputArgument {
*
* @param string|array $name The long name of the option, or an array with all the properties.
* @param string $help The help text for this option
* @param boolean $required Whether this argument is required. Missing required args will trigger exceptions
* @param bool $required Whether this argument is required. Missing required args will trigger exceptions
* @param array $choices Valid choices for this option.
*/
public function __construct($name, $help = '', $required = false, $choices = array()) {
@ -85,7 +85,7 @@ class ConsoleInputArgument {
/**
* Generate the help for this argument.
*
* @param integer $width The width to make the name of the option.
* @param int $width The width to make the name of the option.
* @return string
*/
public function help($width = 0) {
@ -123,7 +123,7 @@ class ConsoleInputArgument {
/**
* Check if this argument is a required argument
*
* @return boolean
* @return bool
*/
public function isRequired() {
return (bool)$this->_required;
@ -133,7 +133,7 @@ class ConsoleInputArgument {
* Check that $value is a valid choice for this argument.
*
* @param string $value The choice to validate.
* @return boolean
* @return bool
* @throws ConsoleException
*/
public function validChoice($value) {

View file

@ -48,7 +48,7 @@ class ConsoleInputOption {
/**
* Is the option a boolean option. Boolean options do not consume a parameter.
*
* @var boolean
* @var bool
*/
protected $_boolean;
@ -72,7 +72,7 @@ class ConsoleInputOption {
* @param string|array $name The long name of the option, or an array with all the properties.
* @param string $short The short alias for this option
* @param string $help The help text for this option
* @param boolean $boolean Whether this option is a boolean option. Boolean options don't consume extra tokens
* @param bool $boolean Whether this option is a boolean option. Boolean options don't consume extra tokens
* @param string $default The default value for this option.
* @param array $choices Valid choices for this option.
* @throws ConsoleException
@ -118,7 +118,7 @@ class ConsoleInputOption {
/**
* Generate the help for this this option.
*
* @param integer $width The width to make the name of the option.
* @param int $width The width to make the name of the option.
* @return string
*/
public function help($width = 0) {
@ -168,7 +168,7 @@ class ConsoleInputOption {
/**
* Check if this option is a boolean option
*
* @return boolean
* @return bool
*/
public function isBoolean() {
return (bool)$this->_boolean;
@ -178,7 +178,7 @@ class ConsoleInputOption {
* Check that a value is a valid choice for this option.
*
* @param string $value The choice to validate.
* @return boolean
* @return bool
* @throws ConsoleException
*/
public function validChoice($value) {

View file

@ -81,7 +81,7 @@ class ConsoleInputSubcommand {
/**
* Generate the help for this this subcommand.
*
* @param integer $width The width to make the name of the subcommand.
* @param int $width The width to make the name of the subcommand.
* @return string
*/
public function help($width = 0) {

View file

@ -136,7 +136,7 @@ class ConsoleOptionParser {
* Construct an OptionParser so you can define its behavior
*
* @param string $command The command name this parser is for. The command name is used for generating help.
* @param boolean $defaultOptions Whether you want the verbose and quiet options set. Setting
* @param bool $defaultOptions Whether you want the verbose and quiet options set. Setting
* this to false will prevent the addition of `--verbose` & `--quiet` options.
*/
public function __construct($command = null, $defaultOptions = true) {
@ -165,7 +165,7 @@ class ConsoleOptionParser {
* Static factory method for creating new OptionParsers so you can chain methods off of them.
*
* @param string $command The command name this parser is for. The command name is used for generating help.
* @param boolean $defaultOptions Whether you want the verbose and quiet options set.
* @param bool $defaultOptions Whether you want the verbose and quiet options set.
* @return ConsoleOptionParser
*/
public static function create($command, $defaultOptions = true) {
@ -506,7 +506,7 @@ class ConsoleOptionParser {
* @param string $subcommand If present and a valid subcommand that has a linked parser.
* That subcommands help will be shown instead.
* @param string $format Define the output format, can be text or xml
* @param integer $width The width to format user content to. Defaults to 72
* @param int $width The width to format user content to. Defaults to 72
* @return string Generated help.
*/
public function help($subcommand = null, $format = 'text', $width = 72) {
@ -604,7 +604,7 @@ class ConsoleOptionParser {
* Check to see if $name has an option (short/long) defined for it.
*
* @param string $name The name of the option.
* @return boolean
* @return bool
*/
protected function _optionExists($name) {
if (substr($name, 0, 2) === '--') {

View file

@ -47,21 +47,21 @@ class ConsoleOutput {
/**
* Raw output constant - no modification of output text.
*
* @var integer
* @var int
*/
const RAW = 0;
/**
* Plain output - tags will be stripped.
*
* @var integer
* @var int
*/
const PLAIN = 1;
/**
* Color output - Convert known tags in to ANSI color escape codes.
*
* @var integer
* @var int
*/
const COLOR = 2;
@ -82,7 +82,7 @@ class ConsoleOutput {
/**
* The current output type. Manipulated with ConsoleOutput::outputAs();
*
* @var integer
* @var int
*/
protected $_outputAs = self::COLOR;
@ -171,8 +171,8 @@ class ConsoleOutput {
* are passed, outputs just a newline.
*
* @param string|array $message A string or a an array of strings to output
* @param integer $newlines Number of newlines to append
* @return integer Returns the number of bytes returned from writing to stdout.
* @param int $newlines Number of newlines to append
* @return int Returns the number of bytes returned from writing to stdout.
*/
public function write($message, $newlines = 1) {
if (is_array($message)) {
@ -232,7 +232,7 @@ class ConsoleOutput {
* Writes a message to the output stream.
*
* @param string $message Message to write.
* @return boolean success
* @return bool success
*/
protected function _write($message) {
return fwrite($this->_output, $message);
@ -281,7 +281,7 @@ class ConsoleOutput {
/**
* Get/Set the output type to use. The output type how formatting tags are treated.
*
* @param integer $type The output type to use. Should be one of the class constants.
* @param int $type The output type to use. Should be one of the class constants.
* @return mixed Either null or the value if getting.
*/
public function outputAs($type = null) {

View file

@ -33,14 +33,14 @@ class HelpFormatter {
/**
* The maximum number of arguments shown when generating usage.
*
* @var integer
* @var int
*/
protected $_maxArgs = 6;
/**
* The maximum number of options shown when generating usage.
*
* @var integer
* @var int
*/
protected $_maxOptions = 6;
@ -56,7 +56,7 @@ class HelpFormatter {
/**
* Get the help as formatted text suitable for output on the command line.
*
* @param integer $width The width of the help output.
* @param int $width The width of the help output.
* @return string
*/
public function text($width = 72) {
@ -160,7 +160,7 @@ class HelpFormatter {
* Iterate over a collection and find the longest named thing.
*
* @param array $collection The collection to find a max length of.
* @return integer
* @return int
*/
protected function _getMaxLength($collection) {
$max = 0;
@ -173,7 +173,7 @@ class HelpFormatter {
/**
* Get the help as an xml string.
*
* @param boolean $string Return the SimpleXml object or a string. Defaults to true.
* @param bool $string Return the SimpleXml object or a string. Defaults to true.
* @return string|SimpleXmlElement See $string
*/
public function xml($string = true) {

View file

@ -34,21 +34,21 @@ class Shell extends Object {
/**
* Output constant making verbose shells.
*
* @var integer
* @var int
*/
const VERBOSE = 2;
/**
* Output constant for making normal shells.
*
* @var integer
* @var int
*/
const NORMAL = 1;
/**
* Output constants for making quiet shells.
*
* @var integer
* @var int
*/
const QUIET = 0;
@ -62,7 +62,7 @@ class Shell extends Object {
/**
* If true, the script will ask for permission to perform actions.
*
* @var boolean
* @var bool
*/
public $interactive = true;
@ -239,7 +239,7 @@ class Shell extends Object {
/**
* If $uses is an array load each of the models in the array
*
* @return boolean
* @return bool
*/
protected function _loadModels() {
if (is_array($this->uses)) {
@ -303,7 +303,7 @@ class Shell extends Object {
/**
* Loads tasks defined in public $tasks
*
* @return boolean
* @return bool
*/
public function loadTasks() {
if ($this->tasks === true || empty($this->tasks) || empty($this->Tasks)) {
@ -318,7 +318,7 @@ class Shell extends Object {
* Check to see if this shell has a task with the provided name.
*
* @param string $task The task name to check.
* @return boolean Success
* @return bool Success
* @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::hasTask
*/
public function hasTask($task) {
@ -329,7 +329,7 @@ class Shell extends Object {
* Check to see if this shell has a callable method by the given name.
*
* @param string $name The method name to check.
* @return boolean
* @return bool
* @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::hasMethod
*/
public function hasMethod($name) {
@ -574,7 +574,7 @@ class Shell extends Object {
* - `indent` Indent the text with the string provided. Defaults to null.
*
* @param string $text Text the text to format.
* @param string|integer|array $options Array of options to use, or an integer to wrap the text to.
* @param string|int|array $options Array of options to use, or an integer to wrap the text to.
* @return string Wrapped / indented text
* @see String::wrap()
* @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::wrapText
@ -595,9 +595,9 @@ class Shell extends Object {
* While using Shell::VERBOSE means it will only display when verbose output is toggled.
*
* @param string|array $message A string or a an array of strings to output
* @param integer $newlines Number of newlines to append
* @param integer $level The message's output level, see above.
* @return integer|boolean Returns the number of bytes returned from writing to stdout.
* @param int $newlines Number of newlines to append
* @param int $level The message's output level, see above.
* @return int|bool Returns the number of bytes returned from writing to stdout.
* @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::out
*/
public function out($message = null, $newlines = 1, $level = Shell::NORMAL) {
@ -619,7 +619,7 @@ class Shell extends Object {
* are passed outputs just a newline.
*
* @param string|array $message A string or a an array of strings to output
* @param integer $newlines Number of newlines to append
* @param int $newlines Number of newlines to append
* @return void
* @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::err
*/
@ -630,7 +630,7 @@ class Shell extends Object {
/**
* Returns a single or multiple linefeeds sequences.
*
* @param integer $multiplier Number of times the linefeed sequence should be repeated
* @param int $multiplier Number of times the linefeed sequence should be repeated
* @return string
* @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::nl
*/
@ -641,8 +641,8 @@ class Shell extends Object {
/**
* Outputs a series of minus characters to the standard output, acts as a visual separator.
*
* @param integer $newlines Number of newlines to pre- and append
* @param integer $width Width of the line, defaults to 63
* @param int $newlines Number of newlines to pre- and append
* @param int $width Width of the line, defaults to 63
* @return void
* @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::hr
*/
@ -691,7 +691,7 @@ class Shell extends Object {
*
* @param string $path Where to put the file.
* @param string $contents Content to put in the file.
* @return boolean Success
* @return bool Success
* @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::createFile
*/
public function createFile($path, $contents) {
@ -729,7 +729,7 @@ class Shell extends Object {
/**
* Action to create a Unit Test
*
* @return boolean Success
* @return bool Success
*/
protected function _checkUnitTest() {
if (class_exists('PHPUnit_Framework_TestCase')) {
@ -820,7 +820,7 @@ class Shell extends Object {
* creates the singular name for use in views.
*
* @param string $name The plural underscored value.
* @return string $name
* @return string name
*/
protected function _singularName($name) {
return Inflector::variable(Inflector::singularize($name));
@ -860,7 +860,7 @@ class Shell extends Object {
* Find the correct path for a plugin. Scans $pluginPaths for the plugin you want.
*
* @param string $pluginName Name of the plugin you want ie. DebugKit
* @return string $path path to the correct plugin.
* @return string path path to the correct plugin.
*/
protected function _pluginPath($pluginName) {
if (CakePlugin::loaded($pluginName)) {
@ -874,7 +874,7 @@ class Shell extends Object {
* If you don't wish to see in your stdout or stderr everything that is logged
* through CakeLog, call this function with first param as false
*
* @param boolean $enable whether to enable CakeLog output or not
* @param bool $enable whether to enable CakeLog output or not
* @return void
*/
protected function _useLogger($enable = true) {

View file

@ -43,7 +43,7 @@ class ShellDispatcher {
* a status code of either 0 or 1 according to the result of the dispatch.
*
* @param array $args the argv from PHP
* @param boolean $bootstrap Should the environment be bootstrapped.
* @param bool $bootstrap Should the environment be bootstrapped.
*/
public function __construct($args = array(), $bootstrap = true) {
set_time_limit(0);
@ -116,7 +116,7 @@ class ShellDispatcher {
/**
* Initializes the environment and loads the CakePHP core.
*
* @return boolean Success.
* @return bool Success.
*/
protected function _bootstrap() {
if (!defined('ROOT')) {
@ -182,7 +182,7 @@ class ShellDispatcher {
/**
* Dispatches a CLI request
*
* @return boolean
* @return bool
* @throws MissingShellMethodException
*/
public function dispatch() {
@ -360,7 +360,7 @@ class ShellDispatcher {
/**
* Stop execution of the current script
*
* @param integer|string $status see http://php.net/exit for values
* @param int|string $status see http://php.net/exit for values
* @return void
*/
protected function _stop($status = 0) {

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*

View file

@ -21,7 +21,7 @@ class DbAclSchema extends CakeSchema {
* Before event.
*
* @param array $event The event data.
* @return boolean success
* @return bool success
*/
public function before($event = array()) {
return true;

View file

@ -10,7 +10,6 @@
*/
/**
*
* Using the Schema command line utility
*
* Use it to configure database for i18n
@ -30,7 +29,7 @@ class I18nSchema extends CakeSchema {
* Before event.
*
* @param array $event The event data.
* @return boolean success
* @return bool success
*/
public function before($event = array()) {
return true;

View file

@ -10,7 +10,6 @@
*/
/**
*
* Using the Schema command line utility
* cake schema run create Sessions
*

View file

@ -261,7 +261,6 @@
//date_default_timezone_set('UTC');
/**
*
* Cache Engine Configuration
* Default settings provided below
*

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* @link http://cakephp.org CakePHP(tm) Project
* @package app.View.Errors
* @since CakePHP(tm) v 0.10.0.1076

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* @link http://cakephp.org CakePHP(tm) Project
* @package app.View.Errors
* @since CakePHP(tm) v 0.10.0.1076

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* @link http://cakephp.org CakePHP(tm) Project
* @package app.View.Layouts.Email.html
* @since CakePHP(tm) v 0.10.0.1076

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* @link http://cakephp.org CakePHP(tm) Project
* @package app.View.Layouts
* @since CakePHP(tm) v 0.10.0.1076

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* @link http://cakephp.org CakePHP(tm) Project
* @package app.View.Layouts
* @since CakePHP(tm) v 0.10.0.1076

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* @link http://cakephp.org CakePHP(tm) Project
* @package app.View.Layouts
* @since CakePHP(tm) v 0.10.0.1076

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* @link http://cakephp.org CakePHP(tm) Project
* @package app.View.Layouts
* @since CakePHP(tm) v 0.10.0.1076

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* @link http://cakephp.org CakePHP(tm) Project
* @package app.View.Pages
* @since CakePHP(tm) v 0.10.0.1076

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* @link http://cakephp.org CakePHP(tm) Project
* @package app
* @since CakePHP(tm) v 0.10.0.1076

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
@ -155,8 +153,8 @@ class Component extends Object {
*
* @param Controller $controller Controller with components to beforeRedirect
* @param string|array $url Either the string or URL array that is being redirected to.
* @param integer $status The status code of the redirect
* @param boolean $exit Will the script exit.
* @param int $status The status code of the redirect
* @param bool $exit Will the script exit.
* @return array|void Either an array or null.
* @link http://book.cakephp.org/2.0/en/controllers/components.html#Component::beforeRedirect
*/

View file

@ -28,7 +28,7 @@ interface AclInterface {
* @param string $aro ARO The requesting object identifier.
* @param string $aco ACO The controlled object identifier.
* @param string $action Action (defaults to *)
* @return boolean Success
* @return bool Success
*/
public function check($aro, $aco, $action = "*");
@ -38,7 +38,7 @@ interface AclInterface {
* @param string $aro ARO The requesting object identifier.
* @param string $aco ACO The controlled object identifier.
* @param string $action Action (defaults to *)
* @return boolean Success
* @return bool Success
*/
public function allow($aro, $aco, $action = "*");
@ -48,7 +48,7 @@ interface AclInterface {
* @param string $aro ARO The requesting object identifier.
* @param string $aco ACO The controlled object identifier.
* @param string $action Action (defaults to *)
* @return boolean Success
* @return bool Success
*/
public function deny($aro, $aco, $action = "*");
@ -58,7 +58,7 @@ interface AclInterface {
* @param string $aro ARO The requesting object identifier.
* @param string $aco ACO The controlled object identifier.
* @param string $action Action (defaults to *)
* @return boolean Success
* @return bool Success
*/
public function inherit($aro, $aco, $action = "*");

View file

@ -67,7 +67,7 @@ class DbAcl extends Object implements AclInterface {
* @param string $aro ARO The requesting object identifier.
* @param string $aco ACO The controlled object identifier.
* @param string $action Action (defaults to *)
* @return boolean Success (true if ARO has access to action in ACO, false otherwise)
* @return bool Success (true if ARO has access to action in ACO, false otherwise)
* @link http://book.cakephp.org/2.0/en/core-libraries/components/access-control-lists.html#checking-permissions-the-acl-component
*/
public function check($aro, $aco, $action = "*") {
@ -80,8 +80,8 @@ class DbAcl extends Object implements AclInterface {
* @param string $aro ARO The requesting object identifier.
* @param string $aco ACO The controlled object identifier.
* @param string $actions Action (defaults to *)
* @param integer $value Value to indicate access type (1 to give access, -1 to deny, 0 to inherit)
* @return boolean Success
* @param int $value Value to indicate access type (1 to give access, -1 to deny, 0 to inherit)
* @return bool Success
* @link http://book.cakephp.org/2.0/en/core-libraries/components/access-control-lists.html#assigning-permissions
*/
public function allow($aro, $aco, $actions = "*", $value = 1) {
@ -94,7 +94,7 @@ class DbAcl extends Object implements AclInterface {
* @param string $aro ARO The requesting object identifier.
* @param string $aco ACO The controlled object identifier.
* @param string $action Action (defaults to *)
* @return boolean Success
* @return bool Success
* @link http://book.cakephp.org/2.0/en/core-libraries/components/access-control-lists.html#assigning-permissions
*/
public function deny($aro, $aco, $action = "*") {
@ -107,7 +107,7 @@ class DbAcl extends Object implements AclInterface {
* @param string $aro ARO The requesting object identifier.
* @param string $aco ACO The controlled object identifier.
* @param string $action Action (defaults to *)
* @return boolean Success
* @return bool Success
*/
public function inherit($aro, $aco, $action = "*") {
return $this->allow($aro, $aco, $action, 0);
@ -119,7 +119,7 @@ class DbAcl extends Object implements AclInterface {
* @param string $aro ARO The requesting object identifier.
* @param string $aco ACO The controlled object identifier.
* @param string $action Action (defaults to *)
* @return boolean Success
* @return bool Success
* @see allow()
*/
public function grant($aro, $aco, $action = "*") {
@ -132,7 +132,7 @@ class DbAcl extends Object implements AclInterface {
* @param string $aro ARO The requesting object identifier.
* @param string $aco ACO The controlled object identifier.
* @param string $action Action (defaults to *)
* @return boolean Success
* @return bool Success
* @see deny()
*/
public function revoke($aro, $aco, $action = "*") {

View file

@ -55,7 +55,7 @@ class IniAcl extends Object implements AclInterface {
* @param string $aro ARO The requesting object identifier.
* @param string $aco ACO The controlled object identifier.
* @param string $action Action (defaults to *)
* @return boolean Success
* @return bool Success
*/
public function allow($aro, $aco, $action = "*") {
}
@ -66,7 +66,7 @@ class IniAcl extends Object implements AclInterface {
* @param string $aro ARO The requesting object identifier.
* @param string $aco ACO The controlled object identifier.
* @param string $action Action (defaults to *)
* @return boolean Success
* @return bool Success
*/
public function deny($aro, $aco, $action = "*") {
}
@ -77,7 +77,7 @@ class IniAcl extends Object implements AclInterface {
* @param string $aro ARO The requesting object identifier.
* @param string $aco ACO The controlled object identifier.
* @param string $action Action (defaults to *)
* @return boolean Success
* @return bool Success
*/
public function inherit($aro, $aco, $action = "*") {
}
@ -90,7 +90,7 @@ class IniAcl extends Object implements AclInterface {
* @param string $aro ARO
* @param string $aco ACO
* @param string $action Action
* @return boolean Success
* @return bool Success
*/
public function check($aro, $aco, $action = null) {
if (!$this->config) {

View file

@ -27,14 +27,14 @@ class PhpAcl extends Object implements AclInterface {
/**
* Constant for deny
*
* @var boolean
* @var bool
*/
const DENY = false;
/**
* Constant for allow
*
* @var boolean
* @var bool
*/
const ALLOW = true;
@ -124,7 +124,7 @@ class PhpAcl extends Object implements AclInterface {
* @param string $aro ARO The requesting object identifier.
* @param string $aco ACO The controlled object identifier.
* @param string $action Action (defaults to *)
* @return boolean Success
* @return bool Success
*/
public function allow($aro, $aco, $action = "*") {
return $this->Aco->access($this->Aro->resolve($aro), $aco, $action, 'allow');
@ -136,7 +136,7 @@ class PhpAcl extends Object implements AclInterface {
* @param string $aro ARO The requesting object identifier.
* @param string $aco ACO The controlled object identifier.
* @param string $action Action (defaults to *)
* @return boolean Success
* @return bool Success
*/
public function deny($aro, $aco, $action = "*") {
return $this->Aco->access($this->Aro->resolve($aro), $aco, $action, 'deny');
@ -148,7 +148,7 @@ class PhpAcl extends Object implements AclInterface {
* @param string $aro ARO The requesting object identifier.
* @param string $aco ACO The controlled object identifier.
* @param string $action Action (defaults to *)
* @return boolean Success
* @return bool Success
*/
public function inherit($aro, $aco, $action = "*") {
return false;
@ -161,7 +161,7 @@ class PhpAcl extends Object implements AclInterface {
* @param string $aro ARO
* @param string $aco ACO
* @param string $action Action
* @return boolean true if access is granted, false otherwise
* @return bool true if access is granted, false otherwise
*/
public function check($aro, $aco, $action = "*") {
$allow = $this->options['policy'];

View file

@ -104,7 +104,7 @@ class AclComponent extends Component {
* @param array|string|Model $aro ARO The requesting object identifier. See `AclNode::node()` for possible formats
* @param array|string|Model $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
* @param string $action Action (defaults to *)
* @return boolean Success
* @return bool Success
*/
public function check($aro, $aco, $action = "*") {
return $this->_Instance->check($aro, $aco, $action);
@ -117,7 +117,7 @@ class AclComponent extends Component {
* @param array|string|Model $aro ARO The requesting object identifier. See `AclNode::node()` for possible formats
* @param array|string|Model $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
* @param string $action Action (defaults to *)
* @return boolean Success
* @return bool Success
*/
public function allow($aro, $aco, $action = "*") {
return $this->_Instance->allow($aro, $aco, $action);
@ -130,7 +130,7 @@ class AclComponent extends Component {
* @param array|string|Model $aro ARO The requesting object identifier. See `AclNode::node()` for possible formats
* @param array|string|Model $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
* @param string $action Action (defaults to *)
* @return boolean Success
* @return bool Success
*/
public function deny($aro, $aco, $action = "*") {
return $this->_Instance->deny($aro, $aco, $action);
@ -143,7 +143,7 @@ class AclComponent extends Component {
* @param array|string|Model $aro ARO The requesting object identifier. See `AclNode::node()` for possible formats
* @param array|string|Model $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
* @param string $action Action (defaults to *)
* @return boolean Success
* @return bool Success
*/
public function inherit($aro, $aco, $action = "*") {
return $this->_Instance->inherit($aro, $aco, $action);
@ -155,7 +155,7 @@ class AclComponent extends Component {
* @param array|string|Model $aro ARO The requesting object identifier. See `AclNode::node()` for possible formats
* @param array|string|Model $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
* @param string $action Action (defaults to *)
* @return boolean Success
* @return bool Success
* @deprecated Will be removed in 3.0.
*/
public function grant($aro, $aco, $action = "*") {
@ -169,7 +169,7 @@ class AclComponent extends Component {
* @param array|string|Model $aro ARO The requesting object identifier. See `AclNode::node()` for possible formats
* @param array|string|Model $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
* @param string $action Action (defaults to *)
* @return boolean Success
* @return bool Success
* @deprecated Will be removed in 3.0.
*/
public function revoke($aro, $aco, $action = "*") {

View file

@ -65,7 +65,7 @@ abstract class AbstractPasswordHasher {
*
* @param string|array $password Plain text password to hash or data array.
* @param string $hashedPassword Existing hashed password.
* @return boolean True if hashes match else false.
* @return bool True if hashes match else false.
*/
abstract public function check($password, $hashedPassword);

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
@ -32,7 +30,7 @@ class ActionsAuthorize extends BaseAuthorize {
*
* @param array $user The user to authorize
* @param CakeRequest $request The request needing authorization.
* @return boolean
* @return bool
*/
public function authorize($user, CakeRequest $request) {
$Acl = $this->_Collection->load('Acl');

View file

@ -86,7 +86,7 @@ abstract class BaseAuthenticate {
*
* @param string|array $username The username/identifier, or an array of find conditions.
* @param string $password The password, only used if $username param is string.
* @return boolean|array Either false on failure, or an array of user data.
* @return bool|array Either false on failure, or an array of user data.
*/
protected function _findUser($username, $password = null) {
$userModel = $this->settings['userModel'];

View file

@ -78,7 +78,7 @@ abstract class BaseAuthorize {
*
* @param array $user Active user data
* @param CakeRequest $request Request instance.
* @return boolean
* @return bool
*/
abstract public function authorize($user, CakeRequest $request);

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*

View file

@ -39,7 +39,7 @@ class BlowfishPasswordHasher extends AbstractPasswordHasher {
*
* @param string $password Plain text password to hash.
* @param string $hashedPassword Existing hashed password.
* @return boolean True if hashes match else false.
* @return bool True if hashes match else false.
*/
public function check($password, $hashedPassword) {
return $hashedPassword === Security::hash($password, 'blowfish', $hashedPassword);

View file

@ -57,7 +57,7 @@ class ControllerAuthorize extends BaseAuthorize {
*
* @param array $user Active user data
* @param CakeRequest $request Request instance.
* @return boolean
* @return bool
*/
public function authorize($user, CakeRequest $request) {
return (bool)$this->_Controller->isAuthorized($user);

View file

@ -1,7 +1,5 @@
<?php
/**
*
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
*
@ -78,7 +76,7 @@ class CrudAuthorize extends BaseAuthorize {
*
* @param array $user The user to authorize
* @param CakeRequest $request The request needing authorization.
* @return boolean
* @return bool
*/
public function authorize($user, CakeRequest $request) {
if (!isset($this->settings['actionMap'][$request->params['action']])) {

View file

@ -41,7 +41,7 @@ class FormAuthenticate extends BaseAuthenticate {
* @param CakeRequest $request The request that contains login information.
* @param string $model The model used for login verification.
* @param array $fields The fields to be checked.
* @return boolean False if the fields have not been supplied. True if they exist.
* @return bool False if the fields have not been supplied. True if they exist.
*/
protected function _checkFields(CakeRequest $request, $model, $fields) {
if (empty($request->data[$model])) {

View file

@ -46,7 +46,7 @@ class SimplePasswordHasher extends AbstractPasswordHasher {
*
* @param string $password Plain text password to hash.
* @param string $hashedPassword Existing hashed password.
* @return boolean True if hashes match else false.
* @return bool True if hashes match else false.
*/
public function check($password, $hashedPassword) {
return $hashedPassword === $this->hash($password);

View file

@ -211,7 +211,7 @@ class AuthComponent extends Component {
* Error to display when user attempts to access an object or action to which they do not have
* access.
*
* @var string|boolean Error message or boolean false to suppress flash message
* @var string|bool
* @link http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#AuthComponent::$authError
*/
public $authError = null;
@ -277,7 +277,7 @@ class AuthComponent extends Component {
* of login form data.
*
* @param Controller $controller A reference to the instantiating controller object
* @return boolean
* @return bool
*/
public function startup(Controller $controller) {
$methods = array_flip(array_map('strtolower', $controller->methods));
@ -318,7 +318,7 @@ class AuthComponent extends Component {
* Checks whether current action is accessible without authentication.
*
* @param Controller $controller A reference to the instantiating controller object
* @return boolean True if action is accessible without authentication else false
* @return bool True if action is accessible without authentication else false
*/
protected function _isAllowed(Controller $controller) {
$action = strtolower($controller->request->params['action']);
@ -338,7 +338,7 @@ class AuthComponent extends Component {
* is returned.
*
* @param Controller $controller A reference to the controller object.
* @return boolean True if current action is login action else false.
* @return bool True if current action is login action else false.
*/
protected function _unauthenticated(Controller $controller) {
if (empty($this->_authenticateObjects)) {
@ -379,7 +379,7 @@ class AuthComponent extends Component {
* Normalizes $loginAction and checks if current request URL is same as login action.
*
* @param Controller $controller A reference to the controller object.
* @return boolean True if current action is login action else false.
* @return bool True if current action is login action else false.
*/
protected function _isLoginAction(Controller $controller) {
$url = '';
@ -396,7 +396,7 @@ class AuthComponent extends Component {
* Handle unauthorized access attempt
*
* @param Controller $controller A reference to the controller object
* @return boolean Returns false
* @return bool Returns false
* @throws ForbiddenException
* @see AuthComponent::$unauthorizedRedirect
*/
@ -422,7 +422,7 @@ class AuthComponent extends Component {
/**
* Attempts to introspect the correct values for object properties.
*
* @return boolean True
* @return bool True
*/
protected function _setDefaults() {
$defaults = array(
@ -446,7 +446,7 @@ class AuthComponent extends Component {
*
* @param array $user The user to check the authorization of. If empty the user in the session will be used.
* @param CakeRequest $request The request to authenticate for. If empty, the current request will be used.
* @return boolean True if $user is authorized, otherwise false
* @return bool True if $user is authorized, otherwise false
*/
public function isAuthorized($user = null, CakeRequest $request = null) {
if (empty($user) && !$this->user()) {
@ -590,7 +590,7 @@ class AuthComponent extends Component {
* will also change the session id in order to help mitigate session replays.
*
* @param array $user Either an array of user data, or null to identify a user using the current request.
* @return boolean True on login success, false on failure
* @return bool True on login success, false on failure
* @link http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#identifying-users-and-logging-them-in
*/
public function login($user = null) {
@ -663,7 +663,7 @@ class AuthComponent extends Component {
* Similar to AuthComponent::user() except if the session user cannot be found, connected authentication
* objects will have their getUser() methods called. This lets stateless authentication methods function correctly.
*
* @return boolean true if a user can be found, false if one cannot.
* @return bool true if a user can be found, false if one cannot.
*/
protected function _getUser() {
$user = $this->user();
@ -812,7 +812,7 @@ class AuthComponent extends Component {
/**
* Check whether or not the current user has data in the session, and is considered logged in.
*
* @return boolean true if the user is logged in, false otherwise
* @return bool true if the user is logged in, false otherwise
* @deprecated Since 2.5. Use AuthComponent::user() directly.
*/
public function loggedIn() {

View file

@ -92,7 +92,7 @@ class CookieComponent extends Component {
* Indicates that the cookie should only be transmitted over a secure HTTPS connection.
* When set to true, the cookie will only be set if a secure connection exists.
*
* @var boolean
* @var bool
*/
public $secure = false;
@ -112,7 +112,7 @@ class CookieComponent extends Component {
* Set to true to make HTTP only cookies. Cookies that are HTTP only
* are not accessible in JavaScript.
*
* @var boolean
* @var bool
*/
public $httpOnly = false;
@ -208,8 +208,8 @@ class CookieComponent extends Component {
*
* @param string|array $key Key for the value
* @param mixed $value Value
* @param boolean $encrypt Set to true to encrypt value, false otherwise
* @param integer|string $expires Can be either the number of seconds until a cookie
* @param bool $encrypt Set to true to encrypt value, false otherwise
* @param int|string $expires Can be either the number of seconds until a cookie
* expires, or a strtotime compatible time offset.
* @return void
* @link http://book.cakephp.org/2.0/en/core-libraries/components/cookie.html#CookieComponent::write
@ -294,7 +294,7 @@ class CookieComponent extends Component {
* Returns true if given variable is set in cookie.
*
* @param string $key Variable name to check for
* @return boolean True if variable is there
* @return bool True if variable is there
*/
public function check($key = null) {
if (empty($key)) {
@ -400,8 +400,8 @@ class CookieComponent extends Component {
* CookieComponent::write(string, string, boolean, 8400);
* CookieComponent::write(string, string, boolean, '5 Days');
*
* @param integer|string $expires Can be either Unix timestamp, or date string
* @return integer Unix timestamp
* @param int|string $expires Can be either Unix timestamp, or date string
* @return int Unix timestamp
*/
protected function _expire($expires = null) {
if ($expires === null) {

View file

@ -282,7 +282,7 @@ class EmailComponent extends Component {
* If you are rendering a template this variable will be sent to the templates as `$content`
* @param string $template Template to use when sending email
* @param string $layout Layout to use to enclose email body
* @return boolean Success
* @return bool Success
*/
public function send($content = null, $template = null, $layout = null) {
$lib = new CakeEmail();
@ -444,7 +444,7 @@ class EmailComponent extends Component {
* Helps prevent header injection / manipulation on user content.
*
* @param string $value Value to strip
* @param boolean $message Set to true to indicate main message content
* @param bool $message Set to true to indicate main message content
* @return string Stripped value
*/
protected function _strip($value, $message = false) {

View file

@ -47,7 +47,7 @@ class RequestHandlerComponent extends Component {
/**
* Determines whether or not callbacks will be fired on this component
*
* @var boolean
* @var bool
*/
public $enabled = true;
@ -245,8 +245,8 @@ class RequestHandlerComponent extends Component {
*
* @param Controller $controller A reference to the controller
* @param string|array $url A string or array containing the redirect location
* @param integer|array $status HTTP Status for redirect
* @param boolean $exit Whether to exit script, defaults to `true`.
* @param int|array $status HTTP Status for redirect
* @param bool $exit Whether to exit script, defaults to `true`.
* @return void
*/
public function beforeRedirect(Controller $controller, $url, $status = null, $exit = true) {
@ -280,7 +280,7 @@ class RequestHandlerComponent extends Component {
* "304 Not Modified" header.
*
* @param Controller $controller Controller instance.
* @return boolean false if the render process should be aborted
* @return bool false if the render process should be aborted
*/
public function beforeRender(Controller $controller) {
if ($this->settings['checkHttpCache'] && $this->response->checkNotModified($this->request)) {
@ -291,7 +291,7 @@ class RequestHandlerComponent extends Component {
/**
* Returns true if the current HTTP request is Ajax, false otherwise
*
* @return boolean True if call is Ajax
* @return bool True if call is Ajax
* @deprecated use `$this->request->is('ajax')` instead.
*/
public function isAjax() {
@ -301,7 +301,7 @@ class RequestHandlerComponent extends Component {
/**
* Returns true if the current HTTP request is coming from a Flash-based client
*
* @return boolean True if call is from Flash
* @return bool True if call is from Flash
* @deprecated use `$this->request->is('flash')` instead.
*/
public function isFlash() {
@ -311,7 +311,7 @@ class RequestHandlerComponent extends Component {
/**
* Returns true if the current request is over HTTPS, false otherwise.
*
* @return boolean True if call is over HTTPS
* @return bool True if call is over HTTPS
* @deprecated use `$this->request->is('ssl')` instead.
*/
public function isSSL() {
@ -321,7 +321,7 @@ class RequestHandlerComponent extends Component {
/**
* Returns true if the current call accepts an XML response, false otherwise
*
* @return boolean True if client accepts an XML response
* @return bool True if client accepts an XML response
*/
public function isXml() {
return $this->prefers('xml');
@ -330,7 +330,7 @@ class RequestHandlerComponent extends Component {
/**
* Returns true if the current call accepts an RSS response, false otherwise
*
* @return boolean True if client accepts an RSS response
* @return bool True if client accepts an RSS response
*/
public function isRss() {
return $this->prefers('rss');
@ -339,7 +339,7 @@ class RequestHandlerComponent extends Component {
/**
* Returns true if the current call accepts an Atom response, false otherwise
*
* @return boolean True if client accepts an RSS response
* @return bool True if client accepts an RSS response
*/
public function isAtom() {
return $this->prefers('atom');
@ -349,7 +349,7 @@ class RequestHandlerComponent extends Component {
* Returns true if user agent string matches a mobile web browser, or if the
* client accepts WAP content.
*
* @return boolean True if user agent is a mobile web browser
* @return bool True if user agent is a mobile web browser
*/
public function isMobile() {
return $this->request->is('mobile') || $this->accepts('wap');
@ -358,7 +358,7 @@ class RequestHandlerComponent extends Component {
/**
* Returns true if the client accepts WAP content
*
* @return boolean
* @return bool
*/
public function isWap() {
return $this->prefers('wap');
@ -367,7 +367,7 @@ class RequestHandlerComponent extends Component {
/**
* Returns true if the current call a POST request
*
* @return boolean True if call is a POST
* @return bool True if call is a POST
* @deprecated Use $this->request->is('post'); from your controller.
*/
public function isPost() {
@ -377,7 +377,7 @@ class RequestHandlerComponent extends Component {
/**
* Returns true if the current call a PUT request
*
* @return boolean True if call is a PUT
* @return bool True if call is a PUT
* @deprecated Use $this->request->is('put'); from your controller.
*/
public function isPut() {
@ -387,7 +387,7 @@ class RequestHandlerComponent extends Component {
/**
* Returns true if the current call a GET request
*
* @return boolean True if call is a GET
* @return bool True if call is a GET
* @deprecated Use $this->request->is('get'); from your controller.
*/
public function isGet() {
@ -397,7 +397,7 @@ class RequestHandlerComponent extends Component {
/**
* Returns true if the current call a DELETE request
*
* @return boolean True if call is a DELETE
* @return bool True if call is a DELETE
* @deprecated Use $this->request->is('delete'); from your controller.
*/
public function isDelete() {
@ -408,7 +408,7 @@ class RequestHandlerComponent extends Component {
* Gets Prototype version if call is Ajax, otherwise empty string.
* The Prototype library sets a special "Prototype version" HTTP header.
*
* @return string|boolean When Ajax the prototype version of component making the call otherwise false
* @return string|bool When Ajax the prototype version of component making the call otherwise false
*/
public function getAjaxVersion() {
$httpX = env('HTTP_X_PROTOTYPE_VERSION');
@ -444,7 +444,7 @@ class RequestHandlerComponent extends Component {
/**
* Gets remote client IP
*
* @param boolean $safe Use safe = false when you think the user might manipulate
* @param bool $safe Use safe = false when you think the user might manipulate
* their HTTP_CLIENT_IP header. Setting $safe = false will also look at HTTP_X_FORWARDED_FOR
* @return string Client IP address
* @deprecated use $this->request->clientIp() from your, controller instead.
@ -659,7 +659,7 @@ class RequestHandlerComponent extends Component {
* like 'application/x-shockwave'.
* @param array $options If $type is a friendly type name that is associated with
* more than one type of content, $index is used to select which content-type to use.
* @return boolean Returns false if the friendly type name given in $type does
* @return bool Returns false if the friendly type name given in $type does
* not exist in the type map, or if the Content-type header has
* already been set by this method.
* @see RequestHandlerComponent::setContent()

View file

@ -145,14 +145,14 @@ class SecurityComponent extends Component {
* Whether to validate POST data. Set to false to disable for data coming from 3rd party
* services, etc.
*
* @var boolean
* @var bool
*/
public $validatePost = true;
/**
* Whether to use CSRF protected forms. Set to false to disable CSRF protection on forms.
*
* @var boolean
* @var bool
* @see http://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)
* @see SecurityComponent::$csrfExpires
*/
@ -173,7 +173,7 @@ class SecurityComponent extends Component {
* the chances of users getting invalid requests because of token consumption.
* It has the side effect of making CSRF less secure, as tokens are reusable.
*
* @var boolean
* @var bool
*/
public $csrfUseOnce = true;
@ -186,7 +186,7 @@ class SecurityComponent extends Component {
* When tokens are evicted, the oldest ones will be removed, as they are the most likely
* to be dead/expired.
*
* @var integer
* @var int
*/
public $csrfLimit = 100;
@ -355,7 +355,7 @@ class SecurityComponent extends Component {
* Check if HTTP methods are required
*
* @param Controller $controller Instantiating controller
* @return boolean true if $method is required
* @return bool true if $method is required
*/
protected function _methodsRequired(Controller $controller) {
foreach (array('Post', 'Get', 'Put', 'Delete') as $method) {
@ -378,7 +378,7 @@ class SecurityComponent extends Component {
* Check if access requires secure connection
*
* @param Controller $controller Instantiating controller
* @return boolean true if secure connection required
* @return bool true if secure connection required
*/
protected function _secureRequired(Controller $controller) {
if (is_array($this->requireSecure) && !empty($this->requireSecure)) {
@ -399,7 +399,7 @@ class SecurityComponent extends Component {
* Check if authentication is required
*
* @param Controller $controller Instantiating controller
* @return boolean true if authentication required
* @return bool true if authentication required
*/
protected function _authRequired(Controller $controller) {
if (is_array($this->requireAuth) && !empty($this->requireAuth) && !empty($this->request->data)) {
@ -439,7 +439,7 @@ class SecurityComponent extends Component {
* Validate submitted form
*
* @param Controller $controller Instantiating controller
* @return boolean true if submitted form is valid
* @return bool true if submitted form is valid
*/
protected function _validatePost(Controller $controller) {
if (empty($controller->request->data)) {
@ -524,7 +524,7 @@ class SecurityComponent extends Component {
* Manually add CSRF token information into the provided request object.
*
* @param CakeRequest $request The request object to add into.
* @return boolean
* @return bool
*/
public function generateToken(CakeRequest $request) {
if (isset($request->params['requested']) && $request->params['requested'] === 1) {
@ -570,7 +570,7 @@ class SecurityComponent extends Component {
* it will be removed from the list of valid tokens.
*
* @param Controller $controller A controller to check
* @return boolean Valid csrf token.
* @return bool Valid csrf token.
*/
protected function _validateCsrf(Controller $controller) {
$token = $this->Session->read('_Token');

View file

@ -48,7 +48,7 @@ class SessionComponent extends Component {
* @param string $name The name of the key your are setting in the session.
* This should be in a Controller.key format for better organizing
* @param string $value The value you want to store in a session.
* @return boolean Success
* @return bool Success
* @link http://book.cakephp.org/2.0/en/core-libraries/components/sessions.html#SessionComponent::write
*/
public function write($name, $value = null) {
@ -75,7 +75,7 @@ class SessionComponent extends Component {
* In your controller: $this->Session->delete('Controller.sessKey');
*
* @param string $name the name of the session key you want to delete
* @return boolean true is session variable is set and can be deleted, false is variable was not set.
* @return bool true is session variable is set and can be deleted, false is variable was not set.
* @link http://book.cakephp.org/2.0/en/core-libraries/components/sessions.html#SessionComponent::delete
*/
public function delete($name) {
@ -88,7 +88,7 @@ class SessionComponent extends Component {
* In your controller: $this->Session->check('Controller.sessKey');
*
* @param string $name the name of the session key you want to check
* @return boolean true is session variable is set, false if not
* @return bool true is session variable is set, false if not
* @link http://book.cakephp.org/2.0/en/core-libraries/components/sessions.html#SessionComponent::check
*/
public function check($name) {
@ -142,7 +142,7 @@ class SessionComponent extends Component {
*
* In your controller: $this->Session->valid();
*
* @return boolean true is session is valid, false is session is invalid
* @return bool true is session is valid, false is session is invalid
*/
public function valid() {
return CakeSession::valid();
@ -180,7 +180,7 @@ class SessionComponent extends Component {
/**
* Returns a bool, whether or not the session has been started.
*
* @return boolean
* @return bool
*/
public function started() {
return CakeSession::started();

View file

@ -79,7 +79,7 @@ class Controller extends Object implements CakeEventListener {
*
* The default value is `true`.
*
* @var mixed A single name as a string or a list of names as an array.
* @var mixed
* @link http://book.cakephp.org/2.0/en/controllers.html#components-helpers-and-uses
*/
public $uses = true;
@ -90,7 +90,7 @@ class Controller extends Object implements CakeEventListener {
*
* Example: `public $helpers = array('Html', 'Js', 'Time', 'Ajax');`
*
* @var mixed A single name as a string or a list of names as an array.
* @var mixed
* @link http://book.cakephp.org/2.0/en/controllers.html#components-helpers-and-uses
*/
public $helpers = array();
@ -162,14 +162,14 @@ class Controller extends Object implements CakeEventListener {
* Set to true to automatically render the view
* after action logic.
*
* @var boolean
* @var bool
*/
public $autoRender = true;
/**
* Set to true to automatically render the layout around views.
*
* @var boolean
* @var bool
*/
public $autoLayout = true;
@ -287,7 +287,7 @@ class Controller extends Object implements CakeEventListener {
/**
* Holds any validation errors produced by the last call of the validateErrors() method.
*
* @var array Validation errors, or false if none
* @var array
*/
public $validationErrors = null;
@ -347,7 +347,7 @@ class Controller extends Object implements CakeEventListener {
* Lazy loads models using the loadModel() method if declared in $uses
*
* @param string $name Property name to check.
* @return boolean
* @return bool
*/
public function __isset($name) {
switch ($name) {
@ -506,7 +506,7 @@ class Controller extends Object implements CakeEventListener {
*
* @param ReflectionMethod $method The method to be invoked.
* @param CakeRequest $request The request to check.
* @return boolean
* @return bool
*/
protected function _isPrivateAction(ReflectionMethod $method, CakeRequest $request) {
$privateAction = (
@ -691,7 +691,7 @@ class Controller extends Object implements CakeEventListener {
/**
* Queries & sets valid HTTP response codes & messages.
*
* @param integer|array $code If $code is an integer, then the corresponding code/message is
* @param int|array $code If $code is an integer, then the corresponding code/message is
* returned if it exists, null if it does not exist. If $code is an array,
* then the 'code' and 'message' keys of each nested array are added to the default
* HTTP codes. Example:
@ -717,8 +717,8 @@ class Controller extends Object implements CakeEventListener {
* dynamic models for the time being.
*
* @param string $modelClass Name of model class to load
* @param integer|string $id Initial ID the instanced model class should have
* @return boolean True if the model was found
* @param int|string $id Initial ID the instanced model class should have
* @return bool True if the model was found
* @throws MissingModelException if the model class cannot be found.
*/
public function loadModel($modelClass = null, $id = null) {
@ -748,8 +748,8 @@ class Controller extends Object implements CakeEventListener {
*
* @param string|array $url A string or array-based URL pointing to another location within the app,
* or an absolute URL
* @param integer $status Optional HTTP status code (eg: 404)
* @param boolean $exit If true, exit() will be called after the redirect
* @param int $status Optional HTTP status code (eg: 404)
* @param bool $exit If true, exit() will be called after the redirect
* @return void
* @link http://book.cakephp.org/2.0/en/controllers.html#Controller::redirect
*/
@ -796,8 +796,8 @@ class Controller extends Object implements CakeEventListener {
*
* @param mixed $response Response from beforeRedirect callback
* @param string|array $url The same value of beforeRedirect
* @param integer $status The same value of beforeRedirect
* @param boolean $exit The same value of beforeRedirect
* @param int $status The same value of beforeRedirect
* @param bool $exit The same value of beforeRedirect
* @return array Array with keys url, status and exit
*/
protected function _parseBeforeRedirect($response, $url, $status, $exit) {
@ -873,7 +873,7 @@ class Controller extends Object implements CakeEventListener {
/**
* Returns number of errors in a submitted FORM.
*
* @return integer Number of errors
* @return int Number of errors
* @deprecated This method will be removed in 3.0
*/
public function validate() {
@ -959,7 +959,7 @@ class Controller extends Object implements CakeEventListener {
* Returns the referring URL for this request.
*
* @param string $default Default URL to use if HTTP_REFERER cannot be read from headers
* @param boolean $local If true, restrict referring URLs to local server
* @param bool $local If true, restrict referring URLs to local server
* @return string Referring URL
* @link http://book.cakephp.org/2.0/en/controllers.html#Controller::referer
*/
@ -993,7 +993,7 @@ class Controller extends Object implements CakeEventListener {
*
* @param string $message Message to display to the user
* @param string|array $url Relative string or array-based URL to redirect to after the time expires
* @param integer $pause Time to show the message
* @param int $pause Time to show the message
* @param string $layout Layout you want to use, defaults to 'flash'
* @return void
* @link http://book.cakephp.org/2.0/en/controllers.html#Controller::flash
@ -1015,7 +1015,7 @@ class Controller extends Object implements CakeEventListener {
* @param string|array $op A string containing an SQL comparison operator, or an array matching operators
* to fields
* @param string $bool SQL boolean operator: AND, OR, XOR, etc.
* @param boolean $exclusive If true, and $op is an array, fields not included in $op will not be
* @param bool $exclusive If true, and $op is an array, fields not included in $op will not be
* included in the returned conditions
* @return array An array of model conditions
* @deprecated Will be removed in 3.0.
@ -1111,8 +1111,8 @@ class Controller extends Object implements CakeEventListener {
*
* @param string|array $url A string or array-based URL pointing to another location within the app,
* or an absolute URL
* @param integer $status Optional HTTP status code (eg: 404)
* @param boolean $exit If true, exit() will be called after the redirect
* @param int $status Optional HTTP status code (eg: 404)
* @param bool $exit If true, exit() will be called after the redirect
* @return mixed
* false to stop redirection event,
* string controllers a new redirection URL or
@ -1135,7 +1135,7 @@ class Controller extends Object implements CakeEventListener {
* This method should be overridden in child classes.
*
* @param string $method name of method called example index, edit, etc.
* @return boolean Success
* @return bool Success
* @link http://book.cakephp.org/2.0/en/controllers.html#callbacks
*/
public function beforeScaffold($method) {
@ -1146,7 +1146,7 @@ class Controller extends Object implements CakeEventListener {
* Alias to beforeScaffold()
*
* @param string $method Method name.
* @return boolean
* @return bool
* @see Controller::beforeScaffold()
* @deprecated Will be removed in 3.0.
*/
@ -1158,7 +1158,7 @@ class Controller extends Object implements CakeEventListener {
* This method should be overridden in child classes.
*
* @param string $method name of method called either edit or update.
* @return boolean Success
* @return bool Success
* @link http://book.cakephp.org/2.0/en/controllers.html#callbacks
*/
public function afterScaffoldSave($method) {
@ -1169,7 +1169,7 @@ class Controller extends Object implements CakeEventListener {
* Alias to afterScaffoldSave()
*
* @param string $method Method name.
* @return boolean
* @return bool
* @see Controller::afterScaffoldSave()
* @deprecated Will be removed in 3.0.
*/
@ -1181,7 +1181,7 @@ class Controller extends Object implements CakeEventListener {
* This method should be overridden in child classes.
*
* @param string $method name of method called either edit or update.
* @return boolean Success
* @return bool Success
* @link http://book.cakephp.org/2.0/en/controllers.html#callbacks
*/
public function afterScaffoldSaveError($method) {
@ -1192,7 +1192,7 @@ class Controller extends Object implements CakeEventListener {
* Alias to afterScaffoldSaveError()
*
* @param string $method Method name.
* @return boolean
* @return bool
* @see Controller::afterScaffoldSaveError()
* @deprecated Will be removed in 3.0.
*/
@ -1206,7 +1206,7 @@ class Controller extends Object implements CakeEventListener {
* Method MUST return true in child classes
*
* @param string $method name of method called example index, edit, etc.
* @return boolean Success
* @return bool Success
* @link http://book.cakephp.org/2.0/en/controllers.html#callbacks
*/
public function scaffoldError($method) {
@ -1217,7 +1217,7 @@ class Controller extends Object implements CakeEventListener {
* Alias to scaffoldError()
*
* @param string $method Method name.
* @return boolean
* @return bool
* @see Controller::scaffoldError()
* @deprecated Will be removed in 3.0.
*/

View file

@ -76,7 +76,7 @@ class Scaffold {
/**
* Valid session.
*
* @var boolean
* @var bool
*/
protected $_validSession = null;

View file

@ -88,7 +88,7 @@ class App {
/**
* Reset paths instead of merging
*
* @var boolean
* @var bool
*/
const RESET = true;
@ -122,7 +122,7 @@ class App {
/**
* Whether or not to return the file that is loaded.
*
* @var boolean
* @var bool
*/
public static $return = false;
@ -184,14 +184,14 @@ class App {
/**
* Indicates whether the class cache should be stored again because of an addition to it
*
* @var boolean
* @var bool
*/
protected static $_cacheChange = false;
/**
* Indicates whether the object cache should be stored again because of an addition to it
*
* @var boolean
* @var bool
*/
protected static $_objectCacheChange = false;
@ -199,7 +199,7 @@ class App {
* Indicates the the Application is in the bootstrapping process. Used to better cache
* loaded classes while the cache libraries have not been yet initialized
*
* @var boolean
* @var bool
*/
public static $bootstrapping = false;
@ -270,7 +270,7 @@ class App {
* If reset is set to true, all loaded plugins will be forgotten and they will be needed to be loaded again.
*
* @param array $paths associative array with package names as keys and a list of directories for new search paths
* @param boolean|string $mode App::RESET will set paths, App::APPEND with append paths, App::PREPEND will prepend paths (default)
* @param bool|string $mode App::RESET will set paths, App::APPEND with append paths, App::PREPEND will prepend paths (default)
* App::REGISTER will register new packages and their paths, %s in path will be replaced by APP path
* @return void
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/app.html#App::build
@ -422,7 +422,7 @@ class App {
*
* @param string $type Type of object, i.e. 'Model', 'Controller', 'View/Helper', 'file', 'class' or 'plugin'
* @param string|array $path Optional Scan only the path given. If null, paths for the chosen type will be used.
* @param boolean $cache Set to false to rescan objects of the chosen type. Defaults to true.
* @param bool $cache Set to false to rescan objects of the chosen type. Defaults to true.
* @return mixed Either false on incorrect / miss. Or an array of found objects.
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/app.html#App::objects
*/
@ -529,7 +529,7 @@ class App {
* if a class is name `MyCustomClass` the file name should be `MyCustomClass.php`
*
* @param string $className the name of the class to load
* @return boolean
* @return bool
*/
public static function load($className) {
if (!isset(self::$_classMap[$className])) {
@ -592,15 +592,15 @@ class App {
* @param string|array $type The type of Class if passed as a string, or all params can be passed as
* an single array to $type.
* @param string $name Name of the Class or a unique name for the file
* @param boolean|array $parent boolean true if Class Parent should be searched, accepts key => value
* @param bool|array $parent boolean true if Class Parent should be searched, accepts key => value
* array('parent' => $parent, 'file' => $file, 'search' => $search, 'ext' => '$ext');
* $ext allows setting the extension of the file name
* based on Inflector::underscore($name) . ".$ext";
* @param array $search paths to search for files, array('path 1', 'path 2', 'path 3');
* @param string $file full name of the file to search for including extension
* @param boolean $return Return the loaded file, the file must have a return
* @param bool $return Return the loaded file, the file must have a return
* statement in it to work: return $variable;
* @return boolean true if Class is already in memory or if file is found and loaded, false if not
* @return bool true if Class is already in memory or if file is found and loaded, false if not
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/app.html#including-files-with-app-import
*/
public static function import($type = null, $name = null, $parent = true, $search = array(), $file = null, $return = false) {
@ -662,8 +662,8 @@ class App {
* @param string $plugin camel cased plugin name if any
* @param string $type name of the packed where the class is located
* @param string $originalType type name as supplied initially by the user
* @param boolean $parent whether to load the class parent or not
* @return boolean true indicating the successful load and existence of the class
* @param bool $parent whether to load the class parent or not
* @return bool true indicating the successful load and existence of the class
*/
protected static function _loadClass($name, $plugin, $type, $originalType, $parent) {
if ($type === 'Console/Command' && $name === 'Shell') {
@ -700,7 +700,7 @@ class App {
* @param string $plugin camel cased plugin name if any
* @param array $search list of paths to search the file into
* @param string $file filename if known, the $name param will be used otherwise
* @param boolean $return whether this function should return the contents of the file after being parsed by php or just a success notice
* @param bool $return whether this function should return the contents of the file after being parsed by php or just a success notice
* @return mixed if $return contents of the file after php parses it, boolean indicating success otherwise
*/
protected static function _loadFile($name, $plugin, $search, $file, $return) {
@ -738,7 +738,7 @@ class App {
* @param string $plugin camel cased plugin name if any
* @param string $file file name if known
* @param string $ext file extension if known
* @return boolean true if the file was loaded successfully, false otherwise
* @return bool true if the file was loaded successfully, false otherwise
*/
protected static function _loadVendor($name, $plugin, $file, $ext) {
if ($mapped = self::_mapped($name, $plugin)) {

View file

@ -183,7 +183,7 @@ class CakePlugin {
*
* @param string $plugin name of the plugin, if null will operate on all plugins having enabled the
* loading of routes files
* @return boolean
* @return bool
*/
public static function routes($plugin = null) {
if ($plugin === null) {
@ -237,7 +237,7 @@ class CakePlugin {
* Include file, ignoring include error if needed if file is missing
*
* @param string $file File to include
* @param boolean $ignoreMissing Whether to ignore include error for missing files
* @param bool $ignoreMissing Whether to ignore include error for missing files
* @return mixed
*/
protected static function _includeFile($file, $ignoreMissing = false) {

View file

@ -62,7 +62,7 @@ class Configure {
* - Include app/Config/bootstrap.php.
* - Setup error/exception handlers.
*
* @param boolean $boot Whether to do bootstrapping.
* @param bool $boot Whether to do bootstrapping.
* @return void
*/
public static function bootstrap($boot = true) {
@ -147,7 +147,7 @@ class Configure {
* @param string|array $config The key to write, can be a dot notation value.
* Alternatively can be an array containing key(s) and value(s).
* @param mixed $value Value to set for var
* @return boolean True if write was successful
* @return bool True if write was successful
* @link http://book.cakephp.org/2.0/en/development/configuration.html#Configure::write
*/
public static function write($config, $value = null) {
@ -194,7 +194,7 @@ class Configure {
* Returns true if given variable is set in Configure.
*
* @param string $var Variable name to check for
* @return boolean True if variable is there
* @return bool True if variable is there
*/
public static function check($var = null) {
if (empty($var)) {
@ -256,7 +256,7 @@ class Configure {
* and make any future attempts to use it cause an Exception.
*
* @param string $name Name of the reader to drop.
* @return boolean Success
* @return bool Success
*/
public static function drop($name) {
if (!isset(self::$_readers[$name])) {
@ -286,8 +286,8 @@ class Configure {
*
* @param string $key name of configuration resource to load.
* @param string $config Name of the configured reader to use to read the resource identified by $key.
* @param boolean $merge if config files should be merged instead of simply overridden
* @return boolean False if file not found, true if load successful.
* @param bool $merge if config files should be merged instead of simply overridden
* @return bool False if file not found, true if load successful.
* @throws ConfigureException Will throw any exceptions the reader raises.
* @link http://book.cakephp.org/2.0/en/development/configuration.html#Configure::load
*/
@ -332,7 +332,7 @@ class Configure {
* @param string $config The name of the configured adapter to dump data with.
* @param array $keys The name of the top-level keys you want to dump.
* This allows you save only some data stored in Configure.
* @return boolean success
* @return bool success
* @throws ConfigureException if the adapter does not implement a `dump` method.
*/
public static function dump($key, $config = 'default', $keys = array()) {
@ -391,7 +391,7 @@ class Configure {
* @param string $name The storage name for the saved configuration.
* @param string $cacheConfig The cache configuration to save into. Defaults to 'default'
* @param array $data Either an array of data to store, or leave empty to store all values.
* @return boolean Success
* @return bool Success
*/
public static function store($name, $cacheConfig = 'default', $data = null) {
if ($data === null) {
@ -406,7 +406,7 @@ class Configure {
*
* @param string $name Name of the stored config file to load.
* @param string $cacheConfig Name of the Cache configuration to read from.
* @return boolean Success.
* @return bool Success.
*/
public static function restore($name, $cacheConfig = 'default') {
$values = Cache::read($name, $cacheConfig);
@ -419,7 +419,7 @@ class Configure {
/**
* Clear all values stored in Configure.
*
* @return boolean success.
* @return bool success.
*/
public static function clear() {
self::$_values = array();

View file

@ -139,7 +139,7 @@ class Object {
* Stop execution of the current script. Wraps exit() making
* testing easier.
*
* @param integer|string $status see http://php.net/exit for values
* @param int|string $status see http://php.net/exit for values
* @return void
*/
protected function _stop($status = 0) {
@ -151,10 +151,10 @@ class Object {
* for more information on writing to logs.
*
* @param string $msg Log message
* @param integer $type Error type constant. Defined in app/Config/core.php.
* @param int $type Error type constant. Defined in app/Config/core.php.
* @param null|string|array $scope The scope(s) a log message is being created in.
* See CakeLog::config() for more information on logging scopes.
* @return boolean Success of log write
* @return bool Success of log write
*/
public function log($msg, $type = LOG_ERR, $scope = null) {
if (!is_string($msg)) {
@ -191,7 +191,7 @@ class Object {
*
* @param array $properties The name of the properties to merge.
* @param string $class The class to merge the property with.
* @param boolean $normalize Set to true to run the properties through Hash::normalize() before merging.
* @param bool $normalize Set to true to run the properties through Hash::normalize() before merging.
* @return void
*/
protected function _mergeVars($properties, $class, $normalize = true) {

View file

@ -24,7 +24,6 @@ App::uses('ExceptionRenderer', 'Error');
App::uses('Router', 'Routing');
/**
*
* Error Handler provides basic error and exception handling for your application. It captures and
* handles all unhandled exceptions and errors. Displays helpful framework errors when debug > 1.
*
@ -162,7 +161,7 @@ class ErrorHandler {
*
* @param Exception $exception The exception to render.
* @param array $config An array of configuration for logging.
* @return boolean
* @return bool
*/
protected static function _log(Exception $exception, $config) {
if (empty($config['log'])) {
@ -187,12 +186,12 @@ class ErrorHandler {
* You can use Configure::write('Error.level', $value); to set what type of errors will be handled here.
* Stack traces for errors can be enabled with Configure::write('Error.trace', true);
*
* @param integer $code Code of error
* @param int $code Code of error
* @param string $description Error description
* @param string $file File on which error occurred
* @param integer $line Line that triggered the error
* @param int $line Line that triggered the error
* @param array $context Context
* @return boolean true if error was handled
* @return bool true if error was handled
*/
public static function handleError($code, $description, $file = null, $line = null, $context = null) {
if (error_reporting() === 0) {
@ -230,11 +229,11 @@ class ErrorHandler {
/**
* Generate an error page when some fatal error happens.
*
* @param integer $code Code of error
* @param int $code Code of error
* @param string $description Error description
* @param string $file File on which error occurred
* @param integer $line Line that triggered the error
* @return boolean
* @param int $line Line that triggered the error
* @return bool
*/
public static function handleFatalError($code, $description, $file, $line) {
$logMessage = 'Fatal Error (' . $code . '): ' . $description . ' in [' . $file . ', line ' . $line . ']';
@ -260,7 +259,7 @@ class ErrorHandler {
/**
* Map an error code into an Error word, and log location.
*
* @param integer $code Error code to map
* @param int $code Error code to map
* @return array Array of error word, and log location.
*/
public static function mapErrorCode($code) {

Some files were not shown because too many files have changed in this diff Show more