diff --git a/cake/basics.php b/cake/basics.php index 9a67bf87b..ed654a960 100644 --- a/cake/basics.php +++ b/cake/basics.php @@ -136,7 +136,7 @@ * from a plugin, e.g: plugin.MyView * * @param string $viewClass Name of the view class to load (camelized) - * @return boolean Success + * @return bool Success */ function loadView($viewClass) { if (strpos($viewClass, '.') !== false) { @@ -175,7 +175,7 @@ * to load a model located inside a plugin folder. * * @param $name Name of model to load - * @return boolean Success + * @return bool Success */ function loadModel($name = null) { if (!class_exists('Model')) { @@ -327,7 +327,7 @@ * Loads a controller and its helper libraries. * * @param string $name Name of controller - * @return boolean Success + * @return bool Success */ function loadController($name) { if (!class_exists('AppController')) { @@ -425,7 +425,7 @@ * * @param string $plugin Name of plugin * @param string $controller Name of controller to load - * @return boolean Success + * @return bool Success * @deprecated */ function loadPluginController($plugin, $controller) { @@ -471,7 +471,7 @@ * Loads a helper * * @param string $name Name of helper - * @return boolean Success + * @return bool Success */ function loadHelper($name) { if (!class_exists('AppHelper')) { @@ -532,7 +532,7 @@ * * @param string $plugin Name of plugin * @param string $helper Name of helper to load - * @return boolean Success + * @return bool Success * @deprecated */ function loadPluginHelper($plugin, $helper) { @@ -554,7 +554,7 @@ * Loads a component * * @param string $name Name of component - * @return boolean Success + * @return bool Success */ function loadComponent($name) { if ($name === null) { @@ -606,7 +606,7 @@ * * @param string $plugin Name of plugin * @param string $helper Name of component to load - * @return boolean Success + * @return bool Success * @deprecated */ function loadPluginComponent($plugin, $component) { @@ -626,7 +626,7 @@ * Loads a behavior * * @param string $name Name of behavior - * @return boolean Success + * @return bool Success */ function loadBehavior($name) { if ($name === null) { @@ -684,7 +684,7 @@ * config('config1', 'config2'); * * - * @return boolean Success + * @return bool Success */ function config() { $args = func_get_args(); @@ -761,9 +761,9 @@ * * Only runs if debug level is non-zero. * - * @param boolean $var Variable to show debug information for. - * @param boolean $showHtml If set to true, the method prints the debug data in a screen-friendly way. - * @param boolean $showFrom If set to true, the method prints from where the function was called. + * @param bool $var Variable to show debug information for. + * @param bool $showHtml If set to true, the method prints the debug data in a screen-friendly way. + * @param bool $showFrom If set to true, the method prints from where the function was called. */ function debug($var = false, $showHtml = false, $showFrom = true) { if (Configure::read() > 0) { @@ -799,7 +799,7 @@ * @param array $array Array to sort * @param string $sortby Sort by this key * @param string $order Sort order asc/desc (ascending or descending). - * @param integer $type Type of sorting to perform + * @param int $type Type of sorting to perform * @return mixed Sorted array */ if (!function_exists('sortByKey')) { @@ -954,7 +954,7 @@ * * @see debug() * @param array $var Variable to print out - * @param boolean $showFrom If set to true, the method prints from where the function was called + * @param bool $showFrom If set to true, the method prints from where the function was called */ function pr($var) { if (Configure::read() > 0) { @@ -1092,7 +1092,7 @@ * * @param string $fileName File name. * @param mixed $data String or array. - * @return boolean Success + * @return bool Success */ if (!function_exists('file_put_contents')) { function file_put_contents($fileName, $data) { @@ -1255,7 +1255,7 @@ * Returns a translated string if one is found, or the submitted message if not found. * * @param string $singular Text to translate - * @param boolean $return Set to true to return translated string, or false to echo + * @param bool $return Set to true to return translated string, or false to echo * @return mixed translated string if $return is false string will be echoed */ function __($singular, $return = false) { @@ -1278,8 +1278,8 @@ * * @param string $singular Singular text to translate * @param string $plural Plural text - * @param integer $count Count - * @param boolean $return true to return, false to echo + * @param int $count Count + * @param bool $return true to return, false to echo * @return mixed plural form of translated string if $return is false string will be echoed */ function __n($singular, $plural, $count, $return = false) { @@ -1324,8 +1324,8 @@ * @param string $domain Domain * @param string $singular Singular string to translate * @param string $plural Plural - * @param integer $count Count - * @param boolean $return true to return, false to echo + * @param int $count Count + * @param bool $return true to return, false to echo * @return plural form of translated string if $return is false string will be echoed */ function __dn($domain, $singular, $plural, $count, $return = false) { @@ -1358,8 +1358,8 @@ * * @param string $domain Domain * @param string $msg Message to translate - * @param integer $category Category - * @param boolean $return true to return, false to echo + * @param int $category Category + * @param bool $return true to return, false to echo * @return translated string if $return is false string will be echoed */ function __dc($domain, $msg, $category, $return = false) { @@ -1395,9 +1395,9 @@ * @param string $domain Domain * @param string $singular Singular string to translate * @param string $plural Plural - * @param integer $count Count - * @param integer $category Category - * @param boolean $return true to return, false to echo + * @param int $count Count + * @param int $category Category + * @param bool $return true to return, false to echo * @return plural form of translated string if $return is false string will be echoed */ function __dcn($domain, $singular, $plural, $count, $category, $return = false) { @@ -1426,7 +1426,7 @@ * LC_ALL 6 * * @param string $msg String to translate - * @param integer $category Category + * @param int $category Category * @param string $return true to return, false to echo * @return translated string if $return is false string will be echoed */ diff --git a/cake/console/cake.php b/cake/console/cake.php index ec7ced61a..4b94489ab 100644 --- a/cake/console/cake.php +++ b/cake/console/cake.php @@ -111,7 +111,6 @@ class ShellDispatcher { * @access public */ var $shellName = null; - /** * Constructs this ShellDispatcher instance. * @@ -120,7 +119,6 @@ class ShellDispatcher { function ShellDispatcher($args = array()) { $this->__construct($args); } - /** * Constructor * @@ -198,7 +196,7 @@ class ShellDispatcher { /** * Initializes the environment and loads the Cake core. * - * @return boolean Success. + * @return bool Success. * @access private */ function __bootstrap() { @@ -379,7 +377,7 @@ class ShellDispatcher { * Outputs to the stdout filehandle. * * @param string $string String to output. - * @param boolean $newline If true, the outputs gets an added newline. + * @param bool $newline If true, the outputs gets an added newline. * @access public */ function stdout($string, $newline = true) { @@ -442,7 +440,7 @@ class ShellDispatcher { /** * Removes first argument and shifts other arguments up * - * @return boolean False if there are no arguments + * @return bool False if there are no arguments * @access public */ function shiftArgs() { diff --git a/cake/console/error.php b/cake/console/error.php index 4ca091629..24111b963 100644 --- a/cake/console/error.php +++ b/cake/console/error.php @@ -234,7 +234,7 @@ class ErrorHandler extends Object { * Outputs to the stdout filehandle. * * @param string $string String to output. - * @param boolean $newline If true, the outputs gets an added newline. + * @param bool $newline If true, the outputs gets an added newline. * @access public */ function stdout($string, $newline = true) { diff --git a/cake/console/libs/acl.php b/cake/console/libs/acl.php index 3ff8d8f15..4ad30cf61 100644 --- a/cake/console/libs/acl.php +++ b/cake/console/libs/acl.php @@ -368,7 +368,6 @@ class AclShell extends Shell { $this->out("\n" . __("Done.", true), true); } - /** * Show help screen. * @@ -454,7 +453,7 @@ class AclShell extends Shell { * * @param string $type Node type (ARO/ACO) * @param int $id Node id - * @return boolean Success + * @return bool Success * @access public */ function nodeExists() { diff --git a/cake/console/libs/api.php b/cake/console/libs/api.php index 0ba0311af..c0a002e50 100644 --- a/cake/console/libs/api.php +++ b/cake/console/libs/api.php @@ -38,6 +38,7 @@ class ApiShell extends Shell { * Map between short name for paths and real paths. * * @var array + * @access public */ var $paths = array(); /** diff --git a/cake/console/libs/bake.php b/cake/console/libs/bake.php index 49c1ae31d..32c38bdce 100644 --- a/cake/console/libs/bake.php +++ b/cake/console/libs/bake.php @@ -35,9 +35,18 @@ * @subpackage cake.cake.console.libs */ class BakeShell extends Shell { - +/** + * Contains tasks to load and instantiate + * + * @var array + * @access public + */ var $tasks = array('Project', 'DbConfig', 'Model', 'Controller', 'View'); - +/** + * Override main() to handle action + * + * @access public + */ function main() { if (!is_dir(CONFIGS)) { @@ -87,7 +96,7 @@ class BakeShell extends Shell { /** * Displays help contents * - * @return void + * @access public */ function help() { $this->out('CakePHP Bake:'); diff --git a/cake/console/libs/console.php b/cake/console/libs/console.php index c0b539635..180dafbbe 100644 --- a/cake/console/libs/console.php +++ b/cake/console/libs/console.php @@ -31,9 +31,32 @@ * @subpackage cake.cake.console.libs */ class ConsoleShell extends Shell { +/** + * Available binding types + * + * @var array + * @access public + */ var $associations = array('hasOne', 'hasMany', 'belongsTo', 'hasAndBelongsToMany'); +/** + * Chars that describe invalid commands + * + * @var array + * @access public + */ var $badCommandChars = array('$', ';'); - +/** + * Available models + * + * @var array + * @access public + */ + var $models = array(); +/** + * Override intialize of the Shell + * + * @access public + */ function initialize() { $this->models = @loadModels(); foreach ($this->models as $model) { @@ -48,9 +71,12 @@ class ConsoleShell extends Shell { $this->out(" - {$model}"); } } - +/** + * Override main() to handle action + * + * @access public + */ function main() { - while (true) { $command = trim($this->in('')); @@ -101,7 +127,7 @@ class ConsoleShell extends Shell { $association = $tmp[2]; $modelB = $tmp[3]; - if ($this->isValidModel($modelA) && $this->isValidModel($modelB) && in_array($association, $this->associations)) { + if ($this->__isValidModel($modelA) && $this->__isValidModel($modelB) && in_array($association, $this->associations)) { $this->{$modelA}->bindModel(array($association => array($modelB => array('className' => $modelB))), false); $this->out("Created $association association between $modelA and $modelB"); } else { @@ -128,7 +154,7 @@ class ConsoleShell extends Shell { } } - if ($this->isValidModel($modelA) && $this->isValidModel($modelB) && in_array($association, $this->associations) && $validCurrentAssociation) { + if ($this->__isValidModel($modelA) && $this->__isValidModel($modelB) && in_array($association, $this->associations) && $validCurrentAssociation) { $this->{$modelA}->unbindModel(array($association => array($modelB))); $this->out("Removed $association association between $modelA and $modelB"); } else { @@ -143,7 +169,7 @@ class ConsoleShell extends Shell { // Do we have a valid model? list($modelToCheck, $tmp) = explode('->', $command); - if ($this->isValidModel($modelToCheck)) { + if ($this->__isValidModel($modelToCheck)) { $findCommand = "\$data = \$this->$command;"; @eval($findCommand); @@ -195,7 +221,7 @@ class ConsoleShell extends Shell { $command = str_replace($this->badCommandChars, "", $command); list($modelToSave, $tmp) = explode("->", $command); - if ($this->isValidModel($modelToSave)) { + if ($this->__isValidModel($modelToSave)) { // Extract the array of data we are trying to build list($foo, $data) = explode("->save", $command); $badChars = array("(", ")"); @@ -209,7 +235,7 @@ class ConsoleShell extends Shell { case (preg_match("/^(\w+) columns/", $command, $tmp) == true): $modelToCheck = strip_tags(str_replace($this->badCommandChars, "", $tmp[1])); - if ($this->isValidModel($modelToCheck)) { + if ($this->__isValidModel($modelToCheck)) { // Get the column info for this model $fieldsCommand = "\$data = \$this->{$modelToCheck}->getColumnTypes();"; @eval($fieldsCommand); @@ -229,14 +255,15 @@ class ConsoleShell extends Shell { } } } - - function isValidModel($modelToCheck) - { - if (in_array($modelToCheck, $this->models)) { - return true; - } else { - return false; - } +/** + * Tells if the specified model is included in the list of available models + * + * @param string $modelToCheck + * @return bool true if is an available model, false otherwise + * @access private + */ + function __isValidModel($modelToCheck) { + return in_array($modelToCheck, $this->models); } } ?> \ No newline at end of file diff --git a/cake/console/libs/schema.php b/cake/console/libs/schema.php index 238299eca..e18642e3a 100644 --- a/cake/console/libs/schema.php +++ b/cake/console/libs/schema.php @@ -39,7 +39,6 @@ class SchemaShell extends Shell { * Override initialize * * @access public - * @return void */ function initialize() { $this->out('Cake Schema Shell'); @@ -49,7 +48,6 @@ class SchemaShell extends Shell { * Override startup * * @access public - * @return void */ function startup() { $settings = am(array('path'=> CONFIGS .'sql'), $this->params); @@ -59,7 +57,6 @@ class SchemaShell extends Shell { * Override main * * @access public - * @return void */ function main() { $this->help(); @@ -69,7 +66,6 @@ class SchemaShell extends Shell { * path to read as second arg * * @access public - * @return void */ function view() { $File = new File($this->Schema->path . DS .'schema.php'); @@ -86,7 +82,6 @@ class SchemaShell extends Shell { * accepts a connection as first arg or path to save as second arg * * @access public - * @return void */ function generate() { $this->out('Generating Schema...'); @@ -105,7 +100,6 @@ class SchemaShell extends Shell { * or it will output sql * * @access public - * @return void */ function dump() { $write = false; @@ -140,11 +134,9 @@ class SchemaShell extends Shell { * Create database from Schema object * * @access public - * @return void */ function create() { $Schema = $this->Schema->load(); - $table = null; $event = array_keys($Schema->tables); if(isset($this->args[0])) { @@ -182,10 +174,8 @@ class SchemaShell extends Shell { * Update database with Schema object * * @access public - * @return void */ function update() { - $this->out('Comparing Database to Schema...'); $Old = $this->Schema->read(); $Schema = $this->Schema->load(); @@ -227,7 +217,7 @@ class SchemaShell extends Shell { /** * Displays help contents * - * @return void + * @access public */ function help() { $this->out('The Schema Shell generates a schema object from the database and updates the database from the schema.'); diff --git a/cake/console/libs/shell.php b/cake/console/libs/shell.php index f2f1a00e3..5f621fedb 100644 --- a/cake/console/libs/shell.php +++ b/cake/console/libs/shell.php @@ -34,17 +34,18 @@ require_once CAKE . 'console' . DS . 'error.php'; * @subpackage cake.cake.console.libs */ class Shell extends Object { - /** - * ShellDispatcher object + * An instance of the ShellDispatcher object that loaded this script * - * @var object An instance of the ShellDispatcher object that loaded this script + * @var object + * @access public */ var $Dispatch = null; /** * If true, the script will ask for permission to perform actions. * * @var boolean + * @access public */ var $interactive = true; /** @@ -52,60 +53,70 @@ class Shell extends Object { * or the app does not exist. * * @var object + * @access public */ - var $dbConfig = null; + var $DbConfig = null; /** * Contains command switches parsed from the command line. * * @var array + * @access public */ var $params = array(); /** * Contains arguments parsed from the command line. * * @var array + * @access public */ var $args = array(); /** * The file name of the shell that was invoked. * * @var string + * @access public */ var $shell = null; /** * The class name of the shell that was invoked. * * @var string + * @access public */ var $className = null; /** * The command called if public methods are available. * * @var string + * @access public */ var $command = null; /** * The name of the shell in camelized. * * @var string + * @access public */ var $name = null; /** * Contains tasks to load and instantiate * * @var array + * @access public */ var $tasks = array(); /** * Contains the loaded tasks * * @var array + * @access public */ var $taskNames = array(); /** * Contains models to load and instantiate * * @var array + * @access public */ var $uses = array(); /** @@ -138,7 +149,7 @@ class Shell extends Object { * acts as constructor for subclasses * allows configuration of tasks prior to shell execution * - * @return void + * @access public */ function initialize() { $this->_loadModels(); @@ -148,7 +159,7 @@ class Shell extends Object { * allows for checking and configuring prior to command or main execution * can be overriden in subclasses * - * @return void + * @access public */ function startup() { $this->_welcome(); @@ -156,7 +167,7 @@ class Shell extends Object { /** * Displays a header for the shell * - * @return void + * @access protected */ function _welcome() { $this->out('App : '. APP_DIR); @@ -165,16 +176,15 @@ class Shell extends Object { } /** * Loads database file and constructs DATABASE_CONFIG class - * makes $this->dbConfig available to subclasses + * makes $this->DbConfig available to subclasses * * @return bool + * @access protected */ function _loadDbConfig() { - if (config('database')) { - if (class_exists('DATABASE_CONFIG')) { - $this->dbConfig = new DATABASE_CONFIG(); - return true; - } + if (config('database') && class_exists('DATABASE_CONFIG')) { + $this->DbConfig =& new DATABASE_CONFIG(); + return true; } $this->err('Database config could not be loaded'); $this->out('Run \'bake\' to create the database configuration'); @@ -187,9 +197,9 @@ class Shell extends Object { * if var $uses is an array of models will load those models * * @return bool + * @access protected */ function _loadModels() { - if ($this->uses === null || $this->uses === false) { return; } @@ -230,6 +240,7 @@ class Shell extends Object { * Loads tasks defined in var $tasks * * @return bool + * @access public */ function loadTasks() { if ($this->tasks === null || $this->tasks === false) { @@ -297,6 +308,7 @@ class Shell extends Object { * @param mixed $options Array or string of options. * @param string $default Default input value. * @return Either the default value, or the user-provided input. + * @access public */ function in($prompt, $options = null, $default = null) { $in = $this->Dispatch->getInput($prompt, $options, $default); @@ -322,7 +334,8 @@ class Shell extends Object { * Outputs to the stdout filehandle. * * @param string $string String to output. - * @param boolean $newline If true, the outputs gets an added newline. + * @param bool $newline If true, the outputs gets an added newline. + * @access public */ function out($string, $newline = true) { if(is_array($string)) { @@ -338,6 +351,7 @@ class Shell extends Object { * Outputs to the stderr filehandle. * * @param string $string Error text to output. + * @access public */ function err($string) { if(is_array($string)) { @@ -352,6 +366,8 @@ class Shell extends Object { /** * Outputs a series of minus characters to the standard output, acts as a visual separator. * + * @param bool $newline If true, the outputs gets an added newline. + * @access public */ function hr($newline = false) { if ($newline) { @@ -363,10 +379,11 @@ class Shell extends Object { } } /** - * Displays a formatted error message + * Displays a formatted error message and exits the application * - * @param unknown_type $title - * @param unknown_type $msg + * @param string $title Title of the error message + * @param string $msg Error message + * @access public */ function error($title, $msg) { $out = "$title\n"; @@ -378,8 +395,9 @@ class Shell extends Object { /** * Will check the number args matches otherwise throw an error * - * @param unknown_type $expectedNum - * @param unknown_type $command + * @param int $expectedNum Expected number of paramters + * @param string $command Command + * @access protected */ function _checkArgs($expectedNum, $command = null) { if (!$command) { @@ -390,11 +408,12 @@ class Shell extends Object { } } /** - * Creates a file at given path. + * Creates a file at given path * - * @param string $path Where to put the file. + * @param string $path Where to put the file. * @param string $contents Content to put in the file. - * @return Success + * @return bool Success + * @access public */ function createFile ($path, $contents) { $path = str_replace(DS . DS, DS, $path); @@ -426,6 +445,7 @@ class Shell extends Object { /** * Outputs usage text on the standard output. Implement it in subclasses. * + * @access public */ function help() { if ($this->command != null) { @@ -435,9 +455,10 @@ class Shell extends Object { } } /** - * Action to create a Unit Test. + * Action to create a Unit Test * - * @return Success + * @return bool Success + * @access protected */ function _checkUnitTest() { if (is_dir(VENDORS.'simpletest') || is_dir(ROOT.DS.APP_DIR.DS.'vendors'.DS.'simpletest')) { @@ -452,19 +473,22 @@ class Shell extends Object { return $result; } /** - * makes absolute file path easier to read + * Makes absolute file path easier to read * + * @param string $file Absolute file path * @return sting short path + * @access public */ function shortPath($file) { $shortPath = str_replace(ROOT, null, $file); $shortPath = str_replace('..'.DS, '', $shortPath); - return str_replace(DS.DS, DS, $shortPath); + return r(DS.DS, DS, $shortPath); } /** - * Checks for Configure::read('Routing.admin') and Forces user to input it if not enabled + * Checks for Configure::read('Routing.admin') and forces user to input it if not enabled * - * @return the controller name + * @return string Admin route to use + * @access public */ function getAdmin() { $admin = ''; @@ -490,46 +514,51 @@ class Shell extends Object { return $cakeAdmin; } /** - * creates the proper pluralize controller for the url + * Creates the proper controller path for the specified controller class name * - * @param string $name - * @return string $name + * @param string $name Controller class name + * @return string Path to controller + * @access protected */ function _controllerPath($name) { return low(Inflector::underscore($name)); } /** - * creates the proper pluralize controller class name. + * Creates the proper controller plural name for the specified controller class name * - * @param string $name - * @return string $name + * @param string $name Controller class name + * @return string Controller plural name + * @access protected */ function _controllerName($name) { return Inflector::pluralize(Inflector::camelize($name)); } /** - * creates the proper singular model name. + * Creates the proper controller camelized name (singularized) for the specified name * - * @param string $name - * @return string $name + * @param string $name Name + * @return string Camelized and singularized controller name + * @access protected */ function _modelName($name) { return Inflector::camelize(Inflector::singularize($name)); } /** - * creates the proper singular model key for associations. + * Creates the proper singular model key for associations * - * @param string $name - * @return string $name + * @param string $name Controller class name + * @return string Singular model key + * @access protected */ function _modelKey($name) { return Inflector::underscore(Inflector::singularize($name)).'_id'; } /** - * creates the proper model name from a foreign key. + * Creates the proper model name from a foreign key * - * @param string $key - * @return string $name + * @param string $key Foreign key + * @return string Model name + * @access protected */ function _modelNameFromKey($key) { $name = str_replace('_id', '',$key); @@ -540,33 +569,37 @@ class Shell extends Object { * * @param string $name * @return string $name + * @access protected */ function _singularName($name) { return Inflector::variable(Inflector::singularize($name)); } /** - * creates the plural name for views. + * Creates the plural name for views * - * @param string $name - * @return string $name + * @param string $name Name to use + * @return string Plural name for views + * @access protected */ function _pluralName($name) { return Inflector::variable(Inflector::pluralize($name)); } /** - * creates the singular human name used in views + * Creates the singular human name used in views * - * @param string $name - * @return string $name + * @param string $name Controller name + * @return string Singular human name + * @access protected */ function _singularHumanName($name) { return Inflector::humanize(Inflector::underscore(Inflector::singularize($name))); } /** - * creates the plural humna name used in views + * Creates the plural human name used in views * - * @param string $name - * @return string $name + * @param string $name Controller name + * @return string Plural human name + * @access protected */ function _pluralHumanName($name) { return Inflector::humanize(Inflector::underscore(Inflector::pluralize($name))); diff --git a/cake/console/libs/tasks/controller.php b/cake/console/libs/tasks/controller.php index 23df956ff..af55e047b 100644 --- a/cake/console/libs/tasks/controller.php +++ b/cake/console/libs/tasks/controller.php @@ -37,18 +37,19 @@ class ControllerTask extends Shell { * Tasks to be loaded by this Task * * @var array + * @access public */ var $tasks = array('Project'); /** * Override initialize * - * @return void + * @access public */ function initialize() {} /** * Execution method always used for tasks * - * @return void + * @access public */ function execute() { if (empty($this->args)) { @@ -81,7 +82,7 @@ class ControllerTask extends Shell { /** * Interactive * - * @return void + * @access private */ function __interactive() { $this->interactive = false; @@ -96,11 +97,8 @@ class ControllerTask extends Shell { $wannaDoAdmin = 'n'; $wannaUseScaffold = 'n'; $wannaDoScaffolding = 'y'; - $controllerName = $this->getName(); - $controllerPath = low(Inflector::underscore($controllerName)); - $doItInteractive = $this->in("Would you like bake to build your controller interactively?\nWarning: Choosing no will overwrite {$controllerName} controller if it exist.", array('y','n'), 'y'); if (low($doItInteractive) == 'y' || low($doItInteractive) == 'yes') { @@ -156,9 +154,9 @@ class ControllerTask extends Shell { } if (low($wannaDoScaffolding) == 'y' || low($wannaDoScaffolding) == 'yes') { - $actions = $this->__bakeActions($controllerName, null, $wannaUseSession); + $actions = $this->__bakeActions($controllerName, null, in_array(low($wannaUseSession), array('y', 'yes'))); if ($admin) { - $actions .= $this->__bakeActions($controllerName, $admin, $wannaUseSession); + $actions .= $this->__bakeActions($controllerName, $admin, in_array(low($wannaUseSession), array('y', 'yes'))); } } @@ -226,8 +224,16 @@ class ControllerTask extends Shell { } } } - - function __bakeActions($controllerName, $admin = null, $wannaUseSession = 'y') { +/** + * Bake scaffold actions + * + * @param string $controllerName Controller name + * @param string $admin Admin route to use + * @param bool $wannaUseSession Set to true to use sessions, false otherwise + * @return string Baked actions + * @access private + */ + function __bakeActions($controllerName, $admin = null, $wannaUseSession = true) { $currentModelName = $this->_modelName($controllerName); if (!loadModel($currentModelName)) { $this->out('You must have a model for this class to build scaffold methods. Please try again.'); @@ -248,7 +254,7 @@ class ControllerTask extends Shell { $actions .= "\n"; $actions .= "\tfunction {$admin}view(\$id = null) {\n"; $actions .= "\t\tif (!\$id) {\n"; - if (low($wannaUseSession) == 'y' || low($wannaUseSession) == 'yes') { + if ($wannaUseSession) { $actions .= "\t\t\t\$this->Session->setFlash('Invalid {$singularHumanName}.');\n"; $actions .= "\t\t\t\$this->redirect(array('action'=>'index'), null, true);\n"; } else { @@ -266,7 +272,7 @@ class ControllerTask extends Shell { $actions .= "\t\t\t\$this->cleanUpFields();\n"; $actions .= "\t\t\t\$this->{$currentModelName}->create();\n"; $actions .= "\t\t\tif (\$this->{$currentModelName}->save(\$this->data)) {\n"; - if (low($wannaUseSession) == 'y' || low($wannaUseSession) == 'yes') { + if ($wannaUseSession) { $actions .= "\t\t\t\t\$this->Session->setFlash('The ".$singularHumanName." has been saved');\n"; $actions .= "\t\t\t\t\$this->redirect(array('action'=>'index'), null, true);\n"; } else { @@ -274,7 +280,7 @@ class ControllerTask extends Shell { $actions .= "\t\t\t\texit();\n"; } $actions .= "\t\t\t} else {\n"; - if (low($wannaUseSession) == 'y' || low($wannaUseSession) == 'yes') { + if ($wannaUseSession) { $actions .= "\t\t\t\t\$this->Session->setFlash('The {$singularHumanName} could not be saved. Please, try again.');\n"; } $actions .= "\t\t\t}\n"; @@ -306,7 +312,7 @@ class ControllerTask extends Shell { $compact = array(); $actions .= "\tfunction {$admin}edit(\$id = null) {\n"; $actions .= "\t\tif (!\$id && empty(\$this->data)) {\n"; - if (low($wannaUseSession) == 'y' || low($wannaUseSession) == 'yes') { + if ($wannaUseSession) { $actions .= "\t\t\t\$this->Session->setFlash('Invalid {$singularHumanName}');\n"; $actions .= "\t\t\t\$this->redirect(array('action'=>'index'), null, true);\n"; } else { @@ -317,7 +323,7 @@ class ControllerTask extends Shell { $actions .= "\t\tif (!empty(\$this->data)) {\n"; $actions .= "\t\t\t\$this->cleanUpFields();\n"; $actions .= "\t\t\tif (\$this->{$currentModelName}->save(\$this->data)) {\n"; - if (low($wannaUseSession) == 'y' || low($wannaUseSession) == 'yes') { + if ($wannaUseSession) { $actions .= "\t\t\t\t\$this->Session->setFlash('The ".$singularHumanName." has been saved');\n"; $actions .= "\t\t\t\t\$this->redirect(array('action'=>'index'), null, true);\n"; } else { @@ -325,7 +331,7 @@ class ControllerTask extends Shell { $actions .= "\t\t\t\texit();\n"; } $actions .= "\t\t\t} else {\n"; - if (low($wannaUseSession) == 'y' || low($wannaUseSession) == 'yes') { + if ($wannaUseSession) { $actions .= "\t\t\t\t\$this->Session->setFlash('The {$singularHumanName} could not be saved. Please, try again.');\n"; } $actions .= "\t\t\t}\n"; @@ -358,7 +364,7 @@ class ControllerTask extends Shell { $actions .= "\n"; $actions .= "\tfunction {$admin}delete(\$id = null) {\n"; $actions .= "\t\tif (!\$id) {\n"; - if (low($wannaUseSession) == 'y' || low($wannaUseSession) == 'yes') { + if ($wannaUseSession) { $actions .= "\t\t\t\$this->Session->setFlash('Invalid id for {$singularHumanName}');\n"; $actions .= "\t\t\t\$this->redirect(array('action'=>'index'), null, true);\n"; } else { @@ -366,7 +372,7 @@ class ControllerTask extends Shell { } $actions .= "\t\t}\n"; $actions .= "\t\tif (\$this->{$currentModelName}->del(\$id)) {\n"; - if (low($wannaUseSession) == 'y' || low($wannaUseSession) == 'yes') { + if ($wannaUseSession) { $actions .= "\t\t\t\$this->Session->setFlash('".$singularHumanName." #'.\$id.' deleted');\n"; $actions .= "\t\t\t\$this->redirect(array('action'=>'index'), null, true);\n"; } else { @@ -380,13 +386,15 @@ class ControllerTask extends Shell { /** - * Assembles and writes a Controller file. + * Assembles and writes a Controller file * - * @param string $controllerName - * @param array $uses - * @param array $helpers - * @param array $components - * @param string $actions + * @param string $controllerName Controller name + * @param string $actions Actions to add, or set the whole controller to use $scaffold (set $actions to 'scaffold') + * @param array $helpers Helpers to use in controller + * @param array $components Components to use in controller + * @param array $uses Models to use in controller + * @return string Baked controller + * @access private */ function __bake($controllerName, $actions = '', $helpers = null, $components = null, $uses = null) { $out = "_modelName($controllerName) . "', "; @@ -442,9 +449,11 @@ class ControllerTask extends Shell { return $this->createFile($filename, $out); } /** - * Assembles and writes a unit test file. + * Assembles and writes a unit test file * - * @param string $className + * @param string $className Controller class name + * @return string Baked test + * @access private */ function __bakeTest($className) { $out = 'listAll($useDbConfig, 'Controllers'); - $enteredController = ''; while ($enteredController == '') { @@ -533,7 +542,7 @@ class ControllerTask extends Shell { /** * Displays help contents * - * @return void + * @access public */ function help() { $this->hr(); diff --git a/cake/console/libs/tasks/db_config.php b/cake/console/libs/tasks/db_config.php index f62dbd19d..7fc37991b 100644 --- a/cake/console/libs/tasks/db_config.php +++ b/cake/console/libs/tasks/db_config.php @@ -36,16 +36,19 @@ if (!class_exists('File')) { * @subpackage cake.cake.console.libs.tasks */ class DbConfigTask extends Shell { - +/** + * Default configuration settings to use + * + * @var array + * @access private + */ var $__defaultConfig = array('name' => 'default', 'driver'=> 'mysql', 'persistent'=> 'false', 'host'=> 'localhost', 'login'=> 'root', 'password'=> 'password', 'database'=> 'project_name', 'schema'=> null, 'prefix'=> null, 'encoding' => null, 'port' => null); - - /** * Execution method always used for tasks * - * @return void + * @access public */ function execute() { if (empty($this->args)) { @@ -53,12 +56,10 @@ class DbConfigTask extends Shell { exit(); } } - /** * Interactive interface * * @access private - * @return void */ function __interactive() { $this->out('Database Configuration:'); @@ -171,11 +172,10 @@ class DbConfigTask extends Shell { return true; } /** - * Output verification message - * and bake if it looks good + * Output verification message and bake if it looks good * + * @return bool True if user says it looks good, false otherwise * @access private - * @return bool */ function __verify($config) { $config = am($this->__defaultConfig, $config); @@ -206,8 +206,9 @@ class DbConfigTask extends Shell { /** * Assembles and writes database.php * + * @param array $configs Configuration settings to use + * @return bool Success * @access public - * @return bool */ function bake($configs) { if (!is_dir(CONFIGS)) { diff --git a/cake/console/libs/tasks/extract.php b/cake/console/libs/tasks/extract.php index f49cb3658..8562f66e0 100644 --- a/cake/console/libs/tasks/extract.php +++ b/cake/console/libs/tasks/extract.php @@ -60,27 +60,78 @@ * @subpackage cake.cake.console.libs */ class ExtractTask extends Shell{ +/** + * Path to use when looking for strings + * + * @var string + * @access public + */ var $path = null; +/** + * Files from where to extract + * + * @var array + * @access public + */ var $files = array(); - +/** + * Filename where to deposit translations + * + * @var string + * @access private + */ var $__filename = 'default'; +/** + * True if all strings should be merged into one file + * + * @var boolean + * @access private + */ var $__oneFile = true; +/** + * Current file being processed + * + * @var string + * @access private + */ var $__file = null; +/** + * Extracted tokens + * + * @var array + * @access private + */ var $__tokens = array(); +/** + * Extracted strings + * + * @var array + * @access private + */ var $__strings = array(); +/** + * History of file versions + * + * @var array + * @access private + */ var $__fileVersions = array(); +/** + * Destination path + * + * @var string + * @access private + */ var $__output = null; - /** * Override initialize * - * @return void + * @access public */ function initialize() { if (isset($this->params['files']) && !is_array($this->params['files'])) { $this->files = explode(',', $this->params['files']); } - if (isset($this->params['path'])) { $this->path = $this->params['path']; } else { @@ -133,13 +184,14 @@ class ExtractTask extends Shell{ /** * Override startup * - * @return void + * @access public */ - function startup() {} + function startup() { + } /** * Execution method always used for tasks * - * @return void + * @access public */ function execute() { $this->out(''); @@ -168,6 +220,11 @@ class ExtractTask extends Shell{ } $this->__extractTokens(); } +/** + * Show help options + * + * @access public + */ function help() { $this->out(__('CakePHP Language String Extraction:', true)); $this->hr(); @@ -188,6 +245,11 @@ class ExtractTask extends Shell{ $this->out(__(' -debug: Perform self test.', true)); $this->out(''); } +/** + * Extract tokens out of all files to be processed + * + * @access private + */ function __extractTokens() { foreach ($this->files as $file) { $this->__file = $file; @@ -230,9 +292,10 @@ class ExtractTask extends Shell{ /** * Will parse __(), __c() functions * - * @param string $functionname + * @param string $functionName Function name that indicates translatable string (e.g: '__') + * @access public */ - function basic($functionname = '__') { + function basic($functionName = '__') { $count = 0; $tokenCount = count($this->__tokens); @@ -244,7 +307,7 @@ class ExtractTask extends Shell{ } list($type, $string, $line) = $countToken; - if (($type == T_STRING) && ($string == $functionname) && ($parenthesis == '(')) { + if (($type == T_STRING) && ($string == $functionName) && ($parenthesis == '(')) { if (in_array($right, array(')', ',')) && (is_array($middle) && ($middle[0] == T_CONSTANT_ENCAPSED_STRING))) { @@ -255,7 +318,7 @@ class ExtractTask extends Shell{ $this->__strings[$this->__file][$this->__formatString($middle[1])][] = $line; } } else { - $this->__markerError($this->__file, $line, $functionname, $count); + $this->__markerError($this->__file, $line, $functionName, $count); } } $count++; @@ -264,11 +327,12 @@ class ExtractTask extends Shell{ /** * Will parse __d(), __dc(), __n(), __dn(), __dcn() * - * @param string $functionname - * @param integer $shift - * @param boolean $plural + * @param string $functionName Function name that indicates translatable string (e.g: '__') + * @param int $shift Number of parameters to shift to find translateable string + * @param bool $plural Set to true if function supports plural format, false otherwise + * @access public */ - function extended($functionname = '__d', $shift = 0, $plural = false) { + function extended($functionName = '__d', $shift = 0, $plural = false) { $count = 0; $tokenCount = count($this->__tokens); @@ -280,7 +344,7 @@ class ExtractTask extends Shell{ } list($type, $string, $line) = $countToken; - if (($type == T_STRING) && ($string == $functionname) && ($firstParenthesis == '(')) { + if (($type == T_STRING) && ($string == $functionName) && ($firstParenthesis == '(')) { $position = $count; $depth = 0; @@ -340,12 +404,17 @@ class ExtractTask extends Shell{ } } } else { - $this->__markerError($this->__file, $line, $functionname, $count); + $this->__markerError($this->__file, $line, $functionName, $count); } } $count++; } } +/** + * Build the translate template file contents out of obtained strings + * + * @access private + */ function __buildFiles() { $output = ''; foreach ($this->__strings as $str => $fileInfo) { @@ -403,6 +472,16 @@ class ExtractTask extends Shell{ $this->__store($filename, $output, $fileList); } } +/** + * Prepare a file to be stored + * + * @param string $file Filename + * @param string $input What to store + * @param array $fileList File list + * @param int $get Set to 1 to get files to store, false to set + * @return mixed If $get == 1, files to store, otherwise void + * @access private + */ function __store($file = 0, $input = 0, $fileList = array(), $get = 0) { static $storage = array(); @@ -420,6 +499,11 @@ class ExtractTask extends Shell{ return $storage; } } +/** + * Write the files that need to be stored + * + * @access private + */ function __writeFiles() { $output = $this->__store(0, 0, array(), 1); $output = $this->__mergeFiles($output); @@ -463,6 +547,13 @@ class ExtractTask extends Shell{ fclose($fp); } } +/** + * Merge output files + * + * @param array $output Output to merge + * @return array Merged output + * @access private + */ function __mergeFiles($output) { foreach ($output as $file => $content) { if (count($content) <= 1 && $file != $this->__filename) { @@ -482,6 +573,12 @@ class ExtractTask extends Shell{ } return $output; } +/** + * Build the translation template header + * + * @return string Translation template header + * @access private + */ function __writeHeader() { $output = "# LANGUAGE translation of CakePHP Application\n"; $output .= "# Copyright YEAR NAME \n"; @@ -501,6 +598,13 @@ class ExtractTask extends Shell{ $output .= "\"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\\n\"\n\n"; return $output; } +/** + * Find the version number of a file looking for SVN commands + * + * @param string $code Source code of file + * @param string $file File + * @access private + */ function __findVersion($code, $file) { $header = '$Id' . ':'; if (preg_match('/\\' . $header . ' [\\w.]* ([\\d]*)/', $code, $versionInfo)) { @@ -508,6 +612,13 @@ class ExtractTask extends Shell{ $this->__fileVersions[$file] = $version; } } +/** + * Format a string to be added as a translateable string + * + * @param string $string String to format + * @return string Formatted string + * @access private + */ function __formatString($string) { $quote = substr($string, 0, 1); $string = substr($string, 1, -1); @@ -518,6 +629,15 @@ class ExtractTask extends Shell{ } return addcslashes($string, "\0..\37\\\""); } +/** + * Indicate an invalid marker on a processed file + * + * @param string $file File where invalid marker resides + * @param int $line Line number + * @param string $marker Marker found + * @param int $count Count + * @access private + */ function __markerError($file, $line, $marker, $count) { $this->out("Invalid marker content in $file:$line\n* $marker(", true); $count += 2; @@ -541,6 +661,13 @@ class ExtractTask extends Shell{ } $this->out("\n", true); } +/** + * Search the specified path for files that may contain translateable strings + * + * @param string $path Path (or set to null to use current) + * @return array Files + * @access private + */ function __searchDirectory($path = null) { if ($path === null) { $path = $this->path .DS; diff --git a/cake/console/libs/tasks/model.php b/cake/console/libs/tasks/model.php index 88c7d6c00..294b2fda4 100644 --- a/cake/console/libs/tasks/model.php +++ b/cake/console/libs/tasks/model.php @@ -33,11 +33,10 @@ * @subpackage cake.cake.console.libs.tasks */ class ModelTask extends Shell { - /** * Execution method always used for tasks * - * @return void + * @access public */ function execute() { if (empty($this->args)) { @@ -57,7 +56,6 @@ class ModelTask extends Shell { * Handles interactive baking * * @access private - * @return void */ function __interactive() { $this->hr(); @@ -447,12 +445,13 @@ class ModelTask extends Shell { /** * Assembles and writes a Model file. * - * @param string $name - * @param object $useDbConfig - * @param string $useTable - * @param string $primaryKey - * @param array $validate - * @param array $associations + * @param string $name Model name + * @param object $useDbConfig Database configuration setting to use + * @param string $useTable Table to use + * @param string $primaryKey Primary key to use + * @param array $validate Validation rules + * @param array $associations Model bindings + * @access private */ function __bake($name, $useDbConfig = 'default', $useTable = null, $primaryKey = 'id', $validate = array(), $associations = array()) { $out = "out($i + 1 . ". " . $this->_modelNames[$i]); } } - /** * Forces the user to specify the model he wants to bake, and returns the selected model name. * - * @return the model name + * @return string the model name + * @access public */ function getName($useDbConfig) { $this->listAll($useDbConfig); @@ -661,7 +658,7 @@ class ModelTask extends Shell { /** * Displays help contents * - * @return void + * @access public */ function help() { $this->hr(); diff --git a/cake/console/libs/tasks/project.php b/cake/console/libs/tasks/project.php index fdad09341..789d11da4 100644 --- a/cake/console/libs/tasks/project.php +++ b/cake/console/libs/tasks/project.php @@ -36,26 +36,26 @@ if (!class_exists('File')) { * @subpackage cake.cake.console.libs.tasks */ class ProjectTask extends Shell { - /** * Override * - * @return void + * @access public */ - function initialize() {} - + function initialize() { + } /** * Override * - * @return void + * @access public */ - function startup() {} - + function startup() { + } /** * Checks that given project path does not already exist, and * finds the app directory in it. Then it calls __buildDirLayout() with that information. * - * @return bool + * @param string $project Project path + * @access public */ function execute($project = null) { if ($project === null) { @@ -117,14 +117,14 @@ class ProjectTask extends Shell { $this->__buildDirLayout($project); exit(); } - /** * Looks for a skeleton template of a Cake application, * and if not found asks the user for a path. When there is a path * this method will make a deep copy of the skeleton to the project directory. * A default home page will be added, and the tmp file storage will be chmod'ed to 0777. * - * @param string $path + * @param string $path Project path + * @access private */ function __buildDirLayout($path) { $skel = $this->params['skel']; @@ -161,7 +161,7 @@ class ProjectTask extends Shell { $this->out(sprintf(__("Created: %s in %s", true), $app, $path)); $this->hr(); - if ($this->createHome($path, $app)) { + if ($this->createHome($path)) { $this->out('Welcome page created'); } else { $this->out('The Welcome page was NOT created'); @@ -206,18 +206,21 @@ class ProjectTask extends Shell { /** * Writes a file with a default home page to the project. * - * @param string $dir - * @param string $app + * @param string $dir Path to project + * @return bool Success + * @access public */ - function createHome($dir, $app) { + function createHome($dir) { $path = $dir . 'views' . DS . 'pages' . DS; include(CAKE_CORE_INCLUDE_PATH.DS.'cake'.DS.'console'.DS.'libs'.DS.'templates'.DS.'views'.DS.'home.ctp'); return $this->createFile($path.'home.ctp', $output); } /** - * generates and writes 'Security.salt' + * Generates and writes 'Security.salt' * - * @return bool + * @param string $path Project path + * @return bool Success + * @access public */ function securitySalt($path) { $File =& new File($path . 'config' . DS . 'core.php'); @@ -236,9 +239,11 @@ class ProjectTask extends Shell { } } /** - * generates and writes CAKE_CORE_INCLUDE_PATH + * Generates and writes CAKE_CORE_INCLUDE_PATH * - * @return bool + * @param string $path Project path + * @return bool Success + * @access public */ function corePath($path) { if (dirname($path) !== CAKE_CORE_INCLUDE_PATH) { @@ -259,7 +264,9 @@ class ProjectTask extends Shell { /** * Enables Configure::read('Routing.admin') in /app/config/core.php * - * @return bool + * @param string $name Name to use as admin routing + * @return bool Success + * @access public */ function cakeAdmin($name) { $File =& new File(CONFIGS . 'core.php'); diff --git a/cake/console/libs/tasks/view.php b/cake/console/libs/tasks/view.php index fbab414d1..f9eb564e3 100644 --- a/cake/console/libs/tasks/view.php +++ b/cake/console/libs/tasks/view.php @@ -38,42 +38,48 @@ class ViewTask extends Shell { * Tasks to be loaded by this Task * * @var array + * @access public */ var $tasks = array('Project', 'Controller'); /** - * name of the controller being used + * Name of the controller being used * * @var string + * @access public */ var $controllerName = null; /** - * path to controller to put views + * Path to controller to put views * * @var string + * @access public */ var $controllerPath = null; /** - * the template file to use + * The template file to use * * @var string + * @access public */ var $template = null; /** * Actions to use for scaffolding * * @var array + * @access public */ var $scaffoldActions = array('index', 'view', 'add', 'edit'); /** * Override initialize * - * @return void + * @access public */ - function initialize() {} + function initialize() { + } /** * Execution method always used for tasks * - * @return void + * @access public */ function execute() { if (empty($this->args)) { @@ -131,7 +137,6 @@ class ViewTask extends Shell { * Handles interactive baking * * @access private - * @return void */ function __interactive() { $this->hr(); @@ -211,8 +216,8 @@ class ViewTask extends Shell { * 'singularHumanName', 'pluralHumanName', 'fields', 'foreignKeys', * 'belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany' * - * @access private * @return array Returns an variables to be made available to a view template + * @access private */ function __loadController() { if (!$this->controllerName) { @@ -252,9 +257,10 @@ class ViewTask extends Shell { /** * Assembles and writes bakes the view file. * - * @param string $action - * @param string $content - * @return bool + * @param string $action Action to bake + * @param string $content Content to write + * @return bool Success + * @access public */ function bake($action, $content = '') { if ($content === true) { @@ -279,6 +285,7 @@ class ViewTask extends Shell { * @param string $template file to use * @param array $vars passed for use in templates * @return string content from template + * @access public */ function getContent($template = null, $vars = null) { if (!$template) { @@ -319,7 +326,7 @@ class ViewTask extends Shell { /** * Displays help contents * - * @return void + * @access public */ function help() { $this->hr(); diff --git a/cake/console/libs/templates/skel/controllers/pages_controller.php b/cake/console/libs/templates/skel/controllers/pages_controller.php index ee260b420..d6a2c9200 100644 --- a/cake/console/libs/templates/skel/controllers/pages_controller.php +++ b/cake/console/libs/templates/skel/controllers/pages_controller.php @@ -39,23 +39,28 @@ class PagesController extends AppController{ * Controller name * * @var string + * @access public */ var $name = 'Pages'; /** * Default helper * * @var array + * @access public */ var $helpers = array('Html'); /** * This controller does not use a model * * @var array + * @access public */ var $uses = array(); /** * Displays a view * + * @param mixed What page to display + * @access public */ function display() { if (!func_num_args()) { diff --git a/cake/dispatcher.php b/cake/dispatcher.php index 075f9539d..38b1e1b83 100644 --- a/cake/dispatcher.php +++ b/cake/dispatcher.php @@ -113,7 +113,7 @@ class Dispatcher extends Object { * @param string $url URL information to work on. * @param array $additionalParams Settings array ("bare", "return"), * which is melded with the GET and POST params. - * @return boolean Success + * @return bool Success * @access public */ function dispatch($url = null, $additionalParams = array()) { @@ -255,7 +255,7 @@ class Dispatcher extends Object { * * @param object $controller Controller to invoke * @param array $params Parameters with at least the 'action' to invoke - * @param boolean $missingAction Set to true if missing action should be rendered, false otherwise + * @param bool $missingAction Set to true if missing action should be rendered, false otherwise * @return string Output as sent by controller * @access protected */ diff --git a/cake/libs/cache.php b/cake/libs/cache.php index 3ff1a04e4..b24e6d412 100644 --- a/cake/libs/cache.php +++ b/cake/libs/cache.php @@ -136,7 +136,7 @@ class Cache extends Object { * * @param string $name Name of the engine (without 'Engine') * @param array $settings Optional associative array of settings passed to the engine - * @return boolean True on success, false on failure + * @return bool True on success, false on failure * @access public */ function engine($name = 'File', $settings = array()) { @@ -169,7 +169,7 @@ class Cache extends Object { * @param mixed $value Data to be cached - anything except a resource * @param mixed $duration Optional - string configuration name OR how long to cache the data, either in seconds or a * string that can be parsed by the strtotime() function OR array('config' => 'default', 'duration' => '3600') - * @return boolean True if the data was successfully cached, false on failure + * @return bool True if the data was successfully cached, false on failure * @access public */ function write($key, $value, $duration = null) { @@ -237,7 +237,7 @@ class Cache extends Object { * * @param string $key Identifier for the data * @param string $config name of the configuration to use - * @return boolean True if the value was succesfully deleted, false if it didn't exist or couldn't be removed + * @return bool True if the value was succesfully deleted, false if it didn't exist or couldn't be removed * @access public */ function delete($key, $config = null) { @@ -260,9 +260,9 @@ class Cache extends Object { /** * 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 - * @return boolean True if the cache was succesfully cleared, false otherwise + * @return bool True if the cache was succesfully cleared, false otherwise * @access public */ function clear($check = false, $config = null) { @@ -282,7 +282,7 @@ class Cache extends Object { * * @param string $engine Name of the engine * @param string $config Name of the configuration setting - * @return boolean + * @return bool * @access public */ function isInitialized($engine = null) { @@ -335,7 +335,7 @@ class CacheEngine extends Object { * Called automatically by the cache frontend * * @param array $params Associative array of parameters for the engine - * @return boolean True if the engine has been succesfully initialized, false if not + * @return bool True if the engine has been succesfully initialized, false if not * @access public */ function init($settings = array()) { @@ -357,7 +357,7 @@ class CacheEngine extends Object { * @param string $key Identifier for the data * @param mixed $value Data to be cached * @param mixed $duration How long to cache the data, in seconds - * @return boolean True if the data was succesfully cached, false on failure + * @return bool True if the data was succesfully cached, false on failure * @access public */ function write($key, &$value, $duration) { @@ -377,7 +377,7 @@ class CacheEngine extends Object { * Delete a key from the cache * * @param string $key Identifier for the data - * @return boolean True if the value was succesfully deleted, false if it didn't exist or couldn't be removed + * @return bool True if the value was succesfully deleted, false if it didn't exist or couldn't be removed * @access public */ function delete($key) { @@ -385,8 +385,8 @@ class CacheEngine extends Object { /** * Delete all keys from the cache * - * @param boolean $check if true will check expiration, otherwise delete all - * @return boolean True if the cache was succesfully cleared, false otherwise + * @param bool $check if true will check expiration, otherwise delete all + * @return bool True if the cache was succesfully cleared, false otherwise * @access public */ function clear($check) { diff --git a/cake/libs/cache/apc.php b/cake/libs/cache/apc.php index c4363cbb7..68b0913d0 100644 --- a/cake/libs/cache/apc.php +++ b/cake/libs/cache/apc.php @@ -40,7 +40,7 @@ class APCEngine extends CacheEngine { * * @see var $__defaults * @param array $setting 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 * @access public */ function init($settings = array()) { @@ -53,7 +53,7 @@ class APCEngine extends CacheEngine { * @param string $key Identifier for the data * @param mixed $value Data to be cached * @param int $duration How long to cache the data, in seconds - * @return boolean True if the data was succesfully cached, false on failure + * @return bool True if the data was succesfully cached, false on failure * @access public */ function write($key, &$value, $duration) { @@ -73,7 +73,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 succesfully deleted, false if it didn't exist or couldn't be removed + * @return bool True if the value was succesfully deleted, false if it didn't exist or couldn't be removed * @access public */ function delete($key) { @@ -82,7 +82,7 @@ class APCEngine extends CacheEngine { /** * Delete all keys from the cache * - * @return boolean True if the cache was succesfully cleared, false otherwise + * @return bool True if the cache was succesfully cleared, false otherwise * @access public */ function clear() { diff --git a/cake/libs/cache/file.php b/cake/libs/cache/file.php index 88a9667e8..67447e45b 100644 --- a/cake/libs/cache/file.php +++ b/cake/libs/cache/file.php @@ -66,7 +66,7 @@ class FileEngine extends CacheEngine { * To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array()); * * @param array $setting 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 * @access public */ function init($settings = array()) { @@ -87,7 +87,7 @@ class FileEngine extends CacheEngine { * Garbage collection * Permanently remove all expired and deleted data * - * @return boolean True if garbage collection was succesful, false on failure + * @return bool True if garbage collection was succesful, false on failure * @access public */ function gc() { @@ -99,7 +99,7 @@ class FileEngine extends CacheEngine { * @param string $key Identifier for the data * @param mixed $data Data to be cached * @param mixed $duration How long to cache the data, in seconds - * @return boolean True if the data was succesfully cached, false on failure + * @return bool True if the data was succesfully cached, false on failure * @access public */ function write($key, &$data, $duration) { @@ -162,7 +162,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 * @access public */ function delete($key) { @@ -174,8 +174,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 succesfully cleared, false otherwise + * @param bool $check Optional - only delete expired cache items + * @return bool True if the cache was succesfully cleared, false otherwise * @access public */ function clear($check) { diff --git a/cake/libs/cache/memcache.php b/cake/libs/cache/memcache.php index 1019ccc15..7e49757a2 100644 --- a/cake/libs/cache/memcache.php +++ b/cake/libs/cache/memcache.php @@ -55,7 +55,7 @@ class MemcacheEngine extends CacheEngine { * To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array()); * * @param array $setting 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 * @access public */ function init($settings = array()) { @@ -95,7 +95,7 @@ class MemcacheEngine extends CacheEngine { * @param string $key Identifier for the data * @param mixed $value Data to be cached * @param int $duration How long to cache the data, in seconds - * @return boolean True if the data was succesfully cached, false on failure + * @return bool True if the data was succesfully cached, false on failure * @access public */ function write($key, &$value, $duration) { @@ -115,7 +115,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 succesfully deleted, false if it didn't exist or couldn't be removed + * @return bool True if the value was succesfully deleted, false if it didn't exist or couldn't be removed * @access public */ function delete($key) { @@ -124,7 +124,7 @@ class MemcacheEngine extends CacheEngine { /** * Delete all keys from the cache * - * @return boolean True if the cache was succesfully cleared, false otherwise + * @return bool True if the cache was succesfully cleared, false otherwise * @access public */ function clear() { @@ -134,8 +134,8 @@ class MemcacheEngine extends CacheEngine { * connects to a server in connection pool * * @param string $host host ip address or name - * @param integer $port - * @return boolean True if memcache server was connected + * @param int $port + * @return bool True if memcache server was connected * @access public */ function connect($host, $port = 11211) { diff --git a/cake/libs/cache/model.php b/cake/libs/cache/model.php index 78be03dce..05900dbb6 100644 --- a/cake/libs/cache/model.php +++ b/cake/libs/cache/model.php @@ -55,8 +55,7 @@ class ModelEngine extends CacheEngine { * To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array()); * * @param array $setting array of setting for the engine - * @return boolean True if the engine has been successfully initialized, false if not - * @return boolean True if the engine has been succesfully initialized, false if not + * @return bool True if the engine has been successfully initialized, false if not */ function init($settings) { parent::init($settings); @@ -84,7 +83,7 @@ class ModelEngine extends CacheEngine { * @param string $key Identifier for the data * @param mixed $data Data to be cached * @param mixed $duration How long to cache the data, in seconds - * @return boolean True if the data was succesfully cached, false on failure + * @return bool True if the data was succesfully cached, false on failure * @access public */ function write($key, &$data, $duration) { @@ -127,7 +126,7 @@ class ModelEngine extends CacheEngine { * Delete a key from the cache * * @param string $key Identifier for the data - * @return boolean True if the value was succesfully deleted, false if it didn't exist or couldn't be removed + * @return bool True if the value was succesfully deleted, false if it didn't exist or couldn't be removed * @access public */ function delete($key) { @@ -136,7 +135,7 @@ class ModelEngine extends CacheEngine { /** * Delete all keys from the cache * - * @return boolean True if the cache was succesfully cleared, false otherwise + * @return bool True if the cache was succesfully cleared, false otherwise * @access public */ function clear() { diff --git a/cake/libs/cache/xcache.php b/cake/libs/cache/xcache.php index b2680f84c..3b9c63e2d 100644 --- a/cake/libs/cache/xcache.php +++ b/cake/libs/cache/xcache.php @@ -49,7 +49,7 @@ class XcacheEngine extends CacheEngine { * To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array()); * * @param array $setting 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 * @access public */ function init($settings) { @@ -64,7 +64,7 @@ class XcacheEngine extends CacheEngine { * @param string $key Identifier for the data * @param mixed $value Data to be cached * @param int $duration How long to cache the data, in seconds - * @return boolean True if the data was succesfully cached, false on failure + * @return bool True if the data was succesfully cached, false on failure * @access public */ function write($key, &$value, $duration) { @@ -87,7 +87,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 succesfully deleted, false if it didn't exist or couldn't be removed + * @return bool True if the value was succesfully deleted, false if it didn't exist or couldn't be removed * @access public */ function delete($key) { @@ -96,7 +96,7 @@ class XcacheEngine extends CacheEngine { /** * Delete all keys from the cache * - * @return boolean True if the cache was succesfully cleared, false otherwise + * @return bool True if the cache was succesfully cleared, false otherwise * @access public */ function clear() { @@ -118,7 +118,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 Revert changes + * @param bool Revert changes * @access protected */ function __auth($reverse = false) { diff --git a/cake/libs/cake_log.php b/cake/libs/cake_log.php index 65f6cb05d..e09d43c6c 100644 --- a/cake/libs/cake_log.php +++ b/cake/libs/cake_log.php @@ -65,7 +65,7 @@ class CakeLog { * * @param string $type Type of log, becomes part of the log's filename * @param string $msg Message to log - * @return boolean Success + * @return bool Success * @access public */ function write($type, $msg) { diff --git a/cake/libs/class_registry.php b/cake/libs/class_registry.php index 00d0b6e83..9a68c43b7 100644 --- a/cake/libs/class_registry.php +++ b/cake/libs/class_registry.php @@ -69,7 +69,7 @@ class ClassRegistry { * * @param string $key Key for the object in registry * @param mixed $object Object to store - * @return boolean True if the object was written, false if $key already exists + * @return bool True if the object was written, false if $key already exists * @access public */ function addObject($key, &$object) { @@ -98,7 +98,7 @@ class ClassRegistry { * Returns true if given key is present in the ClassRegistry. * * @param string $key Key to look for - * @return boolean true if key exists in registry, false otherwise + * @return bool true if key exists in registry, false otherwise * @access public */ function isKeySet($key) { diff --git a/cake/libs/configure.php b/cake/libs/configure.php index b40037993..fc431f1a4 100644 --- a/cake/libs/configure.php +++ b/cake/libs/configure.php @@ -364,7 +364,7 @@ class Configure extends Object { * * @param string $content Content to write on file * @param string $name Name to use for cache file - * @param boolean $write true if content should be written, false otherwise + * @param bool $write true if content should be written, false otherwise * @access private */ function __writeConfig($content, $name, $write = true) { @@ -518,7 +518,7 @@ class Configure extends Object { * If the alternative paths are set in this file * they will be added to the paths vars * - * @param boolean $boot Load application bootstrap (if true) + * @param bool $boot Load application bootstrap (if true) * @access private */ function __loadBootstrap($boot) { diff --git a/cake/libs/controller/components/acl.php b/cake/libs/controller/components/acl.php index ecdb9a2a2..03bde9945 100644 --- a/cake/libs/controller/components/acl.php +++ b/cake/libs/controller/components/acl.php @@ -75,7 +75,7 @@ class AclComponent extends Object { * @param string $aro * @param string $aco * @param string $action : default = * - * @return boolean + * @return bool */ function check($aro, $aco, $action = "*") { return $this->_instance->check($aro, $aco, $action); @@ -86,7 +86,7 @@ class AclComponent extends Object { * @param string $aro * @param string $aco * @param string $action : default = * - * @return boolean + * @return bool */ function allow($aro, $aco, $action = "*") { return $this->_instance->allow($aro, $aco, $action); @@ -97,7 +97,7 @@ class AclComponent extends Object { * @param string $aro * @param string $aco * @param string $action : default = * - * @return boolean + * @return bool */ function deny($aro, $aco, $action = "*") { return $this->_instance->deny($aro, $aco, $action); @@ -105,7 +105,7 @@ class AclComponent extends Object { /** * Pass-thru function for ACL inherit instance. * - * @return boolean + * @return bool */ function inherit($aro, $aco, $action = "*") { return $this->_instance->inherit($aro, $aco, $action); @@ -116,7 +116,7 @@ class AclComponent extends Object { * @param string $aro * @param string $aco * @param string $action : default = * - * @return boolean + * @return bool */ function grant($aro, $aco, $action = "*") { return $this->_instance->grant($aro, $aco, $action); @@ -127,7 +127,7 @@ class AclComponent extends Object { * @param string $aro * @param string $aco * @param string $action : default = * - * @return boolean + * @return bool */ function revoke($aro, $aco, $action = "*") { return $this->_instance->revoke($aro, $aco, $action); @@ -136,7 +136,7 @@ class AclComponent extends Object { * Sets the current ARO instance to object from getAro * * @param string $id - * @return boolean + * @return bool */ function setAro($id) { return $this->Aro = $this->_instance->getAro($id); @@ -145,7 +145,7 @@ class AclComponent extends Object { * Sets the current ACO instance to object from getAco * * @param string $id - * @return boolean + * @return bool */ function setAco($id) { return $this->Aco = $this->_instance->getAco($id); @@ -229,7 +229,6 @@ class DB_ACL extends AclBase { * Enter description here... * * @param object $component - * @return void */ function initialize(&$component) { $component->Aro = $this->Aro; @@ -317,7 +316,7 @@ class DB_ACL extends AclBase { /** * Allow * - * @return boolean + * @return bool */ function allow($aro, $aco, $actions = "*", $value = 1) { $perms = $this->getAclLink($aro, $aco); @@ -367,7 +366,7 @@ class DB_ACL extends AclBase { /** * Deny * - * @return boolean + * @return bool */ function deny($aro, $aco, $action = "*") { return $this->allow($aro, $aco, $action, -1); @@ -375,7 +374,7 @@ class DB_ACL extends AclBase { /** * Inherit * - * @return boolean + * @return bool */ function inherit($aro, $aco, $action = "*") { return $this->allow($aro, $aco, $action, 0); @@ -383,7 +382,7 @@ class DB_ACL extends AclBase { /** * Allow alias * - * @return boolean + * @return bool */ function grant($aro, $aco, $action = "*") { return $this->allow($aro, $aco, $action); @@ -391,7 +390,7 @@ class DB_ACL extends AclBase { /** * Deny alias * - * @return boolean + * @return bool */ function revoke($aro, $aco, $action = "*") { return $this->deny($aro, $aco, $action); @@ -482,7 +481,7 @@ class INI_ACL extends AclBase { * * @param string $aro * @param string $aco - * @return boolean + * @return bool */ function check($aro, $aco, $aco_action = null) { if ($this->config == null) { diff --git a/cake/libs/controller/components/auth.php b/cake/libs/controller/components/auth.php index 4467d816a..1e2b0a7d2 100644 --- a/cake/libs/controller/components/auth.php +++ b/cake/libs/controller/components/auth.php @@ -223,7 +223,6 @@ class AuthComponent extends Object { * * @access public * @param object $controller A reference to the instantiating controller object - * @return void */ function initialize(&$controller) { $this->params = $controller->params; @@ -257,7 +256,6 @@ class AuthComponent extends Object { * * @access public * @param object $controller A reference to the instantiating controller object - * @return void */ function startup(&$controller) { if (low($controller->name) == 'app' || (low($controller->name) == 'tests' && Configure::read() > 0)) { @@ -365,7 +363,6 @@ class AuthComponent extends Object { * * @access private * @param object $controller A reference to the instantiating controller object - * @return void */ function __setDefaults() { if (empty($this->userModel)) { @@ -398,7 +395,7 @@ class AuthComponent extends Object { * @param string $type * @param mixed $object object, model object, or model name * @param mixed $user The user to check the authorization of - * @return boolean True if $user is authorized, otherwise false + * @return bool True if $user is authorized, otherwise false */ function isAuthorized($type = null, $object = null, $user = null) { if (empty($user) && !$this->user()) { @@ -490,7 +487,6 @@ class AuthComponent extends Object { * @param string $action Controller action name * @param string $action Controller action name * @param string ... etc. - * @return void */ function allow() { $args = func_get_args(); @@ -507,7 +503,6 @@ class AuthComponent extends Object { * @param string $action Controller action name * @param string $action Controller action name * @param string ... etc. - * @return void * @see AuthComponent::allow() */ function deny() { @@ -525,7 +520,6 @@ class AuthComponent extends Object { * * @param array $map * @access public - * @return void */ function mapActions($map = array()) { $crud = array('create', 'read', 'update', 'delete'); @@ -549,7 +543,7 @@ class AuthComponent extends Object { * * @access public * @param mixed $data User object - * @return boolean True on login success, false on failure + * @return bool True on login success, false on failure */ function login($data = null) { $this->__setDefaults(); @@ -636,7 +630,7 @@ class AuthComponent extends Object { * valid forms of identifying users, see * AuthComponent::identify(). * @see AuthComponent::identify() - * @return boolean True if the user validates, false otherwise. + * @return bool True if the user validates, false otherwise. */ function validate($object, $user = null, $action = null) { if (empty($user)) { @@ -655,7 +649,7 @@ class AuthComponent extends Object { * @param string $action Optional. The controller/action path to validate the * user against. The current request action is used if * none is specified. - * @return boolean ACO node path + * @return bool ACO node path */ function action($action = ':controller/:action') { return r( @@ -803,7 +797,6 @@ class AuthComponent extends Object { * * @access public * @param object $controller - * @return void */ function shutdown(&$controller) { if ($this->_loggedIn) { diff --git a/cake/libs/controller/components/cookie.php b/cake/libs/controller/components/cookie.php index 79b776839..94c6f3aec 100644 --- a/cake/libs/controller/components/cookie.php +++ b/cake/libs/controller/components/cookie.php @@ -210,7 +210,7 @@ class CookieComponent extends Object { * * @param mixed $key * @param mixed $value - * @param boolean $encrypt + * @param bool $encrypt * @param string $expires * @access public */ @@ -358,7 +358,7 @@ class CookieComponent extends Object { * CookieComponent::write(string, string, boolean, '5 Days'); * * @param mixed $expires - * @return integer + * @return int * @access private */ function __expire($expires = null) { diff --git a/cake/libs/controller/components/email.php b/cake/libs/controller/components/email.php index 2dfb0a542..2fa131d24 100644 --- a/cake/libs/controller/components/email.php +++ b/cake/libs/controller/components/email.php @@ -593,7 +593,7 @@ class EmailComponent extends Object{ * Enter description here... * * @param string $value - * @param boolean $message + * @param bool $message * @return unknown * @access private */ @@ -610,7 +610,7 @@ class EmailComponent extends Object{ /** * wrapper form php mail function * - * @return boolean + * @return bool * @access private */ function __mail() { @@ -622,7 +622,7 @@ class EmailComponent extends Object{ /** * Sends out email via SMTP * - * @return boolean + * @return bool * @access private */ function __smtp() { @@ -692,8 +692,8 @@ class EmailComponent extends Object{ * Private method for sending data to SMTP connection * * @param string $data data to be sent to SMTP server - * @param boolean $check check for response from server - * @return boolean + * @param bool $check check for response from server + * @return bool * @access private */ function __sendData($data, $check = true) { @@ -711,7 +711,7 @@ class EmailComponent extends Object{ /** * SMTP authentication * - * @return boolean + * @return bool * @access private */ function __authenticate(){ diff --git a/cake/libs/controller/components/request_handler.php b/cake/libs/controller/components/request_handler.php index 0e04dd53b..fe1f25a50 100644 --- a/cake/libs/controller/components/request_handler.php +++ b/cake/libs/controller/components/request_handler.php @@ -133,7 +133,6 @@ class RequestHandlerComponent extends Object { * HTTP_ACCEPT * * @access public - * @return void */ function __construct() { $this->__acceptTypes = explode(',', env('HTTP_ACCEPT')); @@ -154,7 +153,6 @@ class RequestHandlerComponent extends Object { * as the first item. * * @param object A reference to the controller - * @return void * @see Router::parseExtensions() */ function initialize(&$controller) { @@ -184,7 +182,6 @@ class RequestHandlerComponent extends Object { * to the $data property of the controller, which can then be saved to a model object. * * @param object A reference to the controller - * @return void */ function startup(&$controller) { @@ -216,7 +213,6 @@ class RequestHandlerComponent extends Object { * * @param object A reference to the controller * @param mixed A string or array containing the redirect location - * @return void */ function beforeRedirect(&$controller, $url) { if (!$this->isAjax()) { @@ -338,7 +334,6 @@ class RequestHandlerComponent extends Object { * @param string $name The name of the Content-type, i.e. "html", "xml", "css" * @param mixed $type The Content-type or array of Content-types assigned to the name, * i.e. "text/html", or "application/xml" - * @return void * @access public */ function setContent($name, $type = null) { @@ -514,7 +509,6 @@ class RequestHandlerComponent extends Object { * * @param object $controller A reference to a controller object * @param string $type - * @return void * @access public * @see RequestHandlerComponent::setContent() * @see RequestHandlerComponent::respondAs() @@ -553,7 +547,7 @@ class RequestHandlerComponent extends Object { * @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. * @access public diff --git a/cake/libs/controller/components/security.php b/cake/libs/controller/components/security.php index f9211793f..105da7b2e 100644 --- a/cake/libs/controller/components/security.php +++ b/cake/libs/controller/components/security.php @@ -143,7 +143,6 @@ class SecurityComponent extends Object { * Sets the actions that require a POST request, or empty for all actions * * @access public - * @return void */ function requirePost() { $this->requirePost = func_get_args(); @@ -155,7 +154,6 @@ class SecurityComponent extends Object { * Sets the actions that require a request that is SSL-secured, or empty for all actions * * @access public - * @return void */ function requireSecure() { $this->requireSecure = func_get_args(); @@ -167,7 +165,6 @@ class SecurityComponent extends Object { * Sets the actions that require an authenticated request, or empty for all actions * * @access public - * @return void */ function requireAuth() { $this->requireAuth = func_get_args(); @@ -179,7 +176,6 @@ class SecurityComponent extends Object { * Sets the actions that require an HTTP-authenticated request, or empty for all actions * * @access public - * @return void */ function requireLogin() { $args = func_get_args(); @@ -326,7 +322,7 @@ class SecurityComponent extends Object { * Check if post is required * * @param object $controller - * @return boolean + * @return bool * @access private */ function __postRequired(&$controller) { @@ -345,7 +341,7 @@ class SecurityComponent extends Object { * Check if access requires secure connection * * @param object $controller - * @return boolean + * @return bool * @access private */ function __secureRequired(&$controller) { @@ -364,7 +360,7 @@ class SecurityComponent extends Object { * Check if authentication is required * * @param object $controller - * @return boolean + * @return bool * @access private */ function __authRequired(&$controller) { @@ -398,7 +394,7 @@ class SecurityComponent extends Object { * Check if login is required * * @param object $controller - * @return boolean + * @return bool * @access private */ function __loginRequired(&$controller) { @@ -442,7 +438,7 @@ class SecurityComponent extends Object { * Validate submited form * * @param object $controller - * @return boolean + * @return bool * @access private */ function __validatePost(&$controller) { @@ -572,7 +568,7 @@ class SecurityComponent extends Object { * Add authentication key for new form posts * * @param object $controller - * @return boolean + * @return bool * @access private */ function __generateToken(&$controller) { diff --git a/cake/libs/controller/components/session.php b/cake/libs/controller/components/session.php index 33a9e8a67..105073c35 100644 --- a/cake/libs/controller/components/session.php +++ b/cake/libs/controller/components/session.php @@ -134,7 +134,7 @@ class SessionComponent extends CakeSession { * In your controller: $this->Session->del('Controller.sessKey'); * * @param string $name - * @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. */ function del($name) { if ($this->__active === true) { @@ -148,7 +148,7 @@ class SessionComponent extends CakeSession { * In your controller: $this->Session->delete('Controller.sessKey'); * * @param string $name - * @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. * @access public */ function delete($name) { @@ -163,7 +163,7 @@ class SessionComponent extends CakeSession { * In your controller: $this->Session->check('Controller.sessKey'); * * @param string $name - * @return boolean true is session variable is set, false if not + * @return bool true is session variable is set, false if not * @access public */ function check($name) { @@ -220,7 +220,7 @@ class SessionComponent extends CakeSession { * * 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 * @access public */ function valid() { diff --git a/cake/libs/controller/controller.php b/cake/libs/controller/controller.php index 9beb1c3bf..2cefe2dbc 100644 --- a/cake/libs/controller/controller.php +++ b/cake/libs/controller/controller.php @@ -411,8 +411,8 @@ class Controller extends Object { * * @param mixed $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 - * @param boolean $exit If true, exit() will be called after the redirect + * @param int $status Optional HTTP status code + * @param bool $exit If true, exit() will be called after the redirect * @access public */ function redirect($url, $status = null, $exit = false) { @@ -607,7 +607,7 @@ class Controller extends Object { * @param string $action Action name to render * @param string $layout Layout to use * @param string $file File to use for rendering - * @return boolean Success + * @return bool Success * @access public */ function render($action = null, $layout = null, $file = null) { @@ -667,7 +667,7 @@ class Controller extends Object { * Gets the referring URL of 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 * @access public */ @@ -905,7 +905,7 @@ class Controller extends Object { * @param array $data POST'ed data organized by model and field * @param mixed $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 included in the returned conditions + * @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 * @access public */ @@ -1210,7 +1210,7 @@ class Controller extends Object { * 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 * @access protected */ function _beforeScaffold($method) { @@ -1220,7 +1220,7 @@ class Controller extends Object { * 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 * @access protected */ function _afterScaffoldSave($method) { @@ -1230,7 +1230,7 @@ class Controller extends Object { * 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 * @access protected */ function _afterScaffoldSaveError($method) { @@ -1242,7 +1242,7 @@ class Controller extends Object { * Method MUST return true in child classes * * @param string $method name of method called example index, edit, etc. - * @return boolean Success + * @return bool Success * @access protected */ function _scaffoldError($method) { diff --git a/cake/libs/debugger.php b/cake/libs/debugger.php index 1c242b33e..76c93e861 100644 --- a/cake/libs/debugger.php +++ b/cake/libs/debugger.php @@ -97,7 +97,7 @@ class Debugger extends Object { * @param string $file File on which error occurred * @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 * @access public */ function handleError($code, $description, $file = null, $line = null, $context = null) { diff --git a/cake/libs/file.php b/cake/libs/file.php index 622a4e21f..775d626de 100644 --- a/cake/libs/file.php +++ b/cake/libs/file.php @@ -81,7 +81,7 @@ class File extends Object { * Constructor * * @param string $path Path to file - * @param boolean $create Create file if it does not exist (if true) + * @param bool $create Create file if it does not exist (if true) * @param int $mode Mode to apply to the folder holding the file * @access private */ @@ -104,7 +104,6 @@ class File extends Object { /** * Closes the current file if it is opened * - * @return void * @access private */ function __destruct() { @@ -113,7 +112,7 @@ class File extends Object { /** * Creates the File. * - * @return boolean Success + * @return bool Success * @access public */ function create() { @@ -129,8 +128,8 @@ class File extends Object { * Opens the current file with a given $mode * * @param string $mode A valid 'fopen' mode string (r|w|a ...) - * @param boolean $force If true then the file will be re-opened even if its already opened, otherwise it won't - * @return boolean True on success, false on failure + * @param bool $force If true then the file will be re-opened even if its already opened, otherwise it won't + * @return bool True on success, false on failure * @access public */ function open($mode = 'r', $force = false) { @@ -153,7 +152,7 @@ class File extends Object { * * @param string $bytes where to start * @param string $mode - * @param boolean $force If true then the file will be re-opened even if its already opened, otherwise it won't + * @param bool $force If true then the file will be re-opened even if its already opened, otherwise it won't * @return mixed string on success, false on failure * @access public */ @@ -186,7 +185,7 @@ class File extends Object { * Sets or gets the offset for the currently opened file. * * @param mixed $offset The $offset in bytes to seek. If set to false then the current offset is returned. - * @param integer $seek PHP Constant SEEK_SET | SEEK_CUR | SEEK_END determining what the $offset is relative to + * @param int $seek PHP Constant SEEK_SET | SEEK_CUR | SEEK_END determining what the $offset is relative to * @return mixed True on success, false on failure (set mode), false on failure or integer offset on success (get mode) * @access public */ @@ -206,7 +205,7 @@ class File extends Object { * @param string $data Data to write to this File. * @param string $mode Mode of writing. {@link http://php.net/fwrite See fwrite()}. * @param string $force force the file to open - * @return boolean Success + * @return bool Success * @access public */ function write($data, $mode = 'w', $force = false) { @@ -237,7 +236,7 @@ class File extends Object { * * @param string $data Data to write * @param string $force force the file to open - * @return boolean Success + * @return bool Success * @access public */ function append($data, $force = false) { @@ -246,7 +245,7 @@ class File extends Object { /** * Closes the current file if it is opened. * - * @return boolean True if closing was successful or file was already closed, otherwise false + * @return bool True if closing was successful or file was already closed, otherwise false * @access public */ function close() { @@ -258,7 +257,7 @@ class File extends Object { /** * Deletes the File. * - * @return boolean Success + * @return bool Success * @access public */ function delete() { @@ -360,7 +359,7 @@ class File extends Object { /** * Returns true if the File exists. * - * @return boolean true if it exists, false otherwise + * @return bool true if it exists, false otherwise * @access public */ function exists() { @@ -382,7 +381,7 @@ class File extends Object { /** * Returns the Filesize, either in bytes or in human-readable format. * - * @param boolean $humanReadeble Data to write to this File. + * @param bool $humanReadeble Data to write to this File. * @return string|int filesize as int or as a human-readable string * @access public */ @@ -395,7 +394,7 @@ class File extends Object { /** * Returns true if the File is writable. * - * @return boolean true if its writable, false otherwise + * @return bool true if its writable, false otherwise * @access public */ function writable() { @@ -404,7 +403,7 @@ class File extends Object { /** * Returns true if the File is executable. * - * @return boolean true if its executable, false otherwise + * @return bool true if its executable, false otherwise * @access public */ function executable() { @@ -413,7 +412,7 @@ class File extends Object { /** * Returns true if the File is readable. * - * @return boolean true if file is readable, false otherwise + * @return bool true if file is readable, false otherwise * @access public */ function readable() { diff --git a/cake/libs/flay.php b/cake/libs/flay.php index 8b09ab5dd..16ca0d36f 100644 --- a/cake/libs/flay.php +++ b/cake/libs/flay.php @@ -69,8 +69,8 @@ class Flay extends Object{ * Returns given text translated to HTML using the Flay syntax. * * @param string $text String to format - * @param boolean $bare Set this to only do

transforms and > to >, no typography additions. - * @param boolean $allowHtml Set this to trim whitespace and disable all HTML + * @param bool $bare Set this to only do

transforms and > to >, no typography additions. + * @param bool $allowHtml Set this to trim whitespace and disable all HTML * @return string Formatted text * @access public */ @@ -198,7 +198,7 @@ class Flay extends Object{ * * @param array $words Words to look for and markup * @param string $string String to look in - * @param integer $max_snippets Max number of snippets to extract + * @param int $max_snippets Max number of snippets to extract * @return string String with words marked * @see colorMark * @access public @@ -265,7 +265,7 @@ class Flay extends Object{ * Return a fragment of a text, up to $length characters long, with an ellipsis after it. * * @param string $text Text to be truncated. - * @param integer $length Max length of text. + * @param int $length Max length of text. * @param string $ellipsis Sign to print after truncated text. * @return string Fragment * @access public diff --git a/cake/libs/folder.php b/cake/libs/folder.php index a8ba759ab..857c0f882 100644 --- a/cake/libs/folder.php +++ b/cake/libs/folder.php @@ -93,7 +93,7 @@ class Folder extends Object{ * Constructor. * * @param string $path Path to folder - * @param boolean $create Create folder if not found + * @param bool $create Create folder if not found * @param mixed $mode Mode (CHMOD) to apply to created folder, false to ignore */ function __construct($path = false, $create = false, $mode = false) { @@ -139,7 +139,7 @@ class Folder extends Object{ * Returns an array of the contents of the current directory, or false on failure. * The returned array holds two arrays: one of dirs and one of files. * - * @param boolean $sort + * @param bool $sort * @param mixed $exceptions either an array or boolean true will no grab dot files * @return mixed Contents of current directory as an array, false on failure * @access public @@ -239,7 +239,7 @@ class Folder extends Object{ * Returns true if given $path is a Windows path. * * @param string $path Path to check - * @return boolean true if windows path, false otherwise + * @return bool true if windows path, false otherwise * @access public * @static */ @@ -253,7 +253,7 @@ class Folder extends Object{ * Returns true if given $path is an absolute path. * * @param string $path Path to check - * @return boolean + * @return bool * @access public * @static */ @@ -265,7 +265,7 @@ class Folder extends Object{ * Returns true if given $path ends in a slash (i.e. is slash-terminated). * * @param string $path Path to check - * @return boolean true if path ends with slash, false otherwise + * @return bool true if path ends with slash, false otherwise * @access public * @static */ @@ -332,7 +332,7 @@ class Folder extends Object{ /** * Returns true if the File is in a given CakePath. * - * @return boolean + * @return bool * @access public */ function inCakePath($path = '') { @@ -343,7 +343,7 @@ class Folder extends Object{ /** * Returns true if the File is in given path. * - * @return boolean + * @return bool * @access public */ function inPath($path = '', $reverse = false) { @@ -365,7 +365,7 @@ class Folder extends Object{ * * @param string $pathname The directory structure to create * @param int $mode octal value 0755 - * @param boolean $recursive chmod recursively + * @param bool $recursive chmod recursively * @param array $exceptions array of files, directories to skip * @return bool Returns TRUE on success, FALSE on failure * @access public @@ -535,7 +535,7 @@ class Folder extends Object{ * Recursively Remove directories if system allow. * * @param string $path Path of directory to delete - * @return boolean Success + * @return bool Success * @access public */ function delete($path) { @@ -577,7 +577,7 @@ class Folder extends Object{ * Recursive directory copy. * * @param array $options (to, from, chmod, skip) - * @return boolean + * @return bool * @access public */ function copy($options = array()) { @@ -649,7 +649,7 @@ class Folder extends Object{ * Recursive directory move. * * @param array $options (to, from, chmod, skip) - * @return boolean Success + * @return bool Success * @access public */ function move($options) { diff --git a/cake/libs/http_socket.php b/cake/libs/http_socket.php index 7e02b98f4..4a0bb26e6 100644 --- a/cake/libs/http_socket.php +++ b/cake/libs/http_socket.php @@ -784,7 +784,7 @@ class HttpSocket extends CakeSocket { /** * Gets escape chars according to RFC 2616 (HTTP 1.1 specs). * - * @param boolean $hex true to get them as HEX values, false otherwise + * @param bool $hex true to get them as HEX values, false otherwise * @return array Escape chars * @access private */ @@ -808,8 +808,8 @@ class HttpSocket extends CakeSocket { * Resets the state of this HttpSocket instance to it's initial state (before Object::__construct got executed) or does * the same thing partially for the request and the response property only. * - * @param boolean $full If set to false only HttpSocket::response and HttpSocket::request are reseted - * @return boolean True on success + * @param bool $full If set to false only HttpSocket::response and HttpSocket::request are reseted + * @return bool True on success * @access public */ function reset($full = true) { diff --git a/cake/libs/i18n.php b/cake/libs/i18n.php index 39baa7363..58da06473 100644 --- a/cake/libs/i18n.php +++ b/cake/libs/i18n.php @@ -97,7 +97,7 @@ class I18n extends Object { * @param string $plural Plural string (if any) * @param string $domain Domain * @param string $category Category - * @param integer $count Count + * @param int $count Count * @param string $directory Directory that contains the file that is requesting translation * @return string translated strings. * @access public @@ -163,7 +163,7 @@ class I18n extends Object { * * @param string $type Type * @param integrer $n Number - * @return integer plural match + * @return int plural match * @access private */ function __pluralGuess(&$type, $n) { diff --git a/cake/libs/l10n.php b/cake/libs/l10n.php index c1b901bc1..215e85e45 100644 --- a/cake/libs/l10n.php +++ b/cake/libs/l10n.php @@ -382,7 +382,7 @@ class L10n extends Object { /** * Attempts to find the locale settings based on the HTTP_ACCEPT_LANGUAGE variable * - * @return boolean Success + * @return bool Success * @access private */ function __autoLanguage() { diff --git a/cake/libs/magic_db.php b/cake/libs/magic_db.php index 743ea2947..999c2a056 100644 --- a/cake/libs/magic_db.php +++ b/cake/libs/magic_db.php @@ -51,7 +51,7 @@ class MagicDb extends Object { * Reads a MagicDb from various formats * * @var $magicDb mixed Can be an array containing the db, a magic db as a string, or a filename pointing to a magic db in .db or magic.db.php format - * @return boolean Returns false if reading / validation failed or true on success. + * @return bool Returns false if reading / validation failed or true on success. * @author Felix **/ function read($magicDb = null) { @@ -137,7 +137,7 @@ class MagicDb extends Object { * Returns true if the MagicDb instance or the passed $magicDb is valid * * @param mixed $magicDb A $magicDb string / array to validate (optional) - * @return boolean True if the $magicDb / instance db validates, false if not + * @return bool True if the $magicDb / instance db validates, false if not * @access public */ function validates($magicDb = null) { diff --git a/cake/libs/model/behaviors/acl.php b/cake/libs/model/behaviors/acl.php index 7b5a7bb62..9cb0e28ee 100644 --- a/cake/libs/model/behaviors/acl.php +++ b/cake/libs/model/behaviors/acl.php @@ -47,7 +47,6 @@ class AclBehavior extends ModelBehavior { * Sets up the configuation for the model, and loads ACL models if they haven't been already * * @param mixed $config - * @return void */ function setup(&$model, $config = array()) { if (is_string($config)) { @@ -83,8 +82,7 @@ class AclBehavior extends ModelBehavior { /** * Creates a new ARO/ACO node bound to this record * - * @param boolean $created True if this is a new record - * @return void + * @param bool $created True if this is a new record */ function afterSave(&$model, $created) { if ($created) { @@ -107,7 +105,6 @@ class AclBehavior extends ModelBehavior { /** * Destroys the ARO/ACO node bound to the deleted record * - * @return void */ function afterDelete(&$model) { $type = $this->__typeMaps[low($this->settings[$model->name]['type'])]; diff --git a/cake/libs/model/behaviors/translate.php b/cake/libs/model/behaviors/translate.php index 21c752d97..f2ff21ee5 100644 --- a/cake/libs/model/behaviors/translate.php +++ b/cake/libs/model/behaviors/translate.php @@ -320,8 +320,8 @@ class TranslateBehavior extends ModelBehavior { * * @param object instance of model * @param mixed string with field, or array(field1, field2=>AssocName, field3), or null for bind all original translations - * @param boolead $reset - * @return boolean + * @param bool $reset + * @return bool */ function bindTranslation(&$model, $fields = null, $reset = true) { if (empty($fields)) { @@ -395,7 +395,7 @@ class TranslateBehavior extends ModelBehavior { * * @param object instance of model * @param mixed string with field, or array(field1, field2=>AssocName, field3), or null for unbind all original translations - * @return boolean + * @return bool */ function unbindTranslation(&$model, $fields = null) { if (empty($fields)) { diff --git a/cake/libs/model/behaviors/tree.php b/cake/libs/model/behaviors/tree.php index b3b6e3114..821eec7b1 100644 --- a/cake/libs/model/behaviors/tree.php +++ b/cake/libs/model/behaviors/tree.php @@ -61,8 +61,8 @@ class TreeBehavior extends ModelBehavior { * parameters to be saved. * * @param AppModel $model - * @param boolean $created indicates whether the node just saved was created or updated - * @return boolean true on success, false on failure + * @param bool $created indicates whether the node just saved was created or updated + * @return bool true on success, false on failure */ function afterSave(&$model, $created) { extract($this->settings[$model->name]); @@ -84,7 +84,7 @@ class TreeBehavior extends ModelBehavior { * Will delete the current node and all children using the deleteAll method and sync the table * * @param AppModel $model - * @return boolean true to continue, false to abort the delete + * @return bool true to continue, false to abort the delete */ function beforeDelete(&$model) { extract($this->settings[$model->name]); @@ -118,7 +118,7 @@ class TreeBehavior extends ModelBehavior { * * @since 1.2 * @param AppModel $model - * @return boolean true to continue, false to abort the save + * @return bool true to continue, false to abort the save */ function beforeSave(&$model) { extract($this->settings[$model->name]); @@ -182,7 +182,7 @@ class TreeBehavior extends ModelBehavior { * * @param AppModel $model * @param mixed $id The ID of the record to read or false to read all top level nodes - * @param boolean $direct whether to count direct, or all, children + * @param bool $direct whether to count direct, or all, children * @return int number of child nodes * @access public */ @@ -216,7 +216,7 @@ class TreeBehavior extends ModelBehavior { * * @param AppModel $model * @param mixed $id The ID of the record to read - * @param boolean $direct whether to return only the direct, or all, children + * @param bool $direct whether to return only the direct, or all, children * @param mixed $fields Either a single string of a field name, or an array of field names * @param string $order SQL ORDER BY conditions (e.g. "price DESC" or "name ASC") defaults to the tree order * @param int $limit SQL LIMIT clause, for calculating items per page. @@ -359,7 +359,7 @@ class TreeBehavior extends ModelBehavior { * @param AppModel $model * @param mixed $id The ID of the record to move * @param mixed $number how many places to move the node or true to move to last position - * @return boolean true on success, false on failure + * @return bool true on success, false on failure * @access public */ function movedown(&$model, $id = null, $number = 1) { @@ -403,7 +403,7 @@ class TreeBehavior extends ModelBehavior { * @param AppModel $model * @param mixed $id The ID of the record to move * @param mixed $number how many places to move the node, or true to move to first position - * @return boolean true on success, false on failure + * @return bool true on success, false on failure * @access public */ function moveup(&$model, $id = null, $number = 1) { @@ -449,7 +449,7 @@ class TreeBehavior extends ModelBehavior { * @todo Could be written to be faster, *maybe*. Ideally using a subquery and putting all the logic burden on the DB. * @param AppModel $model * @param string $mode parent or tree - * @return boolean true on success, false on failure + * @return bool true on success, false on failure * @access public */ function recover(&$model, $mode = 'parent') { @@ -488,8 +488,8 @@ class TreeBehavior extends ModelBehavior { * * @param AppModel $model * @param mixed $id The ID of the record to remove - * @param boolean $delete whether to delete the node after reparenting children (if any) - * @return boolean true on success, false on failure + * @param bool $delete whether to delete the node after reparenting children (if any) + * @return bool true on success, false on failure * @access public */ function removefromtree(&$model, $id = null, $delete = false) { @@ -622,7 +622,7 @@ class TreeBehavior extends ModelBehavior { * * @param AppModel $model * @param mixed $parentId - * @return boolean true on success, false on failure + * @return bool true on success, false on failure * @access protected */ function _setParent(&$model, $parentId = null) { diff --git a/cake/libs/model/connection_manager.php b/cake/libs/model/connection_manager.php index ea055c4d5..29f9498fe 100644 --- a/cake/libs/model/connection_manager.php +++ b/cake/libs/model/connection_manager.php @@ -144,7 +144,7 @@ class ConnectionManager extends Object { * * @param mixed $connName A string name of the connection, as defined in Connections config, * or an array containing the file and class name of the object. - * @return boolean True on success, null on failure or false if the class is already loaded + * @return bool True on success, null on failure or false if the class is already loaded */ function loadDataSource($connName) { $_this =& ConnectionManager::getInstance(); diff --git a/cake/libs/model/datasources/datasource.php b/cake/libs/model/datasources/datasource.php index 61236028a..7e35bb133 100644 --- a/cake/libs/model/datasources/datasource.php +++ b/cake/libs/model/datasources/datasource.php @@ -336,7 +336,7 @@ class DataSource extends Object { * Returns true if the DataSource supports the given interface (method) * * @param string $interface The name of the interface (method) - * @return boolean True on success + * @return bool True on success */ function isInterfaceSupported($interface) { $methods = get_class_methods(get_class($this)); @@ -349,7 +349,6 @@ class DataSource extends Object { * Sets the configuration for the DataSource * * @param array $config The configuration array - * @return void */ function setConfig($config) { if (is_array($this->_baseConfig)) { @@ -364,7 +363,6 @@ class DataSource extends Object { * * @param string $object The name of the object (model) to cache * @param mixed $data The description of the model, usually a string or array - * @return void */ function __cacheDescription($object, $data = null) { if ($this->cacheSources === false) { diff --git a/cake/libs/model/datasources/dbo/dbo_adodb.php b/cake/libs/model/datasources/dbo/dbo_adodb.php index fd575d5b9..d5a9d77c0 100644 --- a/cake/libs/model/datasources/dbo/dbo_adodb.php +++ b/cake/libs/model/datasources/dbo/dbo_adodb.php @@ -103,7 +103,7 @@ class DboAdodb extends DboSource { /** * Disconnects from database. * - * @return boolean True if the database could be disconnected, else false + * @return bool True if the database could be disconnected, else false */ function disconnect() { return $this->_adodb->Close(); @@ -149,7 +149,7 @@ class DboAdodb extends DboSource { * Begin a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions). */ function begin(&$model) { @@ -165,7 +165,7 @@ class DboAdodb extends DboSource { * Commit a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions, * or a transaction has not started). */ @@ -180,7 +180,7 @@ class DboAdodb extends DboSource { * Rollback a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions, * or a transaction has not started). */ @@ -306,7 +306,7 @@ class DboAdodb extends DboSource { * * @param string $data String to be prepared for use in an SQL statement * @param string $column_type The type of the column into which this data will be inserted - * @param boolean $safe Whether or not numeric data should be handled automagically if no column data is provided + * @param bool $safe Whether or not numeric data should be handled automagically if no column data is provided * @return string Quoted and escaped data */ function value($data, $column = null, $safe = false) { diff --git a/cake/libs/model/datasources/dbo/dbo_db2.php b/cake/libs/model/datasources/dbo/dbo_db2.php index 6932f3e57..39e0c5772 100644 --- a/cake/libs/model/datasources/dbo/dbo_db2.php +++ b/cake/libs/model/datasources/dbo/dbo_db2.php @@ -104,7 +104,7 @@ class DboDb2 extends DboSource { /** * Connects to the database using options in the given configuration array. * - * @return boolean True if the database could be connected, else false + * @return bool True if the database could be connected, else false */ function connect() { $config = $this->config; @@ -138,7 +138,7 @@ class DboDb2 extends DboSource { /** * Disconnects from database. * - * @return boolean True if the database could be disconnected, else false + * @return bool True if the database could be disconnected, else false */ function disconnect() { @db2_free_result($this->results); @@ -306,7 +306,7 @@ class DboDb2 extends DboSource { * started successfully, otherwise false. * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions). */ function begin(&$model) { @@ -322,7 +322,7 @@ class DboDb2 extends DboSource { * Commit a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions, * or a transaction has not started). */ @@ -340,7 +340,7 @@ class DboDb2 extends DboSource { * Rollback a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions, * or a transaction has not started). */ diff --git a/cake/libs/model/datasources/dbo/dbo_firebird.php b/cake/libs/model/datasources/dbo/dbo_firebird.php index b06b16326..86467f5ba 100644 --- a/cake/libs/model/datasources/dbo/dbo_firebird.php +++ b/cake/libs/model/datasources/dbo/dbo_firebird.php @@ -112,7 +112,7 @@ class DboFirebird extends DboSource { /** * Connects to the database using options in the given configuration array. * - * @return boolean True if the database could be connected, else false + * @return bool True if the database could be connected, else false */ function connect() { $config = $this->config; @@ -125,7 +125,7 @@ class DboFirebird extends DboSource { /** * Disconnects from database. * - * @return boolean True if the database could be disconnected, else false + * @return bool True if the database could be disconnected, else false */ function disconnect() { $this->connected = false; @@ -241,7 +241,7 @@ class DboFirebird extends DboSource { * * @param string $data String to be prepared for use in an SQL statement * @param string $column The column into which this data will be inserted - * @param boolean $safe Whether or not numeric data should be handled automagically if no column data is provided + * @param bool $safe Whether or not numeric data should be handled automagically if no column data is provided * @return string Quoted and escaped data */ function value($data, $column = null, $safe = false) { diff --git a/cake/libs/model/datasources/dbo/dbo_mssql.php b/cake/libs/model/datasources/dbo/dbo_mssql.php index 6ff70da4f..8d75f4626 100644 --- a/cake/libs/model/datasources/dbo/dbo_mssql.php +++ b/cake/libs/model/datasources/dbo/dbo_mssql.php @@ -97,7 +97,7 @@ class DboMssql extends DboSource { * MS SQL DBO driver constructor; sets SQL Server error reporting defaults * * @param array $config Configuration data from app/config/databases.php - * @return boolean True if connected successfully, false on error + * @return bool True if connected successfully, false on error */ function __construct($config, $autoConnect = true) { if ($autoConnect) { @@ -112,7 +112,7 @@ class DboMssql extends DboSource { /** * Connects to the database using options in the given configuration array. * - * @return boolean True if the database could be connected, else false + * @return bool True if the database could be connected, else false */ function connect() { $config = $this->config; @@ -145,7 +145,7 @@ class DboMssql extends DboSource { /** * Disconnects from database. * - * @return boolean True if the database could be disconnected, else false + * @return bool True if the database could be disconnected, else false */ function disconnect() { @mssql_free_result($this->results); @@ -221,7 +221,7 @@ class DboMssql extends DboSource { * * @param string $data String to be prepared for use in an SQL statement * @param string $column The column into which this data will be inserted - * @param boolean $safe Whether or not numeric data should be handled automagically if no column data is provided + * @param bool $safe Whether or not numeric data should be handled automagically if no column data is provided * @return string Quoted and escaped data */ function value($data, $column = null, $safe = false) { @@ -291,7 +291,7 @@ class DboMssql extends DboSource { * Begin a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions). */ function begin(&$model) { @@ -307,7 +307,7 @@ class DboMssql extends DboSource { * Commit a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions, * or a transaction has not started). */ @@ -322,7 +322,7 @@ class DboMssql extends DboSource { * Rollback a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions, * or a transaction has not started). */ @@ -551,7 +551,7 @@ class DboMssql extends DboSource { * Returns false if no rows matched. * * @param string $sql SQL statement - * @param boolean $cache Enables returning/storing cached query results + * @param bool $cache Enables returning/storing cached query results * @return array Array of resultset rows, or false if no rows matched */ function read(&$model, $queryData = array(), $recursive = null) { diff --git a/cake/libs/model/datasources/dbo/dbo_mysql.php b/cake/libs/model/datasources/dbo/dbo_mysql.php index 2fff53b22..f00c383f7 100644 --- a/cake/libs/model/datasources/dbo/dbo_mysql.php +++ b/cake/libs/model/datasources/dbo/dbo_mysql.php @@ -89,7 +89,7 @@ class DboMysql extends DboSource { /** * Connects to the database using options in the given configuration array. * - * @return boolean True if the database could be connected, else false + * @return bool True if the database could be connected, else false */ function connect() { $config = $this->config; @@ -115,7 +115,7 @@ class DboMysql extends DboSource { /** * Disconnects from database. * - * @return boolean True if the database could be disconnected, else false + * @return bool True if the database could be disconnected, else false */ function disconnect() { @mysql_free_result($this->results); @@ -198,7 +198,7 @@ class DboMysql extends DboSource { * * @param string $data String to be prepared for use in an SQL statement * @param string $column The column into which this data will be inserted - * @param boolean $safe Whether or not numeric data should be handled automagically if no column data is provided + * @param bool $safe Whether or not numeric data should be handled automagically if no column data is provided * @return string Quoted and escaped data */ function value($data, $column = null, $safe = false) { @@ -237,7 +237,7 @@ class DboMysql extends DboSource { * Begin a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions). */ function begin(&$model) { @@ -253,7 +253,7 @@ class DboMysql extends DboSource { * Commit a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions, * or a transaction has not started). */ @@ -268,7 +268,7 @@ class DboMysql extends DboSource { * Rollback a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions, * or a transaction has not started). */ @@ -440,7 +440,6 @@ class DboMysql extends DboSource { * Sets the database encoding * * @param string $enc Database encoding - * @return void */ function setEncoding($enc) { return $this->_execute('SET NAMES ' . $enc) != false; diff --git a/cake/libs/model/datasources/dbo/dbo_mysqli.php b/cake/libs/model/datasources/dbo/dbo_mysqli.php index f44cf25c5..748d3b4b1 100644 --- a/cake/libs/model/datasources/dbo/dbo_mysqli.php +++ b/cake/libs/model/datasources/dbo/dbo_mysqli.php @@ -85,7 +85,7 @@ class DboMysqli extends DboSource { /** * Connects to the database using options in the given configuration array. * - * @return boolean True if the database could be connected, else false + * @return bool True if the database could be connected, else false */ function connect() { $config = $this->config; @@ -104,7 +104,7 @@ class DboMysqli extends DboSource { /** * Disconnects from database. * - * @return boolean True if the database could be disconnected, else false + * @return bool True if the database could be disconnected, else false */ function disconnect() { @mysqli_free_result($this->results); @@ -184,7 +184,7 @@ class DboMysqli extends DboSource { * * @param string $data String to be prepared for use in an SQL statement * @param string $column The column into which this data will be inserted - * @param boolean $safe Whether or not numeric data should be handled automagically if no column data is provided + * @param bool $safe Whether or not numeric data should be handled automagically if no column data is provided * @return string Quoted and escaped data */ function value($data, $column = null, $safe = false) { @@ -223,7 +223,7 @@ class DboMysqli extends DboSource { * Begin a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions). */ function begin(&$model) { @@ -239,7 +239,7 @@ class DboMysqli extends DboSource { * Commit a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions, * or a transaction has not started). */ @@ -254,7 +254,7 @@ class DboMysqli extends DboSource { * Rollback a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions, * or a transaction has not started). */ @@ -424,7 +424,6 @@ class DboMysqli extends DboSource { * Sets the database encoding * * @param string $enc Database encoding - * @return void */ function setEncoding($enc) { return $this->_execute('SET NAMES ' . $enc) != false; diff --git a/cake/libs/model/datasources/dbo/dbo_odbc.php b/cake/libs/model/datasources/dbo/dbo_odbc.php index 473d35da5..a7c9ec761 100644 --- a/cake/libs/model/datasources/dbo/dbo_odbc.php +++ b/cake/libs/model/datasources/dbo/dbo_odbc.php @@ -94,7 +94,7 @@ class DboOdbc extends DboSource{ /** * Connects to the database using options in the given configuration array. * - * @return boolean True if the database could be connected, else false + * @return bool True if the database could be connected, else false */ function connect() { $config = $this->config; @@ -113,7 +113,7 @@ class DboOdbc extends DboSource{ /** * Disconnects from database. * - * @return boolean True if the database could be disconnected, else false + * @return bool True if the database could be disconnected, else false */ function disconnect() { return @odbc_close($this->connection); @@ -261,7 +261,7 @@ class DboOdbc extends DboSource{ * Begin a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions). */ function begin(&$model) { @@ -279,7 +279,7 @@ class DboOdbc extends DboSource{ * Commit a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions, * or a transaction has not started). */ @@ -298,7 +298,7 @@ class DboOdbc extends DboSource{ * Rollback a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions, * or a transaction has not started). */ diff --git a/cake/libs/model/datasources/dbo/dbo_oracle.php b/cake/libs/model/datasources/dbo/dbo_oracle.php index 0e086cb75..0073f13e1 100644 --- a/cake/libs/model/datasources/dbo/dbo_oracle.php +++ b/cake/libs/model/datasources/dbo/dbo_oracle.php @@ -133,7 +133,7 @@ class DboOracle extends DboSource { /** * Connects to the database using options in the given configuration array. * - * @return boolean True if the database could be connected, else false + * @return bool True if the database could be connected, else false * @access public */ function connect() { @@ -162,7 +162,7 @@ class DboOracle extends DboSource { * Sets the encoding language of the session * * @param string $lang language constant - * @return boolean + * @return bool */ function setEncoding($lang) { if (!$this->execute('ALTER SESSION SET NLS_LANGUAGE='.$lang)) { @@ -189,7 +189,7 @@ class DboOracle extends DboSource { /** * Disconnects from database. * - * @return boolean True if the database could be disconnected, else false + * @return bool True if the database could be disconnected, else false * @access public */ function disconnect() { @@ -345,7 +345,7 @@ class DboOracle extends DboSource { * Checks to see if a named sequence exists * * @param string $sequence - * @return boolean + * @return bool * @access public */ function sequenceExists($sequence) { @@ -359,7 +359,7 @@ class DboOracle extends DboSource { * Creates a database sequence * * @param string $sequence - * @return boolean + * @return bool * @access public */ function createSequence($sequence) { @@ -455,7 +455,7 @@ class DboOracle extends DboSource { * Begin a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions). */ function begin() { @@ -466,7 +466,7 @@ class DboOracle extends DboSource { * Rollback a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions, * or a transaction has not started). */ @@ -477,7 +477,7 @@ class DboOracle extends DboSource { * Commit a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions, * or a transaction has not started). */ diff --git a/cake/libs/model/datasources/dbo/dbo_postgres.php b/cake/libs/model/datasources/dbo/dbo_postgres.php index ecd1a44b4..24198471a 100644 --- a/cake/libs/model/datasources/dbo/dbo_postgres.php +++ b/cake/libs/model/datasources/dbo/dbo_postgres.php @@ -105,7 +105,7 @@ class DboPostgres extends DboSource { /** * Disconnects from database. * - * @return boolean True if the database could be disconnected, else false + * @return bool True if the database could be disconnected, else false */ function disconnect() { @pg_free_result($this->results); @@ -256,7 +256,7 @@ class DboPostgres extends DboSource { * Begin a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions). */ function begin(&$model) { @@ -273,7 +273,7 @@ class DboPostgres extends DboSource { * Commit a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions, * or a transaction has not started). */ @@ -289,7 +289,7 @@ class DboPostgres extends DboSource { * Rollback a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions, * or a transaction has not started). */ @@ -542,7 +542,7 @@ class DboPostgres extends DboSource { * Translates between PHP boolean values and PostgreSQL boolean values * * @param mixed $data Value to be translated - * @param boolean $quote True to quote value, false otherwise + * @param bool $quote True to quote value, false otherwise * @return mixed Converted boolean value */ function boolean($data, $quote = true) { @@ -565,7 +565,7 @@ class DboPostgres extends DboSource { * Sets the database encoding * * @param mixed $enc Database encoding - * @return boolean True on success, false on failure + * @return bool True on success, false on failure */ function setEncoding($enc) { return pg_set_client_encoding($this->connection, $enc) == 0; diff --git a/cake/libs/model/datasources/dbo/dbo_sqlite.php b/cake/libs/model/datasources/dbo/dbo_sqlite.php index 9e110e3e3..08046d3a4 100644 --- a/cake/libs/model/datasources/dbo/dbo_sqlite.php +++ b/cake/libs/model/datasources/dbo/dbo_sqlite.php @@ -98,7 +98,7 @@ class DboSqlite extends DboSource { /** * Disconnects from database. * - * @return boolean True if the database could be disconnected, else false + * @return bool True if the database could be disconnected, else false */ function disconnect() { @sqlite_close($this->connection); @@ -205,7 +205,7 @@ class DboSqlite extends DboSource { * Begin a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions). */ function begin (&$model) { @@ -221,7 +221,7 @@ class DboSqlite extends DboSource { * Commit a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions, * or a transaction has not started). */ @@ -236,7 +236,7 @@ class DboSqlite extends DboSource { * Rollback a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions, * or a transaction has not started). */ diff --git a/cake/libs/model/datasources/dbo/dbo_sybase.php b/cake/libs/model/datasources/dbo/dbo_sybase.php index b5c9f8c40..d90cac299 100644 --- a/cake/libs/model/datasources/dbo/dbo_sybase.php +++ b/cake/libs/model/datasources/dbo/dbo_sybase.php @@ -87,7 +87,7 @@ class DboSybase extends DboSource { /** * Connects to the database using options in the given configuration array. * - * @return boolean True if the database could be connected, else false + * @return bool True if the database could be connected, else false */ function connect() { $config = $this->config; @@ -107,7 +107,7 @@ class DboSybase extends DboSource { /** * Disconnects from database. * - * @return boolean True if the database could be disconnected, else false + * @return bool True if the database could be disconnected, else false */ function disconnect() { $this->connected = !@sybase_close($this->connection); @@ -184,7 +184,7 @@ class DboSybase extends DboSource { * * @param string $data String to be prepared for use in an SQL statement * @param string $column The column into which this data will be inserted - * @param boolean $safe Whether or not numeric data should be handled automagically if no column data is provided + * @param bool $safe Whether or not numeric data should be handled automagically if no column data is provided * @return string Quoted and escaped data */ function value($data, $column = null, $safe = false) { @@ -217,7 +217,7 @@ class DboSybase extends DboSource { * Begin a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions). */ function begin(&$model) { @@ -233,7 +233,7 @@ class DboSybase extends DboSource { * Commit a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions, * or a transaction has not started). */ @@ -248,7 +248,7 @@ class DboSybase extends DboSource { * Rollback a transaction * * @param unknown_type $model - * @return boolean True on success, false on fail + * @return bool True on success, false on fail * (i.e. if the database/model does not support transactions, * or a transaction has not started). */ diff --git a/cake/libs/model/datasources/dbo_source.php b/cake/libs/model/datasources/dbo_source.php index dd587dbf4..5bac7b92a 100644 --- a/cake/libs/model/datasources/dbo_source.php +++ b/cake/libs/model/datasources/dbo_source.php @@ -102,7 +102,7 @@ class DboSource extends DataSource { * Reconnects to database server with optional new settings * * @param array $config An array defining the new configuration settings - * @return boolean True on success, false on failure + * @return bool True on success, false on failure */ function reconnect($config = null) { $this->disconnect(); @@ -284,7 +284,7 @@ class DboSource extends DataSource { * Returns false if no rows matched. * * @param string $sql SQL statement - * @param boolean $cache Enables returning/storing cached query results + * @param bool $cache Enables returning/storing cached query results * @return array Array of resultset rows, or false if no rows matched */ function fetchAll($sql, $cache = true, $modelName = null) { @@ -363,7 +363,7 @@ class DboSource extends DataSource { /** * Checks if it's connected to the database * - * @return boolean True if the database is connected, else false + * @return bool True if the database is connected, else false */ function isConnected() { return $this->connected; @@ -371,7 +371,7 @@ class DboSource extends DataSource { /** * Outputs the contents of the queries log. * - * @param boolean $sorted + * @param bool $sorted */ function showLog($sorted = false) { if ($sorted) { @@ -448,7 +448,7 @@ class DboSource extends DataSource { * Gets full table name including prefix * * @param mixed $model - * @param boolean $quote + * @param bool $quote * @return string Full quoted table name */ function fullTableName($model, $quote = true) { @@ -470,7 +470,7 @@ class DboSource extends DataSource { * @param Model $model * @param array $fields * @param array $values - * @return boolean Success + * @return bool Success */ function create(&$model, $fields = null, $values = null) { $fieldInsert = array(); @@ -519,7 +519,7 @@ class DboSource extends DataSource { * * @param Model $model * @param array $queryData - * @param integer $recursive Number of levels of association + * @param int $recursive Number of levels of association * @return unknown */ function read(&$model, $queryData = array(), $recursive = null) { @@ -661,7 +661,7 @@ class DboSource extends DataSource { * @param unknown_type $queryData * @param unknown_type $external * @param unknown_type $resultSet - * @param integer $recursive Number of levels of association + * @param int $recursive Number of levels of association * @param array $stack */ function queryAssociation(&$model, &$linkModel, $type, $association, $assocData, &$queryData, $external = false, &$resultSet, $recursive, $stack) { @@ -1284,7 +1284,7 @@ class DboSource extends DataSource { * * @param Model $model * @param mixed $conditions - * @return boolean Success + * @return bool Success */ function delete(&$model, $conditions = null) { $query = $this->defaultConditions($model, $conditions); @@ -1362,7 +1362,7 @@ class DboSource extends DataSource { * @param Model $model * @param string $alias Alias tablename * @param mixed $fields - * @param boolean $quote If false, returns fields array unquoted + * @param bool $quote If false, returns fields array unquoted * @return array */ function fields(&$model, $alias = null, $fields = array(), $quote = true) { @@ -1794,7 +1794,7 @@ class DboSource extends DataSource { * * @param Model $model Model to search * @param string $sql SQL WHERE clause (condition only, not the "WHERE" part) - * @return boolean True if the table has a matching record, else false + * @return bool True if the table has a matching record, else false */ function hasAny($model, $sql) { $sql = $this->conditions($sql); diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index 1f47343ca..16439ee45 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -333,7 +333,7 @@ class Model extends Overloadable { /** * Constructor. Binds the Model's database table to the object. * - * @param integer $id + * @param int $id * @param string $table Name of database table to use. * @param DataSource $ds DataSource connection object. */ @@ -518,8 +518,7 @@ class Model extends Overloadable { * to the originals defined in the model * * @param array $params - * @param boolean $permanent - * @return void + * @param bool $permanent */ function bind($model, $options, $permanent = true) { if (!is_array($model)) { @@ -556,8 +555,8 @@ class Model extends Overloadable { * to the originals defined in the model * * @param array $params - * @param boolean $reset - * @return boolean Always true + * @param bool $reset + * @return bool Always true */ function bindModel($params, $reset = true) { @@ -593,8 +592,8 @@ class Model extends Overloadable { * * * @param array $params - * @param boolean $reset - * @return boolean Always true + * @param bool $reset + * @return bool Always true */ function unbindModel($params, $reset = true) { foreach ($params as $assoc => $models) { @@ -912,7 +911,7 @@ class Model extends Overloadable { * Returns true if this Model has given field in its database table. * * @param string $name Name of field to look for - * @return boolean + * @return bool */ function hasField($name) { if (is_array($name)) { @@ -1031,8 +1030,8 @@ class Model extends Overloadable { * * @param string $name Name of the table field * @param mixed $value Value of the field - * @param boolean $validate Whether or not this model should validate before saving (defaults to false) - * @return boolean True on success save + * @param bool $validate Whether or not this model should validate before saving (defaults to false) + * @return bool True on success save */ function saveField($name, $value, $validate = false) { return $this->save(array($this->name => array($name => $value)), $validate, array($name)); @@ -1042,9 +1041,9 @@ class Model extends Overloadable { * By default, validation occurs before save. * * @param array $data Data to save. - * @param boolean $validate If set, validation will be done before the save + * @param bool $validate If set, validation will be done before the save * @param array $fieldList List of fields to allow to be written - * @return boolean success + * @return bool success */ function save($data = null, $validate = true, $fieldList = array()) { $db =& ConnectionManager::getDataSource($this->useDbConfig); @@ -1242,7 +1241,7 @@ class Model extends Overloadable { * * @param mixed $conditions * @param mixed $fields - * @return boolean True on success, false on failure + * @return bool True on success, false on failure */ function updateAll($fields, $conditions = true) { $db =& ConnectionManager::getDataSource($this->useDbConfig); @@ -1253,7 +1252,7 @@ class Model extends Overloadable { * * @param mixed $id * @see function del - * @return boolean True on success + * @return bool True on success */ function remove($id = null, $cascade = true) { return $this->del($id, $cascade); @@ -1262,7 +1261,7 @@ class Model extends Overloadable { * Removes record for given id. If no id is given, the current id is used. Returns true on success. * * @param mixed $id Id of record to delete - * @return boolean True on success + * @return bool True on success */ function del($id = null, $cascade = true) { if (!empty($id)) { @@ -1305,7 +1304,7 @@ class Model extends Overloadable { * Alias for del() * * @param mixed $id Id of record to delete - * @return boolean True on success + * @return bool True on success */ function delete($id = null, $cascade = true) { return $this->del($id, $cascade); @@ -1372,7 +1371,7 @@ class Model extends Overloadable { * * @param mixed $conditions * @param mixed $fields - * @return boolean True on success, false on failure + * @return bool True on success, false on failure */ function deleteAll($conditions, $cascade = true) { if (empty($conditions)) { @@ -1395,8 +1394,8 @@ class Model extends Overloadable { /** * Returns true if a record with set id exists. * - * @param boolean $reset if true will force database query - * @return boolean True if such a record exists + * @param bool $reset if true will force database query + * @return bool True if such a record exists */ function exists($reset = false) { if ($this->getID() === false) { @@ -1411,7 +1410,7 @@ class Model extends Overloadable { * Returns true if a record that meets given conditions exists * * @param array $conditions SQL conditions array - * @return boolean True if such a record exists + * @return bool True if such a record exists */ function hasAny($conditions = null) { return ($this->find('count', array('conditions' => $conditions, 'recursive' => -1)) != false); @@ -1618,8 +1617,8 @@ class Model extends Overloadable { * False if any fields passed match any (by default, all if $or = false) of their matching values. * * @param array $fields Field/value pairs to search (if no values specified, they are pulled from $this->data) - * @param boolean $or If false, all fields specified must match in order for a false return value - * @return boolean False if any records matching any fields are found + * @param bool $or If false, all fields specified must match in order for a false return value + * @return bool False if any records matching any fields are found */ function isUnique($fields, $or = true) { if (!is_array($fields)) { @@ -1730,7 +1729,7 @@ class Model extends Overloadable { /** * Returns true if all fields pass validation, otherwise false. * - * @return boolean True if there are no errors + * @return bool True if there are no errors */ function validates($data = array()) { if (!empty($data)) { @@ -1856,7 +1855,6 @@ class Model extends Overloadable { * * @param string $field The name of the field to invalidate * @param mixed $value - * @return void */ function invalidate($field, $value = null) { if (!is_array($this->validationErrors)) { @@ -2000,7 +1998,6 @@ class Model extends Overloadable { * Sets the ID of the last record this Model inserted * * @param mixed $id - * @return void */ function setInsertID($id) { $this->__insertID = $id; @@ -2027,7 +2024,7 @@ class Model extends Overloadable { * Sets the DataSource to which this model is bound * * @param string $dataSource The name of the DataSource, as defined in Connections.php - * @return boolean True on success + * @return bool True on success */ function setDataSource($dataSource = null) { if ($dataSource != null) { @@ -2094,7 +2091,7 @@ class Model extends Overloadable { * Before find callback * * @param array $queryData Data used to execute this query, i.e. conditions, order, etc. - * @return boolean True if the operation should continue, false if it should abort + * @return bool True if the operation should continue, false if it should abort */ function beforeFind($queryData) { return true; @@ -2103,7 +2100,7 @@ class Model extends Overloadable { * After find callback. Can be used to modify any results returned by find and findAll. * * @param mixed $results The results of the find operation - * @param boolean $primary Whether this model is being queried directly (vs. being queried as an association) + * @param bool $primary Whether this model is being queried directly (vs. being queried as an association) * @return mixed Result of the find operation */ function afterFind($results, $primary = false) { @@ -2112,7 +2109,7 @@ class Model extends Overloadable { /** * Before save callback * - * @return boolean True if the operation should continue, false if it should abort + * @return bool True if the operation should continue, false if it should abort */ function beforeSave() { return true; @@ -2120,15 +2117,14 @@ class Model extends Overloadable { /** * After save callback * - * @param boolean $created True if this save created a new record - * @return void + * @param bool $created True if this save created a new record */ function afterSave($created) { } /** * Before delete callback * - * @return boolean True if the operation should continue, false if it should abort + * @return bool True if the operation should continue, false if it should abort */ function beforeDelete() { return true; @@ -2136,7 +2132,6 @@ class Model extends Overloadable { /** * After delete callback * - * @return void */ function afterDelete() { } @@ -2151,7 +2146,6 @@ class Model extends Overloadable { /** * DataSource error callback * - * @return void */ function onError() { } @@ -2160,7 +2154,7 @@ class Model extends Overloadable { * * @param string $type If null this deletes cached views if Cache.check is true * Will be used to allow deleting query cache also - * @return boolean true on delete + * @return bool true on delete */ function _clearCache($type = null) { if ($type === null) { @@ -2193,7 +2187,6 @@ class Model extends Overloadable { /** * Called when unserializing a model * - * @return void */ function __wakeup() { } diff --git a/cake/libs/model/schema.php b/cake/libs/model/schema.php index 3c2558d97..9a407c8a7 100644 --- a/cake/libs/model/schema.php +++ b/cake/libs/model/schema.php @@ -100,7 +100,7 @@ class CakeSchema extends Object { * * @param array $events schema object properties * @access public - * @return boolean + * @return bool */ function before($event = array()) { return true; @@ -110,7 +110,6 @@ class CakeSchema extends Object { * * @param array $events schema object properties * @access public - * @return void */ function after($event = array()) { } diff --git a/cake/libs/object.php b/cake/libs/object.php index 2e1f447b4..c1ddd2e86 100644 --- a/cake/libs/object.php +++ b/cake/libs/object.php @@ -181,7 +181,7 @@ class Object { * * @param string $name name of the class to persist * @param string $object the object to persist - * @return boolean Success + * @return bool Success * @access protected * @todo add examples to manual */ diff --git a/cake/libs/overloadable_php4.php b/cake/libs/overloadable_php4.php index a732a2dc8..9dea8b989 100644 --- a/cake/libs/overloadable_php4.php +++ b/cake/libs/overloadable_php4.php @@ -74,7 +74,7 @@ class Overloadable extends Object { * @param string $method Method name * @param array $params Parameters to send to method * @param mixed $return Where to store return value from method - * @return boolean Success + * @return bool Success * @access private */ function __call($method, $params, &$return) { @@ -126,7 +126,7 @@ class Overloadable2 extends Object { * @param string $method Method name * @param array $params Parameters to send to method * @param mixed $return Where to store return value from method - * @return boolean Success + * @return bool Success * @access private */ function __call($method, $params, &$return) { @@ -142,7 +142,7 @@ class Overloadable2 extends Object { * * @param mixed $name What to get * @param mixed $value Where to store returned value - * @return boolean Success + * @return bool Success * @access private */ function __get($name, &$value) { @@ -155,7 +155,7 @@ class Overloadable2 extends Object { * * @param mixed $name What to set * @param mixed $value Value to set - * @return boolean Success + * @return bool Success * @access private */ function __set($name, $value) { diff --git a/cake/libs/overloadable_php5.php b/cake/libs/overloadable_php5.php index 9d04c0b33..8b4997022 100644 --- a/cake/libs/overloadable_php5.php +++ b/cake/libs/overloadable_php5.php @@ -89,7 +89,7 @@ class Overloadable2 extends Object { * * @param mixed $name What to get * @param mixed $value Where to store returned value - * @return boolean Success + * @return bool Success * @access private */ function __get($name) { @@ -101,7 +101,7 @@ class Overloadable2 extends Object { * * @param mixed $name What to set * @param mixed $value Value to set - * @return boolean Success + * @return bool Success * @access private */ function __set($name, $value) { diff --git a/cake/libs/router.php b/cake/libs/router.php index 36ba8ef34..1f4da2abb 100644 --- a/cake/libs/router.php +++ b/cake/libs/router.php @@ -531,7 +531,7 @@ class Router extends Object { /** * Gets parameter information * - * @param boolean $current Get current parameter (true) + * @param bool $current Get current parameter (true) * @return array Parameter information * @access public * @static @@ -547,7 +547,7 @@ class Router extends Object { * Gets URL parameter by name * * @param string $name Parameter name - * @param boolean $current Current parameter + * @param bool $current Current parameter * @return string Parameter value * @access public * @static @@ -563,7 +563,7 @@ class Router extends Object { /** * Gets path information * - * @param boolean $current Current parameter + * @param bool $current Current parameter * @return array * @access public * @static @@ -592,7 +592,7 @@ class Router extends Object { * * @param $which A zero-based array index representing the route to move. For example, * if 3 routes have been added, the last route would be 2. - * @return boolean Retuns false if no route exists at the position specified by $which. + * @return bool Retuns false if no route exists at the position specified by $which. * @access public * @static */ @@ -622,7 +622,7 @@ class Router extends Object { * or an array specifying any of the following: 'controller', 'action', * and/or 'plugin', in addition to named arguments (keyed array elements), * and standard URL arguments (indexed array elements) - * @param boolean $full If true, the full base URL will be prepended to the result + * @param bool $full If true, the full base URL will be prepended to the result * @return string Full translated URL with base path. * @access public * @static diff --git a/cake/libs/sanitize.php b/cake/libs/sanitize.php index 2e99c1824..fd9618838 100644 --- a/cake/libs/sanitize.php +++ b/cake/libs/sanitize.php @@ -83,7 +83,7 @@ class Sanitize{ * Returns given string safe for display as HTML. Renders entities. * * @param string $string String from where to strip tags - * @param boolean $remove If true, the string is stripped of all HTML tags + * @param bool $remove If true, the string is stripped of all HTML tags * @return string Sanitized string * @access public * @static diff --git a/cake/libs/security.php b/cake/libs/security.php index f31c75d9b..bbd4558c0 100644 --- a/cake/libs/security.php +++ b/cake/libs/security.php @@ -97,7 +97,7 @@ class Security extends Object { * Validate authorization hash. * * @param string $authKey Authorization hash - * @return boolean Success + * @return bool Success * @access public * @static */ @@ -149,7 +149,6 @@ class Security extends Object { * Security::hash(). * * @param string $hash Method to use (sha1/sha256/md5) - * @return void * @access public * @static * @see Security::hash() diff --git a/cake/libs/session.php b/cake/libs/session.php index a54e9da4a..67fcf27a2 100644 --- a/cake/libs/session.php +++ b/cake/libs/session.php @@ -111,7 +111,7 @@ class CakeSession extends Object { * Constructor. * * @param string $base The base path for the Session - * @param boolean $start Should session be started right now + * @param bool $start Should session be started right now * @access public */ function __construct($base = null, $start = true) { @@ -160,7 +160,7 @@ class CakeSession extends Object { * Returns true if given variable is set in session. * * @param string $name Variable name to check for - * @return boolean True if variable is there + * @return bool True if variable is there * @access public */ function check($name) { @@ -199,7 +199,7 @@ class CakeSession extends Object { * Removes a variable from session. * * @param string $name Session variable to remove - * @return boolean Success + * @return bool Success * @access public */ function del($name) { @@ -262,7 +262,7 @@ class CakeSession extends Object { /** * Returns true if session is valid. * - * @return boolean Success + * @return bool Success * @access public */ function valid() { @@ -350,7 +350,7 @@ class CakeSession extends Object { * * @param mixed $name Name of variable * @param string $value Value to write - * @return boolean True if the write was successful, false if the write failed + * @return bool True if the write was successful, false if the write failed * @access public */ function write($name, $value) { @@ -590,7 +590,7 @@ class CakeSession extends Object { /** * Method called on open of a database session. * - * @return boolean Success + * @return bool Success * @access private */ function __open() { @@ -599,7 +599,7 @@ class CakeSession extends Object { /** * Method called on close of a database session. * - * @return boolean Success + * @return bool Success * @access private */ function __close() { @@ -636,7 +636,7 @@ class CakeSession extends Object { * * @param mixed $key The name of the var * @param mixed $value The value of the var - * @return boolean Success + * @return bool Success * @access private */ function __write($key, $value) { @@ -679,7 +679,7 @@ class CakeSession extends Object { * Method called on the destruction of a database session. * * @param int $key Key that uniquely identifies session in database - * @return boolean Success + * @return bool Success * @access private */ function __destroy($key) { @@ -692,7 +692,7 @@ class CakeSession extends Object { * Helper function called on gc for database sessions. * * @param int $expires Timestamp (defaults to current time) - * @return boolean Success + * @return bool Success * @access private */ function __gc($expires = null) { diff --git a/cake/libs/set.php b/cake/libs/set.php index c34d54466..4072b65a5 100644 --- a/cake/libs/set.php +++ b/cake/libs/set.php @@ -109,7 +109,7 @@ class Set extends Object { * Filters empty elements out of a route array, excluding '0'. * * @param mixed $var Either an array to filter, or value when in callback - * @param boolean $isArray Force to tell $var is an array when $var is empty + * @param bool $isArray Force to tell $var is an array when $var is empty * @return mixed Either filtered array, or true/false when in callback * @access public */ @@ -253,7 +253,7 @@ class Set extends Object { * Checks to see if all the values in the array are numeric * * @param array $array The array to check. If null, the value of the current Set object - * @return boolean true if values are numeric, false otherwise + * @return bool true if values are numeric, false otherwise * @access public */ function numeric($array = null) { @@ -484,7 +484,7 @@ class Set extends Object { * * @param mixed $data Data to check on * @param mixed $path A dot-separated string. - * @return boolean true if path is found, false otherwise + * @return bool true if path is found, false otherwise * @access public */ function check($data, $path = null) { @@ -557,7 +557,7 @@ class Set extends Object { * * @param array $val1 First value * @param array $val2 Second value - * @return boolean true if they are equal, false otherwise + * @return bool true if they are equal, false otherwise * @access public */ function isEqual($val1, $val2 = null) { @@ -573,7 +573,7 @@ class Set extends Object { * * @param array $val1 First value * @param array $val2 Second value - * @return boolean true if $val1 contains $val2, false otherwise + * @return bool true if $val1 contains $val2, false otherwise * @access public */ function contains($val1, $val2 = null) { @@ -621,9 +621,9 @@ class Set extends Object { * Normalizes a string or array list. * * @param mixed $list List to normalize - * @param boolean $assoc If true, $list will be converted to an associative array + * @param bool $assoc If true, $list will be converted to an associative array * @param string $sep If $list is a string, it will be split into an array with $sep - * @param boolean $trim If true, separated strings will be trimmed + * @param bool $trim If true, separated strings will be trimmed * @return array * @access public */ diff --git a/cake/libs/socket.php b/cake/libs/socket.php index 35dfd3bf8..83db17182 100644 --- a/cake/libs/socket.php +++ b/cake/libs/socket.php @@ -106,7 +106,7 @@ class CakeSocket extends Object { /** * Connect the socket to the given host and port. * - * @return boolean Success + * @return bool Success * @access public */ function connect() { @@ -196,7 +196,7 @@ class CakeSocket extends Object { * Write data to the socket. * * @param string $data The data to write to the socket - * @return boolean Success + * @return bool Success * @access public */ function write($data) { @@ -233,7 +233,7 @@ class CakeSocket extends Object { /** * Abort socket operation. * - * @return boolean Success + * @return bool Success * @access public */ function abort() { @@ -241,7 +241,7 @@ class CakeSocket extends Object { /** * Disconnect the socket from the current connection. * - * @return boolean Success + * @return bool Success * @access public */ function disconnect() { diff --git a/cake/libs/string.php b/cake/libs/string.php index 1bb2c817e..d590420d3 100644 --- a/cake/libs/string.php +++ b/cake/libs/string.php @@ -196,8 +196,8 @@ class String extends Object { * * @param multi-byte string $haystack * @param multi-byte string $needle - * @param integer $offset - * @return integer or false + * @param int $offset + * @return int|boolean * @access public * @static */ @@ -235,8 +235,8 @@ class String extends Object { * * @param multi-byte string $haystack * @param multi-byte string $needle - * @param integer $offset - * @return integer or false + * @param int $offset + * @return int|boolean * @access public * @static */ @@ -669,7 +669,7 @@ class String extends Object { /** * Find the related code folding values for $char * - * @param integer $char decimal value of character + * @param int $char decimal value of character * @param string $type * @return array * @access private diff --git a/cake/libs/validation.php b/cake/libs/validation.php index 984c31267..6c11b89ee 100644 --- a/cake/libs/validation.php +++ b/cake/libs/validation.php @@ -115,7 +115,7 @@ class Validation extends Object { * array('check' => 'valueToCheck'); * * @param mixed $check Value to check - * @return boolean Success + * @return bool Success * @access public */ function alphaNumeric($check) { @@ -145,7 +145,7 @@ class Validation extends Object { * @param string $check Value to check for length * @param int $min Minimum value in range (inclusive) * @param int $max Maximum value in range (inclusive) - * @return boolean Success + * @return bool Success * @access public */ function between($check, $min, $max) { @@ -165,7 +165,7 @@ class Validation extends Object { * array('check' => 'valueToCheck'); * * @param mixed $check Value to check - * @return boolean Success + * @return bool Success * @access public */ function blank($check) { @@ -191,9 +191,9 @@ class Validation extends Object { * @param mixed $type 'all' may be passed as a sting, defaults to fast which checks format of most major credit cards * if an array is used only the values of the array are checked. * Example: array('amex', 'bankcard', 'maestro') - * @param boolean $deep set to true this will check the Luhn algorithm of the credit card. + * @param bool $deep set to true this will check the Luhn algorithm of the credit card. * @param string $regex A custom regex can also be passed, this will be used instead of the defined regex values - * @return boolean Success + * @return bool Success * @access public * @see Validation::_luhn() */ @@ -271,7 +271,7 @@ class Validation extends Object { * is greater >, is less <, greater or equal >= * less or equal <=, is less <, equal to ==, not equal != * @param int $check2 only needed if $check1 is a string - * @return boolean + * @return bool * @access public */ function comparison($check1, $operator = null, $check2 = null) { @@ -331,7 +331,7 @@ class Validation extends Object { * @param mixed $check When used as a string, $regex must also be a valid regular expression. * As and array: array('check' => value, 'regex' => 'valid regular expression') * @param string $regex If $check is passed as a string, $regex must also be set to valid regular expression - * @return boolean Success + * @return bool Success * @access public */ function custom($check, $regex = null) { @@ -361,7 +361,7 @@ class Validation extends Object { * My December 2006 or Dec 2006 * my 12/2006 or 12/06 separators can be a space, period, dash, forward slash * @param string $regex If a custom regular expression is used this is the only validation that will occur. - * @return boolean Success + * @return bool Success * @access public */ function date($check, $format = 'ymd', $regex = null) { @@ -403,10 +403,10 @@ class Validation extends Object { * Checks that a value is a valid decimal. If $places is null, the $check is allowed to be a scientific float * If no decimal point is found a false will be returned. Both the sign and exponent are optional. * - * @param integer $check The value the test for decimal - * @param integer $places if set $check value must have exactly $places after the decimal point + * @param int $check The value the test for decimal + * @param int $places if set $check value must have exactly $places after the decimal point * @param string $regex If a custom regular expression is used this is the only validation that will occur. - * @return boolean Success + * @return bool Success * @access public */ function decimal($check, $places = null, $regex = null) { @@ -430,9 +430,9 @@ class Validation extends Object { * Validates for an email address. * * @param string $check Value to check - * @param boolean $deep Perform a deeper validation (if true), by also checking availability of host + * @param bool $deep Perform a deeper validation (if true), by also checking availability of host * @param string $regex Regex to use (if none it will use built in regex) - * @return boolean Success + * @return bool Success * @access public */ function email($check, $deep = false, $regex= null) { @@ -487,7 +487,7 @@ class Validation extends Object { * Validation of an IPv4 address. * * @param string $check The string to test. - * @return boolean Success + * @return bool Success * @access public */ function ip($check) { @@ -508,7 +508,7 @@ class Validation extends Object { * * @param string $check The string to test * @param int $min The minimal string length - * @return boolean Success + * @return bool Success * @access public */ function minLength($check, $min) { @@ -520,7 +520,7 @@ class Validation extends Object { * * @param string $check The string to test * @param int $max The maximal string length - * @return boolean Success + * @return bool Success * @access public */ function maxLength($check, $max) { @@ -532,7 +532,7 @@ class Validation extends Object { * * @param string $check Value to check * @param string $symbolPosition Where symbol is located (left/right) - * @return boolean Success + * @return bool Success * @access public */ function money($check, $symbolPosition = 'left') { @@ -582,7 +582,7 @@ class Validation extends Object { * Checks if a value is numeric. * * @param string $check Value to check - * @return boolean Succcess + * @return bool Succcess * @access public */ function numeric($check) { @@ -594,7 +594,7 @@ class Validation extends Object { * @param mixed $check Value to check (string or array) * @param string $regex Regular expression to use * @param string $country Country code (defaults to 'all') - * @return boolean Success + * @return bool Success * @access public */ function phone($check, $regex= null, $country = 'all') { @@ -621,7 +621,7 @@ class Validation extends Object { * @param mixed $check Value to check * @param string $regex Regular expression to use * @param string $country Country to use for formatting - * @return boolean Success + * @return bool Success * @access public */ function postal($check, $regex= null, $country = null) { @@ -654,7 +654,7 @@ class Validation extends Object { * @param mixed $check Value to check * @param string $regex Regular expression to use * @param string $country Country - * @return boolean Success + * @return bool Success * @access public */ function ssn($check, $regex = null, $country = null) { @@ -685,7 +685,7 @@ class Validation extends Object { * Checks that a value is a valid URL. * * @param string $check Value to check - * @return boolean Success + * @return bool Success * @access public */ function url($check) { @@ -711,7 +711,7 @@ class Validation extends Object { /** * Runs a regular expression match. * - * @return boolean Success of match + * @return bool Success of match * @access protected */ function _check() { @@ -753,7 +753,7 @@ class Validation extends Object { * Luhn algorithm * * @see http://en.wikipedia.org/wiki/Luhn_algorithm - * @return boolean Success + * @return bool Success * @access protected */ function _luhn() { diff --git a/cake/libs/view/helper.php b/cake/libs/view/helper.php index d2c1caba5..99a499d4f 100644 --- a/cake/libs/view/helper.php +++ b/cake/libs/view/helper.php @@ -176,7 +176,7 @@ class Helper extends Overloadable { * or an array specifying any of the following: 'controller', 'action', * and/or 'plugin', in addition to named arguments (keyed array elements), * and standard URL arguments (indexed array elements) - * @param boolean $full If true, the full base URL will be prepended to the result + * @param bool $full If true, the full base URL will be prepended to the result * @return string Full translated URL with base path. */ function url($url = null, $full = false) { @@ -373,7 +373,7 @@ class Helper extends Overloadable { * * @param string $model Model name as string * @param string $field Fieldname as string - * @return boolean True on errors. + * @return bool True on errors. */ function tagIsInvalid($model = null, $field = null) { if ($model == null) { @@ -559,28 +559,24 @@ class Helper extends Overloadable { /** * Before render callback. Overridden in subclasses. * - * @return void */ function beforeRender() { } /** * After render callback. Overridden in subclasses. * - * @return void */ function afterRender() { } /** * Before layout callback. Overridden in subclasses. * - * @return void */ function beforeLayout() { } /** * After layout callback. Overridden in subclasses. * - * @return void */ function afterLayout() { } @@ -613,7 +609,6 @@ class Helper extends Overloadable { /** * Resets the vars used by Helper::clean() to null * - * @return void * @access private */ function __reset() { @@ -623,7 +618,6 @@ class Helper extends Overloadable { /** * Removes harmful content from output * - * @return void * @access private */ function __clean() { diff --git a/cake/libs/view/helpers/ajax.php b/cake/libs/view/helpers/ajax.php index f94976d31..81d01d59b 100644 --- a/cake/libs/view/helpers/ajax.php +++ b/cake/libs/view/helpers/ajax.php @@ -161,7 +161,7 @@ class AjaxHelper extends AppHelper { * @param string $href Href string "/products/view/12" * @param array $options Options for JavaScript function * @param string $confirm Confirmation message. Calls up a JavaScript confirm() message. - * @param boolean $escapeTitle Escaping the title string to HTML entities + * @param bool $escapeTitle Escaping the title string to HTML entities * * @return string HTML code for link to remote action */ @@ -504,7 +504,7 @@ class AjaxHelper extends AppHelper { /** * Detects Ajax requests * - * @return boolean True if the current request is a Prototype Ajax update call + * @return bool True if the current request is a Prototype Ajax update call */ function isAjax() { return (isset($this->params['isAjax']) && $this->params['isAjax'] === true); diff --git a/cake/libs/view/helpers/cache.php b/cake/libs/view/helpers/cache.php index 815497bb7..46b53bcdd 100644 --- a/cake/libs/view/helpers/cache.php +++ b/cake/libs/view/helpers/cache.php @@ -63,7 +63,7 @@ class CacheHelper extends AppHelper { * * @param string $file File to cache * @param string $out output to cache - * @param boolean $cache + * @param bool $cache * @return view ouput */ function cache($file, $out, $cache = false) { @@ -127,7 +127,7 @@ class CacheHelper extends AppHelper { * Parse file searching for no cache tags * * @param string $file - * @param boolean $cache + * @param bool $cache * @access private */ function __parseFile($file, $cache) { diff --git a/cake/libs/view/helpers/form.php b/cake/libs/view/helpers/form.php index 225873681..a39c80d57 100644 --- a/cake/libs/view/helpers/form.php +++ b/cake/libs/view/helpers/form.php @@ -294,7 +294,6 @@ class FormHelper extends AppHelper { * * @param string $model Model name * @param array $options Options - * @return void * @access private */ function __secure($model = null, $options = null) { @@ -1065,11 +1064,11 @@ class FormHelper extends AppHelper { * Returns a SELECT element for years * * @param string $fieldName Prefix name for the SELECT element - * @param integer $minYear First year in sequence - * @param integer $maxYear Last year in sequence + * @param int $minYear First year in sequence + * @param int $maxYear Last year in sequence * @param string $selected Option which is selected. * @param array $attributes Attribute array for the select elements. - * @param boolean $showEmpty Show/hide the empty select option + * @param bool $showEmpty Show/hide the empty select option * @return string */ function year($fieldName, $minYear = null, $maxYear = null, $selected = null, $attributes = array(), $showEmpty = true) { @@ -1097,7 +1096,7 @@ class FormHelper extends AppHelper { * * @param string $fieldName Prefix name for the SELECT element * @param string $selected Option which is selected. - * @param boolean $showEmpty Show/hide the empty select option + * @param bool $showEmpty Show/hide the empty select option * @return string */ function month($fieldName, $selected = null, $attributes = array(), $showEmpty = true) { @@ -1122,7 +1121,7 @@ class FormHelper extends AppHelper { * Returns a SELECT element for hours. * * @param string $fieldName Prefix name for the SELECT element - * @param boolean $format24Hours True for 24 hours format + * @param bool $format24Hours True for 24 hours format * @param string $selected Option which is selected. * @param array $attributes List of HTML attributes * @param mixed $showEmpty True to show an empty element, or a string to provide default empty element text @@ -1388,7 +1387,6 @@ class FormHelper extends AppHelper { /** * Generates option lists for common