diff --git a/app/Config/Schema/db_acl.php b/app/Config/Schema/db_acl.php index 91d93e084..7ba826b04 100644 --- a/app/Config/Schema/db_acl.php +++ b/app/Config/Schema/db_acl.php @@ -18,7 +18,7 @@ * @license http://www.opensource.org/licenses/mit-license.php MIT License */ -/* +/** * * Using the Schema command line utility * cake schema run create DbAcl @@ -26,10 +26,22 @@ */ class DbAclSchema extends CakeSchema { +/** + * Before event. + * + * @param array $event The event data. + * @return boolean success + */ public function before($event = array()) { return true; } +/** + * After event. + * + * @param array $event The event data. + * @return void + */ public function after($event = array()) { } diff --git a/lib/Cake/Console/Command/CommandListShell.php b/lib/Cake/Console/Command/CommandListShell.php index 755166f41..ca6620a5b 100644 --- a/lib/Cake/Console/Command/CommandListShell.php +++ b/lib/Cake/Console/Command/CommandListShell.php @@ -77,7 +77,7 @@ class CommandListShell extends AppShell { /** * Output text. * - * @param array $shellList + * @param array $shellList The shell list. * @return void */ protected function _asText($shellList) { @@ -95,7 +95,7 @@ class CommandListShell extends AppShell { /** * Output as XML * - * @param array $shellList + * @param array $shellList The shell list. * @return void */ protected function _asXml($shellList) { diff --git a/lib/Cake/Console/Command/CompletionShell.php b/lib/Cake/Console/Command/CompletionShell.php index b57c84145..57e86f949 100644 --- a/lib/Cake/Console/Command/CompletionShell.php +++ b/lib/Cake/Console/Command/CompletionShell.php @@ -144,7 +144,7 @@ class CompletionShell extends AppShell { /** * Emit results as a string, space delimited * - * @param array $options + * @param array $options The options to output * @return void */ protected function _output($options = array()) { diff --git a/lib/Cake/Console/Command/ConsoleShell.php b/lib/Cake/Console/Command/ConsoleShell.php index 8134a638e..a40381459 100644 --- a/lib/Cake/Console/Command/ConsoleShell.php +++ b/lib/Cake/Console/Command/ConsoleShell.php @@ -193,7 +193,7 @@ class ConsoleShell extends AppShell { /** * Override main() to handle action * - * @param string $command + * @param string $command The command to run. * @return void */ public function main($command = null) { @@ -218,7 +218,7 @@ class ConsoleShell extends AppShell { /** * Determine the method to process the current command * - * @param string $command + * @param string $command The command to run. * @return string or false */ protected function _method($command) { @@ -256,7 +256,7 @@ class ConsoleShell extends AppShell { /** * Bind an association * - * @param mixed $command + * @param mixed $command The command to run. * @return void */ protected function _bind($command) { @@ -283,7 +283,7 @@ class ConsoleShell extends AppShell { /** * Unbind an association * - * @param mixed $command + * @param mixed $command The command to run. * @return void */ protected function _unbind($command) { @@ -320,7 +320,7 @@ class ConsoleShell extends AppShell { /** * Perform a find * - * @param mixed $command + * @param mixed $command The command to run. * @return void */ protected function _find($command) { @@ -382,7 +382,7 @@ class ConsoleShell extends AppShell { /** * Save a record * - * @param mixed $command + * @param mixed $command The command to run. * @return void */ protected function _save($command) { @@ -406,7 +406,7 @@ class ConsoleShell extends AppShell { /** * Show the columns for a model * - * @param mixed $command + * @param mixed $command The command to run. * @return void */ protected function _columns($command) { @@ -455,7 +455,7 @@ class ConsoleShell extends AppShell { /** * Parse an array URL and show the equivalent URL as a string * - * @param mixed $command + * @param mixed $command The command to run. * @return void */ protected function _routeToString($command) { @@ -471,7 +471,7 @@ class ConsoleShell extends AppShell { /** * Parse a string URL and show as an array * - * @param mixed $command + * @param mixed $command The command to run. * @return void */ protected function _routeToArray($command) { @@ -483,7 +483,7 @@ class ConsoleShell extends AppShell { /** * Tells if the specified model is included in the list of available models * - * @param string $modelToCheck + * @param string $modelToCheck The model to check. * @return boolean true if is an available model, false otherwise */ protected function _isValidModel($modelToCheck) { diff --git a/lib/Cake/Console/Command/SchemaShell.php b/lib/Cake/Console/Command/SchemaShell.php index 6df8a32ea..ded5f2e05 100644 --- a/lib/Cake/Console/Command/SchemaShell.php +++ b/lib/Cake/Console/Command/SchemaShell.php @@ -311,8 +311,8 @@ class SchemaShell extends AppShell { * Create database from Schema object * Should be called via the run method * - * @param CakeSchema $Schema - * @param string $table + * @param CakeSchema $Schema The schema instance to create. + * @param string $table The table name. * @return void */ protected function _create(CakeSchema $Schema, $table = null) { @@ -362,8 +362,8 @@ class SchemaShell extends AppShell { * Update database with Schema object * Should be called via the run method * - * @param CakeSchema $Schema - * @param string $table + * @param CakeSchema &$Schema The schema instance + * @param string $table The table name. * @return void */ protected function _update(&$Schema, $table = null) { @@ -417,9 +417,9 @@ class SchemaShell extends AppShell { /** * Runs sql from _create() or _update() * - * @param array $contents - * @param string $event - * @param CakeSchema $Schema + * @param array $contents The contents to execute. + * @param string $event The event to fire + * @param CakeSchema $Schema The schema instance. * @return void */ protected function _run($contents, $event, CakeSchema $Schema) { diff --git a/lib/Cake/Console/Command/Task/CommandTask.php b/lib/Cake/Console/Command/Task/CommandTask.php index 9c90fc6be..fca006a72 100644 --- a/lib/Cake/Console/Command/Task/CommandTask.php +++ b/lib/Cake/Console/Command/Task/CommandTask.php @@ -53,9 +53,9 @@ class CommandTask extends AppShell { /** * Scan the provided paths for shells, and append them into $shellList * - * @param string $type - * @param array $shells - * @param array $shellList + * @param string $type The type of object. + * @param array $shells The shell name. + * @param array &$shellList List of shells. * @return void */ protected function _appendShells($type, $shells, &$shellList) { @@ -90,7 +90,7 @@ class CommandTask extends AppShell { /** * Return a list of subcommands for a given command * - * @param string $commandName + * @param string $commandName The command you want subcommands from. * @return array */ public function subCommands($commandName) { @@ -127,7 +127,7 @@ class CommandTask extends AppShell { /** * Get Shell instance for the given command * - * @param mixed $commandName + * @param mixed $commandName The command you want. * @return mixed */ public function getShell($commandName) { @@ -157,7 +157,7 @@ class CommandTask extends AppShell { /** * Get Shell instance for the given command * - * @param mixed $commandName + * @param mixed $commandName The command to get options for. * @return array */ public function options($commandName) { diff --git a/lib/Cake/Console/Command/Task/ControllerTask.php b/lib/Cake/Console/Command/Task/ControllerTask.php index 5a4553466..831aeff61 100644 --- a/lib/Cake/Console/Command/Task/ControllerTask.php +++ b/lib/Cake/Console/Command/Task/ControllerTask.php @@ -224,10 +224,10 @@ class ControllerTask extends BakeTask { /** * Confirm a to be baked controller with the user * - * @param string $controllerName - * @param string $useDynamicScaffold - * @param array $helpers - * @param array $components + * @param string $controllerName The name of the controller. + * @param string $useDynamicScaffold Whether or not to use dynamic scaffolds. + * @param array $helpers The list of helpers to include. + * @param array $components The list of components to include. * @return void */ public function confirmController($controllerName, $useDynamicScaffold, $helpers, $components) { diff --git a/lib/Cake/Console/Command/Task/DbConfigTask.php b/lib/Cake/Console/Command/Task/DbConfigTask.php index 737d2cec7..f202b89df 100644 --- a/lib/Cake/Console/Command/Task/DbConfigTask.php +++ b/lib/Cake/Console/Command/Task/DbConfigTask.php @@ -199,7 +199,7 @@ class DbConfigTask extends AppShell { /** * Output verification message and bake if it looks good * - * @param array $config + * @param array $config The config data. * @return boolean True if user says it looks good, false otherwise */ protected function _verify($config) { diff --git a/lib/Cake/Console/Command/Task/ExtractTask.php b/lib/Cake/Console/Command/Task/ExtractTask.php index 794fe2134..4986960e6 100644 --- a/lib/Cake/Console/Command/Task/ExtractTask.php +++ b/lib/Cake/Console/Command/Task/ExtractTask.php @@ -242,10 +242,10 @@ class ExtractTask extends AppShell { * * Takes care of duplicate translations * - * @param string $category - * @param string $domain - * @param string $msgid - * @param array $details + * @param string $category The category + * @param string $domain The domain + * @param string $msgid The message string + * @param array $details The file and line references * @return void */ protected function _addTranslation($category, $domain, $msgid, $details = array()) { @@ -582,10 +582,10 @@ class ExtractTask extends AppShell { /** * Prepare a file to be stored * - * @param string $category - * @param string $domain - * @param string $header - * @param string $sentence + * @param string $category The category + * @param string $domain The domain + * @param string $header The header content. + * @param string $sentence The sentence to store. * @return void */ protected function _store($category, $domain, $header, $sentence) { @@ -678,7 +678,7 @@ class ExtractTask extends AppShell { /** * Get the strings from the position forward * - * @param integer $position Actual position on tokens array + * @param integer &$position Actual position on tokens array * @param integer $target Number of strings to extract * @return array Strings extracted */ diff --git a/lib/Cake/Console/Command/Task/FixtureTask.php b/lib/Cake/Console/Command/Task/FixtureTask.php index 0be6d36dd..519bea29c 100644 --- a/lib/Cake/Console/Command/Task/FixtureTask.php +++ b/lib/Cake/Console/Command/Task/FixtureTask.php @@ -316,7 +316,7 @@ class FixtureTask extends BakeTask { * Generate String representation of Records * * @param array $tableInfo Table schema array - * @param integer $recordCount + * @param integer $recordCount The number of records to generate. * @return array Array of records to use in the fixture. */ protected function _generateRecords($tableInfo, $recordCount = 1) { diff --git a/lib/Cake/Console/Command/Task/ModelTask.php b/lib/Cake/Console/Command/Task/ModelTask.php index 9f7935e7c..ae1e137ed 100644 --- a/lib/Cake/Console/Command/Task/ModelTask.php +++ b/lib/Cake/Console/Command/Task/ModelTask.php @@ -401,7 +401,7 @@ class ModelTask extends BakeTask { * * @param string $fieldName Name of field to be validated. * @param array $metaData metadata for field - * @param string $primaryKey + * @param string $primaryKey The primary key field. * @return array Array of validation for the field. */ public function fieldValidation($fieldName, $metaData, $primaryKey = 'id') { @@ -510,7 +510,7 @@ class ModelTask extends BakeTask { /** * Handles associations * - * @param Model $model + * @param Model $model The model object * @return array Associations */ public function doAssociations($model) { @@ -562,7 +562,7 @@ class ModelTask extends BakeTask { /** * Handles behaviors * - * @param Model $model + * @param Model $model The model object. * @return array Behaviors */ public function doActsAs($model) { diff --git a/lib/Cake/Console/Command/Task/PluginTask.php b/lib/Cake/Console/Command/Task/PluginTask.php index e37e437c3..760ed9145 100644 --- a/lib/Cake/Console/Command/Task/PluginTask.php +++ b/lib/Cake/Console/Command/Task/PluginTask.php @@ -73,7 +73,7 @@ class PluginTask extends AppShell { /** * Interactive interface * - * @param string $plugin + * @param string $plugin The plugin name. * @return void */ protected function _interactive($plugin = null) { @@ -184,7 +184,7 @@ class PluginTask extends AppShell { /** * find and change $this->path to the user selection * - * @param array $pathOptions + * @param array $pathOptions The list of paths to look in. * @return void */ public function findPath($pathOptions) { diff --git a/lib/Cake/Console/Command/Task/TestTask.php b/lib/Cake/Console/Command/Task/TestTask.php index 78afac367..d6f0e3c5b 100644 --- a/lib/Cake/Console/Command/Task/TestTask.php +++ b/lib/Cake/Console/Command/Task/TestTask.php @@ -102,7 +102,7 @@ class TestTask extends BakeTask { /** * Handles interactive baking * - * @param string $type + * @param string $type The type of object to bake a test for. * @return string|boolean */ protected function _interactive($type = null) { diff --git a/lib/Cake/Console/Command/Task/ViewTask.php b/lib/Cake/Console/Command/Task/ViewTask.php index 7f94de83f..86d133774 100644 --- a/lib/Cake/Console/Command/Task/ViewTask.php +++ b/lib/Cake/Console/Command/Task/ViewTask.php @@ -298,7 +298,7 @@ class ViewTask extends BakeTask { * Bake a view file for each of the supplied actions * * @param array $actions Array of actions to make files for. - * @param array $vars + * @param array $vars The template variables. * @return void */ public function bakeActions($actions, $vars) { @@ -454,7 +454,7 @@ class ViewTask extends BakeTask { /** * Returns associations for controllers models. * - * @param Model $model + * @param Model $model The Model instance. * @return array $associations */ protected function _associations(Model $model) { diff --git a/lib/Cake/Console/Command/TestShell.php b/lib/Cake/Console/Command/TestShell.php index bd7e9d277..992d1a315 100644 --- a/lib/Cake/Console/Command/TestShell.php +++ b/lib/Cake/Console/Command/TestShell.php @@ -334,9 +334,9 @@ class TestShell extends Shell { /** * Find the test case for the passed file. The file could itself be a test. * - * @param string $file - * @param string $category - * @param boolean $throwOnMissingFile + * @param string $file The file to map. + * @param string $category The test file category. + * @param boolean $throwOnMissingFile Whether or not to throw an exception. * @return array array(type, case) * @throws Exception */ @@ -411,7 +411,7 @@ class TestShell extends Shell { /** * For the given file, what category of test is it? returns app, core or the name of the plugin * - * @param string $file + * @param string $file The file to map. * @return string */ protected function _mapFileToCategory($file) { diff --git a/lib/Cake/Console/Command/UpgradeShell.php b/lib/Cake/Console/Command/UpgradeShell.php index a64d05468..d4b3b0c1e 100644 --- a/lib/Cake/Console/Command/UpgradeShell.php +++ b/lib/Cake/Console/Command/UpgradeShell.php @@ -554,6 +554,7 @@ class UpgradeShell extends AppShell { /** * Replace cakeError with built-in exceptions. * NOTE: this ignores calls where you've passed your own secondary parameters to cakeError(). + * * @return void */ public function exceptions() { @@ -661,7 +662,7 @@ class UpgradeShell extends AppShell { * Find all php files in the folder (honoring recursive) and determine where CakePHP expects the file to be * If the file is not exactly where CakePHP expects it - move it. * - * @param string $path + * @param string $path The path to move files in. * @param array $options array(recursive, checkFolder) * @return void */ @@ -763,7 +764,7 @@ class UpgradeShell extends AppShell { /** * Searches the paths and finds files based on extension. * - * @param string $extensions + * @param string $extensions The extensions to include. Defaults to none. * @return void */ protected function _findFiles($extensions = '') { diff --git a/lib/Cake/Console/ConsoleInputArgument.php b/lib/Cake/Console/ConsoleInputArgument.php index 7380893bf..32b032d30 100644 --- a/lib/Cake/Console/ConsoleInputArgument.php +++ b/lib/Cake/Console/ConsoleInputArgument.php @@ -132,7 +132,7 @@ class ConsoleInputArgument { /** * Check that $value is a valid choice for this argument. * - * @param string $value + * @param string $value The choice to validate. * @return boolean * @throws ConsoleException */ diff --git a/lib/Cake/Console/ConsoleInputOption.php b/lib/Cake/Console/ConsoleInputOption.php index 4d68c9f9e..7e45421bc 100644 --- a/lib/Cake/Console/ConsoleInputOption.php +++ b/lib/Cake/Console/ConsoleInputOption.php @@ -177,7 +177,7 @@ class ConsoleInputOption { /** * Check that a value is a valid choice for this option. * - * @param string $value + * @param string $value The choice to validate. * @return boolean * @throws ConsoleException */ diff --git a/lib/Cake/Console/ConsoleOutput.php b/lib/Cake/Console/ConsoleOutput.php index 5e1ce9bec..8b8f9f967 100644 --- a/lib/Cake/Console/ConsoleOutput.php +++ b/lib/Cake/Console/ConsoleOutput.php @@ -203,7 +203,7 @@ class ConsoleOutput { /** * Replace tags with color codes. * - * @param array $matches. + * @param array $matches An array of matches to replace. * @return string */ protected function _replaceTags($matches) { diff --git a/lib/Cake/Console/HelpFormatter.php b/lib/Cake/Console/HelpFormatter.php index c3b40c354..b2a7ceb51 100644 --- a/lib/Cake/Console/HelpFormatter.php +++ b/lib/Cake/Console/HelpFormatter.php @@ -159,7 +159,7 @@ class HelpFormatter { /** * Iterate over a collection and find the longest named thing. * - * @param array $collection + * @param array $collection The collection to find a max length of. * @return integer */ protected function _getMaxLength($collection) { diff --git a/lib/Cake/Console/Shell.php b/lib/Cake/Console/Shell.php index 259b98544..380733cba 100644 --- a/lib/Cake/Console/Shell.php +++ b/lib/Cake/Console/Shell.php @@ -262,7 +262,7 @@ class Shell extends Object { /** * Lazy loads models using the loadModel() method if declared in $uses * - * @param string $name + * @param string $name The name of the model to look for. * @return void */ public function __isset($name) { @@ -454,7 +454,7 @@ class Shell extends Object { /** * Display the help in the correct format * - * @param string $command + * @param string $command The command to get help for. * @return void */ protected function _displayHelp($command) { @@ -485,7 +485,7 @@ class Shell extends Object { /** * Overload get for lazy building of tasks * - * @param string $name + * @param string $name The property name to access. * @return Shell Object of Task */ public function __get($name) { @@ -860,7 +860,7 @@ class Shell extends Object { /** * creates the singular name for use in views. * - * @param string $name + * @param string $name The plural underscored value. * @return string $name */ protected function _singularName($name) { diff --git a/lib/Cake/Console/ShellDispatcher.php b/lib/Cake/Console/ShellDispatcher.php index 14b48a5ff..08acb6f6f 100644 --- a/lib/Cake/Console/ShellDispatcher.php +++ b/lib/Cake/Console/ShellDispatcher.php @@ -317,7 +317,7 @@ class ShellDispatcher { /** * Parses out the paths from from the argv * - * @param array $args + * @param array $args The argv to parse. * @return void */ protected function _parsePaths($args) { diff --git a/lib/Cake/Console/TaskCollection.php b/lib/Cake/Console/TaskCollection.php index ff1ddee67..5516a0b6f 100644 --- a/lib/Cake/Console/TaskCollection.php +++ b/lib/Cake/Console/TaskCollection.php @@ -43,7 +43,7 @@ class TaskCollection extends ObjectCollection { /** * Constructor * - * @param Shell $Shell + * @param Shell $Shell The shell this task collection is attached to. */ public function __construct(Shell $Shell) { $this->_Shell = $Shell; diff --git a/lib/Cake/Console/Templates/skel/Config/Schema/db_acl.php b/lib/Cake/Console/Templates/skel/Config/Schema/db_acl.php index b532fe370..39bc58a29 100644 --- a/lib/Cake/Console/Templates/skel/Config/Schema/db_acl.php +++ b/lib/Cake/Console/Templates/skel/Config/Schema/db_acl.php @@ -17,13 +17,28 @@ */ class DbAclSchema extends CakeSchema { +/** + * Before event. + * + * @param array $event The event data. + * @return boolean success + */ public function before($event = array()) { return true; } +/** + * After event. + * + * @param array $event The event data. + * @return void + */ public function after($event = array()) { } +/** + * ACO - Access Control Object - Something that is wanted + */ public $acos = array( 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'), 'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10), @@ -35,6 +50,9 @@ class DbAclSchema extends CakeSchema { 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) ); +/** + * ARO - Access Request Object - Something that wants something + */ public $aros = array( 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'), 'parent_id' => array('type' => 'integer', 'null' => true, 'default' => null, 'length' => 10), @@ -46,6 +64,10 @@ class DbAclSchema extends CakeSchema { 'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => 1)) ); +/** + * Used by the Cake::Model:Permission class. + * Checks if the given $aro has access to action $action in $aco. + */ public $aros_acos = array( 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'), 'aro_id' => array('type' => 'integer', 'null' => false, 'length' => 10, 'key' => 'index'), diff --git a/lib/Cake/Console/Templates/skel/Config/Schema/i18n.php b/lib/Cake/Console/Templates/skel/Config/Schema/i18n.php index d09922e83..078e6d585 100644 --- a/lib/Cake/Console/Templates/skel/Config/Schema/i18n.php +++ b/lib/Cake/Console/Templates/skel/Config/Schema/i18n.php @@ -19,15 +19,37 @@ */ class I18nSchema extends CakeSchema { +/** + * The name property + * + * @var string + */ public $name = 'i18n'; +/** + * Before event. + * + * @param array $event The event data. + * @return boolean success + */ public function before($event = array()) { return true; } +/** + * After event. + * + * @param array $event The event data. + * @return void + */ public function after($event = array()) { } +/** + * The i18n table property + * + * @var array + */ public $i18n = array( 'id' => array('type' => 'integer', 'null' => false, 'default' => null, 'length' => 10, 'key' => 'primary'), 'locale' => array('type' => 'string', 'null' => false, 'length' => 6, 'key' => 'index'), diff --git a/lib/Cake/Console/Templates/skel/Config/Schema/sessions.php b/lib/Cake/Console/Templates/skel/Config/Schema/sessions.php index 078f5d531..aab57f3fb 100644 --- a/lib/Cake/Console/Templates/skel/Config/Schema/sessions.php +++ b/lib/Cake/Console/Templates/skel/Config/Schema/sessions.php @@ -9,7 +9,7 @@ * @since CakePHP(tm) v 0.2.9 */ -/* +/** * * Using the Schema command line utility * cake schema run create Sessions @@ -17,15 +17,37 @@ */ class SessionsSchema extends CakeSchema { +/** + * Name property + * + * @var string + */ public $name = 'Sessions'; +/** + * Before event. + * + * @param array $event The event data. + * @return bool Success + */ public function before($event = array()) { return true; } +/** + * After event. + * + * @param array $event The event data. + * @return void + */ public function after($event = array()) { } +/** + * cake_sessions table definition + * + * @var array + */ public $cake_sessions = array( 'id' => array('type' => 'string', 'null' => false, 'key' => 'primary'), 'data' => array('type' => 'text', 'null' => true, 'default' => null), diff --git a/lib/Cake/Console/Templates/skel/Controller/PagesController.php b/lib/Cake/Console/Templates/skel/Controller/PagesController.php index 87fb589af..eb023a573 100644 --- a/lib/Cake/Console/Templates/skel/Controller/PagesController.php +++ b/lib/Cake/Console/Templates/skel/Controller/PagesController.php @@ -31,10 +31,9 @@ class PagesController extends AppController { /** * Displays a view * - * @param mixed What page to display * @return void * @throws NotFoundException When the view file could not be found - * or MissingViewException in debug mode. + * or MissingViewException in debug mode. */ public function display() { $path = func_get_args(); diff --git a/lib/Cake/Console/Templates/skel/Test/Case/AllTestsTest.php b/lib/Cake/Console/Templates/skel/Test/Case/AllTestsTest.php index 904bc3b50..9929fa582 100644 --- a/lib/Cake/Console/Templates/skel/Test/Case/AllTestsTest.php +++ b/lib/Cake/Console/Templates/skel/Test/Case/AllTestsTest.php @@ -18,6 +18,11 @@ class AllTestsTest extends CakeTestSuite { +/** + * Get the suite object. + * + * @return CakeTestSuite Suite class instance. + */ public static function suite() { $suite = new CakeTestSuite('All application tests'); $suite->addTestDirectoryRecursive(TESTS . 'Case'); diff --git a/lib/Cake/Utility/CakeNumber.php b/lib/Cake/Utility/CakeNumber.php index f7c005a93..3e7585feb 100644 --- a/lib/Cake/Utility/CakeNumber.php +++ b/lib/Cake/Utility/CakeNumber.php @@ -243,7 +243,7 @@ class CakeNumber { * - `decimals` - Decimal separator symbol ie. '.' * * @param float $value A floating point number - * @param array $options + * @param array $options Options list. * @return string formatted delta * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/number.html#NumberHelper::formatDelta */ @@ -258,10 +258,10 @@ class CakeNumber { /** * Alternative number_format() to accommodate multibyte decimals and thousands < PHP 5.4 * - * @param float $value - * @param integer $places - * @param string $decimals - * @param string $thousands + * @param float $value Value to format. + * @param integer $places Decimal places to use. + * @param string $decimals Decimal position string. + * @param string $thousands Thousands separator string. * @return string */ protected static function _numberFormat($value, $places = 0, $decimals = '.', $thousands = ',') { @@ -315,10 +315,10 @@ class CakeNumber { * By default all currencies contain utf-8 symbols and don't need this changed. If you require * non HTML encoded symbols you will need to update the settings with the correct bytes. * - * @param float $value + * @param float $value Value to format. * @param string $currency Shortcut to default options. Valid values are * 'USD', 'EUR', 'GBP', otherwise set at least 'before' and 'after' options. - * @param array $options + * @param array $options Options list. * @return string Number formatted as a currency. * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/number.html#NumberHelper::currency */ diff --git a/lib/Cake/Utility/ClassRegistry.php b/lib/Cake/Utility/ClassRegistry.php index 03cdf70ce..fce9c507d 100644 --- a/lib/Cake/Utility/ClassRegistry.php +++ b/lib/Cake/Utility/ClassRegistry.php @@ -86,6 +86,7 @@ class ClassRegistry { * array('class' => 'ClassName', 'alias' => 'AliasNameStoredInTheRegistry') * ); * }}} + * * @param string|array $class as a string or a single key => value array instance will be created, * stored in the registry and returned. * @param boolean $strict if set to true it will return false if the class was not found instead @@ -303,8 +304,8 @@ class ClassRegistry { /** * Checks to see if $alias is a duplicate $class Object * - * @param string $alias - * @param string $class + * @param string $alias Alias to check. + * @param string $class Class name. * @return boolean */ protected function &_duplicate($alias, $class) { diff --git a/lib/Cake/Utility/Debugger.php b/lib/Cake/Utility/Debugger.php index 902b43310..37d27b8d9 100644 --- a/lib/Cake/Utility/Debugger.php +++ b/lib/Cake/Utility/Debugger.php @@ -148,7 +148,7 @@ class Debugger { /** * Returns a reference to the Debugger singleton object instance. * - * @param string $class + * @param string $class Debugger class name. * @return object */ public static function getInstance($class = null) { @@ -167,7 +167,6 @@ class Debugger { /** * Recursively formats and outputs the contents of the supplied variable. * - * * @param mixed $var the variable to dump * @param int $depth The depth to output to. Defaults to 3. * @return void @@ -724,7 +723,7 @@ class Debugger { /** * Takes a processed array of data from an error and displays it in the chosen format. * - * @param string $data + * @param string $data Data to output. * @return void */ public function outputError($data) { diff --git a/lib/Cake/Utility/File.php b/lib/Cake/Utility/File.php index c23b3f2d9..77777a785 100644 --- a/lib/Cake/Utility/File.php +++ b/lib/Cake/Utility/File.php @@ -202,7 +202,7 @@ class File { * all other platforms will use "\n" * * @param string $data Data to prepare for writing. - * @param boolean $forceWindows + * @param boolean $forceWindows If true forces usage Windows newline string. * @return string The with converted line endings. * @link http://book.cakephp.org/2.0/en/core-utility-libraries/file-folder.html#File::prepare */ diff --git a/lib/Cake/Utility/Hash.php b/lib/Cake/Utility/Hash.php index f39bf0453..711b42f93 100644 --- a/lib/Cake/Utility/Hash.php +++ b/lib/Cake/Utility/Hash.php @@ -671,7 +671,7 @@ class Hash { /** * Checks to see if all the values in the array are numeric * - * @param array $array The array to check. + * @param array $data The array to check. * @return boolean true if values are numeric, false otherwise * @link http://book.cakephp.org/2.0/en/core-utility-libraries/hash.html#Hash::numeric */ @@ -689,7 +689,7 @@ class Hash { * If you have an un-even or heterogenous array, consider using Hash::maxDimensions() * to get the dimensions of the array. * - * @param array $array Array to count dimensions on + * @param array $data Array to count dimensions on * @return integer The number of dimensions in $data * @link http://book.cakephp.org/2.0/en/core-utility-libraries/hash.html#Hash::dimensions */ diff --git a/lib/Cake/Utility/Inflector.php b/lib/Cake/Utility/Inflector.php index 95e8d4aaf..06e79e5d9 100644 --- a/lib/Cake/Utility/Inflector.php +++ b/lib/Cake/Utility/Inflector.php @@ -521,7 +521,7 @@ class Inflector { /** * Returns camelBacked version of an underscored string. * - * @param string $string + * @param string $string String to convert. * @return string in variable form * @link http://book.cakephp.org/2.0/en/core-utility-libraries/inflector.html#Inflector::variable */ diff --git a/lib/Cake/Utility/ObjectCollection.php b/lib/Cake/Utility/ObjectCollection.php index b1f344885..067b06b3b 100644 --- a/lib/Cake/Utility/ObjectCollection.php +++ b/lib/Cake/Utility/ObjectCollection.php @@ -82,8 +82,7 @@ abstract class ObjectCollection { * Any non-null value will modify the parameter index indicated. * Defaults to false. * - * - * @param string $callback|CakeEvent Method to fire on all the objects. Its assumed all the objects implement + * @param string|CakeEvent $callback Method to fire on all the objects. Its assumed all the objects implement * the method you are calling. If an instance of CakeEvent is provided, then then Event name will parsed to * get the callback name. This is done by getting the last word after any dot in the event name * (eg. `Model.afterSave` event will trigger the `afterSave` callback) @@ -172,7 +171,7 @@ abstract class ObjectCollection { * Enables callbacks on an object or array of objects * * @param string|array $name CamelCased name of the object(s) to enable (string or array) - * @param boolean Prioritize enabled list after enabling object(s) + * @param boolean $prioritize Prioritize enabled list after enabling object(s) * @return void */ public function enable($name, $prioritize = true) { @@ -213,7 +212,7 @@ abstract class ObjectCollection { * @param string|array $name CamelCased name of the object(s) to enable (string or array) * If string the second param $priority is used else it should be an associative array * with keys as object names and values as priorities to set. - * @param integer|null Integer priority to set or null for default + * @param integer|null $priority Integer priority to set or null for default * @return void */ public function setPriority($name, $priority = null) { diff --git a/lib/Cake/Utility/Security.php b/lib/Cake/Utility/Security.php index 39e0fcf36..86f93506e 100644 --- a/lib/Cake/Utility/Security.php +++ b/lib/Cake/Utility/Security.php @@ -277,7 +277,12 @@ class Security { $salt = vsprintf('$2a$%02d$%s', array(self::$hashCost, $salt)); } - if ($salt === true || strpos($salt, '$2a$') !== 0 || strlen($salt) < 29) { + $invalidCipher = ( + strpos($salt, '$2y$') !== 0 && + strpos($salt, '$2x$') !== 0 && + strpos($salt, '$2a$') !== 0 + ); + if ($salt === true || $invalidCipher || strlen($salt) < 29) { trigger_error(__d( 'cake_dev', 'Invalid salt: %s for %s Please visit http://www.php.net/crypt and read the appropriate section for building %s salts.', @@ -324,7 +329,7 @@ class Security { /** * Check the encryption key for proper length. * - * @param string $key + * @param string $key Key to check. * @param string $method The method the key is being checked for. * @return void * @throws CakeException When key length is not 256 bit/32 bytes diff --git a/lib/Cake/Utility/Validation.php b/lib/Cake/Utility/Validation.php index b7c7b9464..f7572c028 100644 --- a/lib/Cake/Utility/Validation.php +++ b/lib/Cake/Utility/Validation.php @@ -412,8 +412,8 @@ class Validation { * - true => Any number of decimal places greater than 0, or a float|double. The '.' is required. * - 1..N => Exactly that many number of decimal places. The '.' is required. * - * @param float $check The value the test for decimal - * @param integer $places + * @param float $check The value the test for decimal. + * @param integer $places Decimal places. * @param string $regex If a custom regular expression is used, this is the only validation that will occur. * @return boolean Success */ @@ -914,8 +914,8 @@ class Validation { /** * Luhn algorithm * - * @param string|array $check - * @param boolean $deep + * @param string|array $check Value to check. + * @param boolean $deep If true performs deep check. * @return boolean Success * @see http://en.wikipedia.org/wiki/Luhn_algorithm */ @@ -947,7 +947,7 @@ class Validation { /** * Checks the mime type of a file. * - * @param string|array $check + * @param string|array $check Value to check. * @param array|string $mimeTypes Array of mime types or regex pattern to check. * @return boolean Success * @throws CakeException when mime type can not be determined. @@ -977,9 +977,9 @@ class Validation { /** * Checks the filesize * - * @param string|array $check - * @param integer|string $size Size in bytes or human readable string like '5MB' - * @param string $operator See `Validation::comparison()` + * @param string|array $check Value to check. + * @param string $operator See `Validation::comparison()`. + * @param integer|string $size Size in bytes or human readable string like '5MB'. * @return boolean Success */ public static function fileSize($check, $operator = null, $size = null) { @@ -998,7 +998,7 @@ class Validation { /** * Checking for upload errors * - * @param string|array $check + * @param string|array $check Value to check. * @return boolean * @see http://www.php.net/manual/en/features.file-upload.errors.php */ diff --git a/lib/Cake/Utility/Xml.php b/lib/Cake/Utility/Xml.php index 7a95760fb..88a83b74b 100644 --- a/lib/Cake/Utility/Xml.php +++ b/lib/Cake/Utility/Xml.php @@ -228,7 +228,7 @@ class Xml { * * @param DOMDocument $dom Handler to DOMDocument * @param DOMElement $node Handler to DOMElement (child) - * @param array $data Array of data to append to the $node. + * @param array &$data Array of data to append to the $node. * @param string $format Either 'attribute' or 'tags'. This determines where nested keys go. * @return void * @throws XmlException @@ -348,7 +348,7 @@ class Xml { * Recursive method to toArray * * @param SimpleXMLElement $xml SimpleXMLElement object - * @param array $parentData Parent array with data + * @param array &$parentData Parent array with data * @param string $ns Namespace of current child * @param array $namespaces List of namespaces in XML * @return void