diff --git a/lib/Cake/Cache/Cache.php b/lib/Cake/Cache/Cache.php index ee3a937ad..f8c2d4d65 100644 --- a/lib/Cake/Cache/Cache.php +++ b/lib/Cake/Cache/Cache.php @@ -146,7 +146,8 @@ class Cache { * Finds and builds the instance of the required engine class. * * @param string $name Name of the config array that needs an engine instance built - * @return void + * @return boolean + * @throws CacheException */ protected static function _buildEngine($name) { $config = self::$_config[$name]; @@ -186,7 +187,7 @@ class Cache { * the Engine instance is also unset. * * @param string $name A currently configured cache config you wish to remove. - * @return boolen success of the removal, returns false when the config does not exist. + * @return boolean success of the removal, returns false when the config does not exist. */ public static function drop($name) { if (!isset(self::$_config[$name])) { @@ -456,7 +457,7 @@ class Cache { * Check if Cache has initialized a working config for the given name. * * @param string $config name of the configuration to use. Defaults to 'default' - * @return bool Whether or not the config name has been initialized. + * @return boolean Whether or not the config name has been initialized. */ public static function isInitialized($config = 'default') { if (Configure::read('Cache.disable')) { @@ -471,8 +472,6 @@ class Cache { * @param string $name Name of the configuration to get settings for. Defaults to 'default' * @return array list of settings for this engine * @see Cache::config() - * @access public - * @static */ public static function settings($name = 'default') { if (!empty(self::$_engines[$name])) { @@ -492,8 +491,7 @@ abstract class CacheEngine { /** * Settings of current engine instance * - * @var int - * @access public + * @var array */ public $settings = array(); diff --git a/lib/Cake/Cache/Engine/FileEngine.php b/lib/Cake/Cache/Engine/FileEngine.php index eaf87738d..c8eafbd0b 100644 --- a/lib/Cake/Cache/Engine/FileEngine.php +++ b/lib/Cake/Cache/Engine/FileEngine.php @@ -30,8 +30,7 @@ class FileEngine extends CacheEngine { /** * Instance of SplFileObject class * - * @var _File - * @access protected + * @var File */ protected $_File = null; @@ -45,7 +44,6 @@ class FileEngine extends CacheEngine { * * @var array * @see CacheEngine::__defaults - * @access public */ public $settings = array(); @@ -53,7 +51,6 @@ class FileEngine extends CacheEngine { * True unless FileEngine::__active(); fails * * @var boolean - * @access protected */ protected $_init = true; @@ -252,6 +249,8 @@ class FileEngine extends CacheEngine { /** * Not implemented * + * @param string $key + * @param integer $offset * @return void * @throws CacheException */ @@ -262,6 +261,8 @@ class FileEngine extends CacheEngine { /** * Not implemented * + * @param string $key + * @param integer $offset * @return void * @throws CacheException */ @@ -275,7 +276,6 @@ class FileEngine extends CacheEngine { * @param string $key The key * @param boolean $createKey Whether the key should be created if it doesn't exists, or not * @return boolean true if the cache key could be set, false otherwise - * @access protected */ protected function _setKey($key, $createKey = false) { $path = new SplFileInfo($this->settings['path'] . $key); @@ -296,7 +296,6 @@ class FileEngine extends CacheEngine { * Determine is cache directory is writable * * @return boolean - * @access protected */ protected function _active() { $dir = new SplFileInfo($this->settings['path']); diff --git a/lib/Cake/Cache/Engine/MemcacheEngine.php b/lib/Cake/Cache/Engine/MemcacheEngine.php index 4721b0388..af0bbb2a6 100644 --- a/lib/Cake/Cache/Engine/MemcacheEngine.php +++ b/lib/Cake/Cache/Engine/MemcacheEngine.php @@ -31,7 +31,6 @@ class MemcacheEngine extends CacheEngine { * Memcache wrapper. * * @var Memcache - * @access private */ protected $_Memcache = null; @@ -43,7 +42,6 @@ class MemcacheEngine extends CacheEngine { * - compress = boolean, default => false * * @var array - * @access public */ public $settings = array(); @@ -96,7 +94,7 @@ class MemcacheEngine extends CacheEngine { * @param string $server The server address string. * @return array Array containing host, port */ - function _parseServerString($server) { + protected function _parseServerString($server) { if (substr($server, 0, 1) == '[') { $position = strpos($server, ']:'); if ($position !== false) { diff --git a/lib/Cake/Cache/Engine/WincacheEngine.php b/lib/Cake/Cache/Engine/WincacheEngine.php index 46ef6def2..50f273695 100644 --- a/lib/Cake/Cache/Engine/WincacheEngine.php +++ b/lib/Cake/Cache/Engine/WincacheEngine.php @@ -1,6 +1,6 @@ 'Xcache', 'prefix' => Inflector::slug(APP_DIR) . '_', @@ -124,15 +123,16 @@ class XcacheEngine extends CacheEngine { /** * Delete all keys from the cache * + * @param boolean $check * @return boolean True if the cache was successfully cleared, false otherwise */ public function clear($check) { - $this->__auth(); + $this->_auth(); $max = xcache_count(XC_TYPE_VAR); for ($i = 0; $i < $max; $i++) { xcache_clear_cache(XC_TYPE_VAR, $i); } - $this->__auth(true); + $this->_auth(true); return true; } @@ -144,9 +144,9 @@ class XcacheEngine extends CacheEngine { * (see xcache.admin configuration settings) * * @param boolean $reverse Revert changes - * @access private + * @return void */ - function __auth($reverse = false) { + protected function _auth($reverse = false) { static $backup = array(); $keys = array('PHP_AUTH_USER' => 'user', 'PHP_AUTH_PW' => 'password'); foreach ($keys as $key => $setting) { diff --git a/lib/Cake/Configure/IniReader.php b/lib/Cake/Configure/IniReader.php index 4412ec9ed..4efb03744 100644 --- a/lib/Cake/Configure/IniReader.php +++ b/lib/Cake/Configure/IniReader.php @@ -43,8 +43,8 @@ * You can combine `.` separated values with sections to create more deeply * nested structures. * - * IniReader also manipulates how the special ini values of - * 'yes', 'no', 'on', 'off', 'null' are handled. These values will be + * IniReader also manipulates how the special ini values of + * 'yes', 'no', 'on', 'off', 'null' are handled. These values will be * converted to their boolean equivalents. * * @package Cake.Configure @@ -85,6 +85,7 @@ class IniReader implements ConfigReaderInterface { * @param string $file Name of the file to read. The chosen file * must be on the reader's path. * @return array + * @throws ConfigureException */ public function read($file) { $filename = $this->_path . $file; diff --git a/lib/Cake/Console/Command/AclShell.php b/lib/Cake/Console/Command/AclShell.php index 60fce2cc2..a07b4e118 100644 --- a/lib/Cake/Console/Command/AclShell.php +++ b/lib/Cake/Console/Command/AclShell.php @@ -58,6 +58,7 @@ class AclShell extends Shell { /** * Override startup of the Shell * + * @return void */ public function startup() { parent::startup(); @@ -96,6 +97,7 @@ class AclShell extends Shell { /** * Override main() for help message hook * + * @return void */ public function main() { $this->out($this->OptionParser->help()); @@ -104,9 +106,10 @@ class AclShell extends Shell { /** * Creates an ARO/ACO node * + * @return void */ public function create() { - extract($this->__dataVars()); + extract($this->_dataVars()); $class = ucfirst($this->args[0]); $parent = $this->parseIdentifier($this->args[1]); @@ -136,9 +139,10 @@ class AclShell extends Shell { /** * Delete an ARO/ACO node. * + * @return void */ public function delete() { - extract($this->__dataVars()); + extract($this->_dataVars()); $identifier = $this->parseIdentifier($this->args[1]); $nodeId = $this->_getNodeId($class, $identifier); @@ -152,9 +156,10 @@ class AclShell extends Shell { /** * Set parent for an ARO/ACO node. * + * @return void */ public function setParent() { - extract($this->__dataVars()); + extract($this->_dataVars()); $target = $this->parseIdentifier($this->args[1]); $parent = $this->parseIdentifier($this->args[2]); @@ -175,9 +180,10 @@ class AclShell extends Shell { /** * Get path to specified ARO/ACO node. * + * @return void */ public function getPath() { - extract($this->__dataVars()); + extract($this->_dataVars()); $identifier = $this->parseIdentifier($this->args[1]); $id = $this->_getNodeId($class, $identifier); @@ -217,9 +223,10 @@ class AclShell extends Shell { /** * Check permission for a given ARO to a given ACO. * + * @return void */ public function check() { - extract($this->__getParams()); + extract($this->_getParams()); if ($this->Acl->check($aro, $aco, $action)) { $this->out(__d('cake_console', '%s is allowed.', $aroName), true); @@ -231,9 +238,10 @@ class AclShell extends Shell { /** * Grant permission for a given ARO to a given ACO. * + * @return void */ public function grant() { - extract($this->__getParams()); + extract($this->_getParams()); if ($this->Acl->allow($aro, $aco, $action)) { $this->out(__d('cake_console', 'Permission granted.'), true); @@ -245,9 +253,10 @@ class AclShell extends Shell { /** * Deny access for an ARO to an ACO. * + * @return void */ public function deny() { - extract($this->__getParams()); + extract($this->_getParams()); if ($this->Acl->deny($aro, $aco, $action)) { $this->out(__d('cake_console', 'Permission denied.'), true); @@ -259,9 +268,10 @@ class AclShell extends Shell { /** * Set an ARO to inherit permission to an ACO. * + * @return void */ public function inherit() { - extract($this->__getParams()); + extract($this->_getParams()); if ($this->Acl->inherit($aro, $aco, $action)) { $this->out(__d('cake_console', 'Permission inherited.'), true); @@ -273,9 +283,10 @@ class AclShell extends Shell { /** * Show a specific ARO/ACO node. * + * @return void */ public function view() { - extract($this->__dataVars()); + extract($this->_dataVars()); if (isset($this->args[1])) { $identity = $this->parseIdentifier($this->args[1]); @@ -332,6 +343,7 @@ class AclShell extends Shell { /** * Initialize ACL database. * + * @return mixed */ public function initdb() { return $this->dispatchShell('schema create DbAcl'); @@ -493,15 +505,13 @@ class AclShell extends Shell { /** * Checks that given node exists * - * @param string $type Node type (ARO/ACO) - * @param integer $id Node id * @return boolean Success */ public function nodeExists() { if (!isset($this->args[0]) || !isset($this->args[1])) { return false; } - extract($this->__dataVars($this->args[0])); + extract($this->_dataVars($this->args[0])); $key = is_numeric($this->args[1]) ? $secondary_id : 'alias'; $conditions = array($class . '.' . $key => $this->args[1]); $possibility = $this->Acl->{$class}->find('all', compact('conditions')); @@ -534,9 +544,9 @@ class AclShell extends Shell { * * @param string $class Class type you want (Aro/Aco) * @param mixed $identifier A mixed identifier for finding the node. - * @return int Integer of NodeId. Will trigger an error if nothing is found. + * @return integer Integer of NodeId. Will trigger an error if nothing is found. */ - function _getNodeId($class, $identifier) { + protected function _getNodeId($class, $identifier) { $node = $this->Acl->{$class}->node($identifier); if (empty($node)) { if (is_array($identifier)) { @@ -552,7 +562,7 @@ class AclShell extends Shell { * * @return array aro, aco, action */ - function __getParams() { + protected function _getParams() { $aro = is_numeric($this->args[0]) ? intval($this->args[0]) : $this->args[0]; $aco = is_numeric($this->args[1]) ? intval($this->args[1]) : $this->args[1]; $aroName = $aro; @@ -580,7 +590,7 @@ class AclShell extends Shell { * @param string $type Node type (ARO/ACO) * @return array Variables */ - function __dataVars($type = null) { + protected function _dataVars($type = null) { if ($type == null) { $type = $this->args[0]; } diff --git a/lib/Cake/Console/Command/ApiShell.php b/lib/Cake/Console/Command/ApiShell.php index fe2ab23f7..6b7c3b2d0 100644 --- a/lib/Cake/Console/Command/ApiShell.php +++ b/lib/Cake/Console/Command/ApiShell.php @@ -36,6 +36,7 @@ class ApiShell extends Shell { /** * Override initialize of the Shell * + * @return void */ public function initialize() { $this->paths = array_merge($this->paths, array( @@ -53,6 +54,7 @@ class ApiShell extends Shell { /** * Override main() to handle action * + * @return void */ public function main() { if (empty($this->args)) { @@ -86,7 +88,7 @@ class ApiShell extends Shell { $this->error(__d('cake_console', '%s not found', $class)); } - $parsed = $this->__parseClass($path . $class .'.php', $class); + $parsed = $this->_parseClass($path . $class .'.php', $class); if (!empty($parsed)) { if (isset($this->params['method'])) { @@ -150,6 +152,7 @@ class ApiShell extends Shell { /** * Show help for this shell. * + * @return void */ public function help() { $head = "Usage: cake api [] [-m ]\n"; @@ -187,11 +190,11 @@ class ApiShell extends Shell { * Parse a given class (located on given file) and get public methods and their * signatures. * - * @param object $File File object + * @param string $path File path * @param string $class Class name * @return array Methods and signatures indexed by method name */ - private function __parseClass($path, $class) { + protected function _parseClass($path, $class) { $parsed = array(); if (!class_exists($class)) { diff --git a/lib/Cake/Console/Command/BakeShell.php b/lib/Cake/Console/Command/BakeShell.php index 98fda1437..4b8fd6fe8 100644 --- a/lib/Cake/Console/Command/BakeShell.php +++ b/lib/Cake/Console/Command/BakeShell.php @@ -47,6 +47,7 @@ class BakeShell extends Shell { /** * Assign $this->connection to the active task if a connection param is set. * + * @return void */ public function startup() { parent::startup(); @@ -61,6 +62,7 @@ class BakeShell extends Shell { /** * Override main() to handle action * + * @return mixed */ public function main() { if (!is_dir($this->DbConfig->path)) { @@ -124,6 +126,7 @@ class BakeShell extends Shell { /** * Quickly bake the MVC * + * @return void */ public function all() { $this->out('Bake All'); diff --git a/lib/Cake/Console/Command/CommandListShell.php b/lib/Cake/Console/Command/CommandListShell.php index 9ffdf83e3..84bd71616 100644 --- a/lib/Cake/Console/Command/CommandListShell.php +++ b/lib/Cake/Console/Command/CommandListShell.php @@ -4,14 +4,15 @@ * * PHP 5 * - * CakePHP : Rapid Development Framework (http://cakephp.org) - * Copyright 2005-2011, Cake Software Foundation, Inc. + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP Project + * @package Cake.Console.Command * @since CakePHP v 2.0 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ @@ -75,7 +76,7 @@ class CommandListShell extends Shell { /** * Gets the shell command listing. * - * @return array + * @return array */ protected function _getShellList() { $shellList = array(); @@ -98,6 +99,9 @@ class CommandListShell extends Shell { /** * Scan the provided paths for shells, and append them into $shellList * + * @param string $type + * @param array $shells + * @param array $shellList * @return array */ protected function _appendShells($type, $shells, $shellList) { @@ -111,6 +115,7 @@ class CommandListShell extends Shell { /** * Output text. * + * @param array $shellList * @return void */ protected function _asText($shellList) { @@ -146,6 +151,7 @@ class CommandListShell extends Shell { /** * Generates the shell list sorted by where the shells are found. * + * @param array $shellList * @return void */ protected function _asSorted($shellList) { @@ -184,6 +190,7 @@ class CommandListShell extends Shell { /** * Output as XML * + * @param array $shellList * @return void */ protected function _asXml($shellList) { diff --git a/lib/Cake/Console/Command/ConsoleShell.php b/lib/Cake/Console/Command/ConsoleShell.php index da2f6e460..6f332bca9 100644 --- a/lib/Cake/Console/Command/ConsoleShell.php +++ b/lib/Cake/Console/Command/ConsoleShell.php @@ -47,6 +47,7 @@ class ConsoleShell extends Shell { /** * Override initialize of the Shell * + * @return void */ public function initialize() { App::uses('Dispatcher', 'Routing'); @@ -71,6 +72,7 @@ class ConsoleShell extends Shell { /** * Prints the help message * + * @return void */ public function help() { $out = 'Console help:'; @@ -133,6 +135,8 @@ class ConsoleShell extends Shell { /** * Override main() to handle action * + * @param string $command + * @return void */ public function main($command = null) { while (true) { diff --git a/lib/Cake/Console/Command/I18nShell.php b/lib/Cake/Console/Command/I18nShell.php index 05f3ab346..3db544b38 100644 --- a/lib/Cake/Console/Command/I18nShell.php +++ b/lib/Cake/Console/Command/I18nShell.php @@ -40,6 +40,7 @@ class I18nShell extends Shell { /** * Override startup of the Shell * + * @return mixed */ public function startup() { $this->_welcome(); @@ -58,6 +59,7 @@ class I18nShell extends Shell { /** * Override main() for help message hook * + * @return void */ public function main() { $this->out(__d('cake_console', 'I18n Shell')); @@ -91,6 +93,7 @@ class I18nShell extends Shell { /** * Initialize I18N database. * + * @return void */ public function initdb() { $this->dispatchShell('schema create i18n'); diff --git a/lib/Cake/Console/Command/SchemaShell.php b/lib/Cake/Console/Command/SchemaShell.php index 06cd47380..89bead3cf 100644 --- a/lib/Cake/Console/Command/SchemaShell.php +++ b/lib/Cake/Console/Command/SchemaShell.php @@ -30,13 +30,6 @@ App::uses('CakeSchema', 'Model'); */ class SchemaShell extends Shell { -/** - * is this a dry run? - * - * @var boolean - */ - private $__dry = null; - /** * Schema class being used. * @@ -44,9 +37,17 @@ class SchemaShell extends Shell { */ public $Schema; +/** + * is this a dry run? + * + * @var boolean + */ + protected $_dry = null; + /** * Override initialize * + * @return string */ public function initialize() { $this->_welcome(); @@ -57,6 +58,7 @@ class SchemaShell extends Shell { /** * Override startup * + * @return void */ public function startup() { $name = $path = $connection = $plugin = null; @@ -103,6 +105,7 @@ class SchemaShell extends Shell { * Read and output contents of schema object * path to read as second arg * + * @return void */ public function view() { $File = new File($this->Schema->path . DS . $this->params['file']); @@ -120,6 +123,7 @@ class SchemaShell extends Shell { * Read database and Write schema object * accepts a connection as first arg or path to save as second arg * + * @return void */ public function generate() { $this->out(__d('cake_console', 'Generating Schema...')); @@ -197,6 +201,7 @@ class SchemaShell extends Shell { * If -write contains a full path name the file will be saved there. If -write only * contains no DS, that will be used as the file name, in the same dir as the schema file. * + * @return string */ public function dump() { $write = false; @@ -245,7 +250,7 @@ class SchemaShell extends Shell { */ public function create() { list($Schema, $table) = $this->_loadSchema(); - $this->__create($Schema, $table); + $this->_create($Schema, $table); } /** @@ -255,7 +260,7 @@ class SchemaShell extends Shell { */ public function update() { list($Schema, $table) = $this->_loadSchema(); - $this->__update($Schema, $table); + $this->_update($Schema, $table); } /** @@ -263,7 +268,7 @@ class SchemaShell extends Shell { * * @return void */ - function _loadSchema() { + protected function _loadSchema() { $name = $plugin = null; if (!empty($this->params['name'])) { $name = $this->params['name']; @@ -273,7 +278,7 @@ class SchemaShell extends Shell { } if (!empty($this->params['dry'])) { - $this->__dry = true; + $this->_dry = true; $this->out(__d('cake_console', 'Performing a dry run.')); } @@ -300,8 +305,11 @@ class SchemaShell extends Shell { * Create database from Schema object * Should be called via the run method * + * @param CakeSchema $Schema + * @param string $table + * @return void */ - function __create($Schema, $table = null) { + protected function _create($Schema, $table = null) { $db = ConnectionManager::getDataSource($this->Schema->connection); $drop = $create = array(); @@ -325,7 +333,7 @@ class SchemaShell extends Shell { if ('y' == $this->in(__d('cake_console', 'Are you sure you want to drop the table(s)?'), array('y', 'n'), 'n')) { $this->out(__d('cake_console', 'Dropping table(s).')); - $this->__run($drop, 'drop', $Schema); + $this->_run($drop, 'drop', $Schema); } $this->out("\n" . __d('cake_console', 'The following table(s) will be created.')); @@ -333,7 +341,7 @@ class SchemaShell extends Shell { if ('y' == $this->in(__d('cake_console', 'Are you sure you want to create the table(s)?'), array('y', 'n'), 'y')) { $this->out(__d('cake_console', 'Creating table(s).')); - $this->__run($create, 'create', $Schema); + $this->_run($create, 'create', $Schema); } $this->out(__d('cake_console', 'End create.')); } @@ -342,8 +350,11 @@ class SchemaShell extends Shell { * Update database with Schema object * Should be called via the run method * + * @param CakeSchema $Schema + * @param string $table + * @return void */ - function __update(&$Schema, $table = null) { + protected function _update(&$Schema, $table = null) { $db = ConnectionManager::getDataSource($this->Schema->connection); $this->out(__d('cake_console', 'Comparing Database to Schema...')); @@ -374,17 +385,21 @@ class SchemaShell extends Shell { if ('y' == $this->in(__d('cake_console', 'Are you sure you want to alter the tables?'), array('y', 'n'), 'n')) { $this->out(); $this->out(__d('cake_console', 'Updating Database...')); - $this->__run($contents, 'update', $Schema); + $this->_run($contents, 'update', $Schema); } $this->out(__d('cake_console', 'End update.')); } /** - * Runs sql from __create() or __update() + * Runs sql from _create() or _update() * + * @param array $contents + * @param string $event + * @param CakeSchema $Schema + * @return void */ - function __run($contents, $event, &$Schema) { + protected function _run($contents, $event, &$Schema) { if (empty($contents)) { $this->err(__d('cake_console', 'Sql could not be run')); return; @@ -396,7 +411,7 @@ class SchemaShell extends Shell { if (empty($sql)) { $this->out(__d('cake_console', '%s is up to date.', $table)); } else { - if ($this->__dry === true) { + if ($this->_dry === true) { $this->out(__d('cake_console', 'Dry run for %s :', $table)); $this->out($sql); } else { diff --git a/lib/Cake/Console/Command/Task/BakeTask.php b/lib/Cake/Console/Command/Task/BakeTask.php index f3b4a413e..14fa8ae7f 100644 --- a/lib/Cake/Console/Command/Task/BakeTask.php +++ b/lib/Cake/Console/Command/Task/BakeTask.php @@ -26,7 +26,6 @@ class BakeTask extends Shell { * Name of plugin * * @var string - * @access public */ public $plugin = null; @@ -34,7 +33,6 @@ class BakeTask extends Shell { * The db connection being used for baking * * @var string - * @access public */ public $connection = null; diff --git a/lib/Cake/Console/Command/Task/ControllerTask.php b/lib/Cake/Console/Command/Task/ControllerTask.php index e37e78c77..b4a493b3f 100644 --- a/lib/Cake/Console/Command/Task/ControllerTask.php +++ b/lib/Cake/Console/Command/Task/ControllerTask.php @@ -43,6 +43,7 @@ class ControllerTask extends BakeTask { /** * Override initialize * + * @return void */ public function initialize() { $this->path = current(App::path('Controller')); @@ -51,6 +52,7 @@ class ControllerTask extends BakeTask { /** * Execution method always used for tasks * + * @return void */ public function execute() { parent::execute(); @@ -203,6 +205,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 * @return void */ public function confirmController($controllerName, $useDynamicScaffold, $helpers, $components) { @@ -299,7 +305,6 @@ class ControllerTask extends BakeTask { * @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 */ public function bake($controllerName, $actions = '', $helpers = null, $components = null) { @@ -360,7 +365,7 @@ class ControllerTask extends BakeTask { * Common code for property choice handling. * * @param string $prompt A yes/no question to precede the list - * @param sting $example A question for a comma separated list, with examples. + * @param string $example A question for a comma separated list, with examples. * @return array Array of values for property. */ protected function _doPropertyChoices($prompt, $example) { @@ -378,7 +383,6 @@ class ControllerTask extends BakeTask { * Outputs and gets the list of possible controllers from database * * @param string $useDbConfig Database configuration name - * @param boolean $interactive Whether you are using listAll interactively and want options output. * @return array Set of controllers */ public function listAll($useDbConfig = null) { @@ -462,6 +466,7 @@ class ControllerTask extends BakeTask { /** * Displays help contents * + * @return void */ public function help() { $this->hr(); diff --git a/lib/Cake/Console/Command/Task/DbConfigTask.php b/lib/Cake/Console/Command/Task/DbConfigTask.php index d94c2d54d..5ba0118f6 100644 --- a/lib/Cake/Console/Command/Task/DbConfigTask.php +++ b/lib/Cake/Console/Command/Task/DbConfigTask.php @@ -60,7 +60,7 @@ class DbConfigTask extends Shell { /** * initialization callback * - * @var string + * @return void */ public function initialize() { $this->path = APP . 'Config' . DS; @@ -69,6 +69,7 @@ class DbConfigTask extends Shell { /** * Execution method always used for tasks * + * @return void */ public function execute() { if (empty($this->args)) { @@ -197,6 +198,7 @@ class DbConfigTask extends Shell { /** * Output verification message and bake if it looks good * + * @param array $config * @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 61de93e9e..3474fe4a9 100644 --- a/lib/Cake/Console/Command/Task/ExtractTask.php +++ b/lib/Cake/Console/Command/Task/ExtractTask.php @@ -377,7 +377,7 @@ class ExtractTask extends Shell { * @param string $field the name of the field that is being processed * @param array $rules the set of validation rules for the field * @param string $file the file name where this validation rule was found - * @param string domain default domain to bind the validations to + * @param string $domain default domain to bind the validations to * @return void */ protected function _processValidationRules($field, $rules, $file, $domain) { @@ -438,6 +438,9 @@ class ExtractTask extends Shell { /** * Prepare a file to be stored * + * @param string $domain + * @param string $header + * @param string $sentence * @return void */ protected function _store($domain, $header, $sentence) { @@ -513,8 +516,8 @@ class ExtractTask extends Shell { /** * Get the strings from the position forward * - * @param int $position Actual position on tokens array - * @param int $target Number of strings to extract + * @param integer $position Actual position on tokens array + * @param integer $target Number of strings to extract * @return array Strings extracted */ protected function _getStrings(&$position, $target) { diff --git a/lib/Cake/Console/Command/Task/FixtureTask.php b/lib/Cake/Console/Command/Task/FixtureTask.php index 23b959123..47f8b51c1 100644 --- a/lib/Cake/Console/Command/Task/FixtureTask.php +++ b/lib/Cake/Console/Command/Task/FixtureTask.php @@ -43,13 +43,16 @@ class FixtureTask extends BakeTask { /** * Schema instance * - * @var object + * @var CakeSchema */ protected $_Schema = null; /** * Override initialize * + * @param ConsoleOutput $stdout A ConsoleOutput object for stdout. + * @param ConsoleOutput $stderr A ConsoleOutput object for stderr. + * @param ConsoleInput $stdin A ConsoleInput object for stdin. */ public function __construct($stdout = null, $stderr = null, $stdin = null) { parent::__construct($stdout, $stderr, $stdin); @@ -236,7 +239,7 @@ class FixtureTask extends BakeTask { * Generate the fixture file, and write to disk * * @param string $model name of the model being generated - * @param string $fixture Contents of the fixture file. + * @param string $otherVars Contents of the fixture file. * @return string Content saved into fixture file. */ public function generateFixtureFile($model, $otherVars) { @@ -271,7 +274,7 @@ class FixtureTask extends BakeTask { /** * Generates a string representation of a schema. * - * @param array $table Table schema array + * @param array $tableInfo Table schema array * @return string fields definitions */ protected function _generateSchema($tableInfo) { @@ -282,7 +285,8 @@ class FixtureTask extends BakeTask { /** * Generate String representation of Records * - * @param array $table Table schema array + * @param array $tableInfo Table schema array + * @param integer $recordCount * @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 293dfa201..297532d91 100644 --- a/lib/Cake/Console/Command/Task/ModelTask.php +++ b/lib/Cake/Console/Command/Task/ModelTask.php @@ -66,6 +66,7 @@ class ModelTask extends BakeTask { /** * Override initialize * + * @return void */ public function initialize() { $this->path = current(App::path('Model')); @@ -74,6 +75,7 @@ class ModelTask extends BakeTask { /** * Execution method always used for tasks * + * @return void */ public function execute() { parent::execute(); @@ -127,7 +129,8 @@ class ModelTask extends BakeTask { * Get a model object for a class name. * * @param string $className Name of class you want model to be. - * @return object Model instance + * @param string $table Table name + * @return Model Model instance */ protected function &_getModelObject($className, $table = null) { if (!$table) { @@ -143,7 +146,7 @@ class ModelTask extends BakeTask { * @param array $options Array of options to use for the selections. indexes must start at 0 * @param string $prompt Prompt to use for options list. * @param integer $default The default option for the given prompt. - * @return result of user choice. + * @return integer result of user choice. */ public function inOptions($options, $prompt = null, $default = null) { $valid = false; @@ -166,6 +169,7 @@ class ModelTask extends BakeTask { /** * Handles interactive baking * + * @return boolean */ protected function _interactive() { $this->hr(); @@ -308,7 +312,7 @@ class ModelTask extends BakeTask { /** * Handles Generation and user interaction for creating validation. * - * @param object $model Model to have validations generated for. + * @param Model $model Model to have validations generated for. * @return array $validate Array of user selected validations. */ public function doValidation($model) { @@ -359,6 +363,7 @@ class ModelTask extends BakeTask { * * @param string $fieldName Name of field to be validated. * @param array $metaData metadata for field + * @param string $primaryKey * @return array Array of validation for the field. */ public function fieldValidation($fieldName, $metaData, $primaryKey = 'id') { @@ -443,7 +448,7 @@ class ModelTask extends BakeTask { /** * Handles associations * - * @param object $model + * @param Model $model * @return array $assocaitons */ public function doAssociations($model) { @@ -492,7 +497,7 @@ class ModelTask extends BakeTask { /** * Find belongsTo relations and add them to the associations list. * - * @param object $model Model instance of model being generated. + * @param Model $model Model instance of model being generated. * @param array $associations Array of inprogress associations * @return array $associations with belongsTo added in. */ @@ -521,7 +526,7 @@ class ModelTask extends BakeTask { /** * Find the hasOne and HasMany relations and add them to associations list * - * @param object $model Model instance being generated + * @param Model $model Model instance being generated * @param array $associations Array of inprogress associations * @return array $associations with hasOne and hasMany added in. */ @@ -564,7 +569,7 @@ class ModelTask extends BakeTask { /** * Find the hasAndBelongsToMany relations and add them to associations list * - * @param object $model Model instance being generated + * @param Model $model Model instance being generated * @param array $associations Array of in-progress associations * @return array $associations with hasAndBelongsToMany added in. */ @@ -630,7 +635,7 @@ class ModelTask extends BakeTask { /** * Interact with the user and generate additional non-conventional associations * - * @param object $model Temporary model instance + * @param Model $model Temporary model instance * @param array $associations Array of associations. * @return array Array of associations. */ @@ -717,6 +722,7 @@ class ModelTask extends BakeTask { * * @param mixed $name Model name or object * @param mixed $data if array and $name is not an object assume bake data, otherwise boolean. + * @return string */ public function bake($name, $data = array()) { if (is_object($name)) { @@ -752,6 +758,7 @@ class ModelTask extends BakeTask { * Assembles and writes a unit test file * * @param string $className Model class name + * @return string */ public function bakeTest($className) { $this->Test->interactive = $this->interactive; @@ -764,6 +771,7 @@ class ModelTask extends BakeTask { * outputs the a list of possible models or controllers from database * * @param string $useDbConfig Database configuration name + * @return array */ public function listAll($useDbConfig = null) { $this->_tables = $this->getAllTables($useDbConfig); @@ -843,6 +851,7 @@ class ModelTask extends BakeTask { /** * Forces the user to specify the model he wants to bake, and returns the selected model name. * + * @param string $useDbConfig Database config name * @return string the model name */ public function getName($useDbConfig = null) { diff --git a/lib/Cake/Console/Command/Task/PluginTask.php b/lib/Cake/Console/Command/Task/PluginTask.php index 6787150cd..7a1209a06 100644 --- a/lib/Cake/Console/Command/Task/PluginTask.php +++ b/lib/Cake/Console/Command/Task/PluginTask.php @@ -65,6 +65,7 @@ class PluginTask extends Shell { /** * Interactive interface * + * @param string $plugin * @return void */ protected function _interactive($plugin = null) { @@ -80,8 +81,8 @@ class PluginTask extends Shell { /** * Bake the plugin, create directories and files * - * @params $plugin name of the plugin in CamelCased format - * @return bool + * @param string $plugin Name of the plugin in CamelCased format + * @return boolean */ public function bake($plugin) { $pathOptions = App::path('plugins'); @@ -154,6 +155,7 @@ class PluginTask extends Shell { /** * find and change $this->path to the user selection * + * @param array $pathOptions * @return string plugin path */ public function findPath($pathOptions) { diff --git a/lib/Cake/Console/Command/Task/ProjectTask.php b/lib/Cake/Console/Command/Task/ProjectTask.php index aa7727e13..8784c4cde 100644 --- a/lib/Cake/Console/Command/Task/ProjectTask.php +++ b/lib/Cake/Console/Command/Task/ProjectTask.php @@ -40,7 +40,7 @@ class ProjectTask extends Shell { * Checks that given project path does not already exist, and * finds the app directory in it. Then it calls bake() with that information. * - * @param string $project Project path + * @return mixed */ public function execute() { $project = null; @@ -52,7 +52,7 @@ class ProjectTask extends Shell { $prompt = __d('cake_console', "What is the path to the project you want to bake?"); $project = $this->in($prompt, null, APP . 'myapp'); } - + if ($project && !Folder::isAbsolute($project) && isset($_SERVER['PWD'])) { $project = $_SERVER['PWD'] . DS . $project; @@ -136,7 +136,7 @@ class ProjectTask extends Shell { /** * Checks PHP's include_path for CakePHP. * - * @return bool Indicates whether or not CakePHP exists on include_path + * @return boolean Indicates whether or not CakePHP exists on include_path */ public function cakeOnIncludePath() { $paths = explode(PATH_SEPARATOR, ini_get('include_path')); @@ -157,6 +157,7 @@ class ProjectTask extends Shell { * @param string $path Project path * @param string $skel Path to copy from * @param string $skip array of directories to skip when copying + * @return mixed */ public function bake($path, $skel = null, $skip = array('empty')) { if (!$skel && !empty($this->params['skel'])) { @@ -303,7 +304,7 @@ class ProjectTask extends Shell { * Generates and writes CAKE_CORE_INCLUDE_PATH * * @param string $path Project path - * @param bool $hardCode Wether or not define calls should be hardcoded. + * @param boolean $hardCode Wether or not define calls should be hardcoded. * @return boolean Success */ public function corePath($path, $hardCode = true) { @@ -325,7 +326,7 @@ class ProjectTask extends Shell { * * @param string $filename The filename to operate on. * @param boolean $hardCode Whether or not the define should be uncommented. - * @retun bool Success + * @return boolean Success */ protected function _replaceCorePath($filename, $hardCode) { $contents = file_get_contents($filename); diff --git a/lib/Cake/Console/Command/Task/TemplateTask.php b/lib/Cake/Console/Command/Task/TemplateTask.php index 1bac211b7..ee517cc9d 100644 --- a/lib/Cake/Console/Command/Task/TemplateTask.php +++ b/lib/Cake/Console/Command/Task/TemplateTask.php @@ -102,7 +102,7 @@ class TemplateTask extends Shell { /** * Set variable values to the template scope * - * @param mixed $one A string or an array of data. + * @param string|array $one A string or an array of data. * @param mixed $two Value in case $one is a string (which then works as the key). * Unused if $one is an associative array, otherwise serves as the values to $one's keys. * @return void @@ -129,8 +129,8 @@ class TemplateTask extends Shell { * * @param string $directory directory / type of thing you want * @param string $filename template name - * @param string $vars Additional vars to set to template scope. - * @return contents of generated code template + * @param array $vars Additional vars to set to template scope. + * @return string contents of generated code template */ public function generate($directory, $filename, $vars = null) { if ($vars !== null) { diff --git a/lib/Cake/Console/Command/Task/TestTask.php b/lib/Cake/Console/Command/Task/TestTask.php index 68e28e0b9..a138fde45 100644 --- a/lib/Cake/Console/Command/Task/TestTask.php +++ b/lib/Cake/Console/Command/Task/TestTask.php @@ -56,13 +56,14 @@ class TestTask extends BakeTask { /** * Internal list of fixtures that have been added so far. * - * @var string + * @var array */ protected $_fixtures = array(); /** * Execution method always used for tasks * + * @return void */ public function execute() { parent::execute(); @@ -85,6 +86,8 @@ class TestTask extends BakeTask { /** * Handles interactive baking * + * @param string $type + * @return string|boolean */ protected function _interactive($type = null) { $this->interactive = true; @@ -110,6 +113,7 @@ class TestTask extends BakeTask { * * @param string $type Type of object to bake test case for ie. Model, Controller * @param string $className the 'cake name' for the class ie. Posts for the PostsController + * @return string|boolean */ public function bake($type, $className) { if ($this->typeCanDetectFixtures($type) && $this->isLoadableClass($type, $className)) { @@ -215,7 +219,6 @@ class TestTask extends BakeTask { * Currently only model, and controller are supported * * @param string $type The Type of object you are generating tests for eg. controller - * @param string $className the Classname of the class the test is being generated for. * @return boolean */ public function typeCanDetectFixtures($type) { @@ -227,7 +230,7 @@ class TestTask extends BakeTask { * Check if a class with the given type is loaded or can be loaded. * * @param string $type The Type of object you are generating tests for eg. controller - * @param string $className the Classname of the class the test is being generated for. + * @param string $class the Classname of the class the test is being generated for. * @return boolean */ public function isLoadableClass($type, $class) { @@ -398,7 +401,7 @@ class TestTask extends BakeTask { * Generate a constructor code snippet for the type and classname * * @param string $type The Type of object you are generating tests for eg. controller - * @param string $className the Classname of the class the test is being generated for. + * @param string $fullClassName The Classname of the class the test is being generated for. * @return string Constructor snippet for the thing you are building. */ public function generateConstructor($type, $fullClassName) { diff --git a/lib/Cake/Console/Command/Task/ViewTask.php b/lib/Cake/Console/Command/Task/ViewTask.php index 29bee5d34..6494b90aa 100644 --- a/lib/Cake/Console/Command/Task/ViewTask.php +++ b/lib/Cake/Console/Command/Task/ViewTask.php @@ -72,6 +72,7 @@ class ViewTask extends BakeTask { /** * Override initialize * + * @return void */ public function initialize() { $this->path = current(App::path('View')); @@ -80,6 +81,7 @@ class ViewTask extends BakeTask { /** * Execution method always used for tasks * + * @return mixed */ public function execute() { parent::execute(); @@ -113,7 +115,7 @@ class ViewTask extends BakeTask { return $this->bake($action, true); } - $vars = $this->__loadController(); + $vars = $this->_loadController(); $methods = $this->_methodsToBake(); foreach ($methods as $method) { @@ -175,7 +177,7 @@ class ViewTask extends BakeTask { $this->controllerName = $this->_controllerName($model); App::uses($model, 'Model'); if (class_exists($model)) { - $vars = $this->__loadController(); + $vars = $this->_loadController(); if (!$actions) { $actions = $this->_methodsToBake(); } @@ -188,6 +190,7 @@ class ViewTask extends BakeTask { /** * Handles interactive baking * + * @return void */ protected function _interactive() { $this->hr(); @@ -216,7 +219,7 @@ class ViewTask extends BakeTask { $wannaDoAdmin = $this->in(__d('cake_console', "Would you like to create the views for admin routing?"), array('y','n'), 'n'); if (strtolower($wannaDoScaffold) == 'y' || strtolower($wannaDoAdmin) == 'y') { - $vars = $this->__loadController(); + $vars = $this->_loadController(); if (strtolower($wannaDoScaffold) == 'y') { $actions = $this->scaffoldActions; $this->bakeActions($actions, $vars); @@ -247,7 +250,7 @@ class ViewTask extends BakeTask { * * @return array Returns an variables to be made available to a view template */ - private function __loadController() { + protected function _loadController() { if (!$this->controllerName) { $this->err(__d('cake_console', 'Controller not found')); } @@ -277,7 +280,7 @@ class ViewTask extends BakeTask { $singularHumanName = $this->_singularHumanName($this->controllerName); $schema = $modelObj->schema(true); $fields = array_keys($schema); - $associations = $this->__associations($modelObj); + $associations = $this->_associations($modelObj); } else { $primaryKey = $displayField = null; $singularVar = Inflector::variable(Inflector::singularize($this->controllerName)); @@ -295,6 +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 * @return void */ public function bakeActions($actions, $vars) { @@ -363,7 +367,7 @@ class ViewTask extends BakeTask { */ public function getContent($action, $vars = null) { if (!$vars) { - $vars = $this->__loadController(); + $vars = $this->_loadController(); } $this->Template->set('action', $action); @@ -436,9 +440,10 @@ class ViewTask extends BakeTask { /** * Returns associations for controllers models. * - * @return array $associations + * @param Model $model + * @return array $associations */ - private function __associations($model) { + protected function _associations($model) { $keys = array('belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany'); $associations = array(); diff --git a/lib/Cake/Console/Command/TestsuiteShell.php b/lib/Cake/Console/Command/TestsuiteShell.php index 00725e1b0..681b6036a 100644 --- a/lib/Cake/Console/Command/TestsuiteShell.php +++ b/lib/Cake/Console/Command/TestsuiteShell.php @@ -167,6 +167,7 @@ class TestsuiteShell extends Shell { * Initialization method installs PHPUnit and loads all plugins * * @return void + * @throws Exception */ public function initialize() { $this->_dispatcher = new CakeTestSuiteDispatcher(); @@ -181,7 +182,7 @@ class TestsuiteShell extends Shell { * * @return array Array of params for CakeTestDispatcher */ - protected function parseArgs() { + protected function _parseArgs() { if (empty($this->args)) { return; } @@ -213,7 +214,7 @@ class TestsuiteShell extends Shell { * * @return array Array of params for CakeTestDispatcher */ - protected function runnerOptions() { + protected function _runnerOptions() { $options = array(); $params = $this->params; unset($params['help']); @@ -245,23 +246,23 @@ class TestsuiteShell extends Shell { $this->out(__d('cake_console', 'CakePHP Test Shell')); $this->hr(); - $args = $this->parseArgs(); + $args = $this->_parseArgs(); if (empty($args['case'])) { return $this->available(); } - $this->run($args, $this->runnerOptions()); + $this->_run($args, $this->_runnerOptions()); } /** * Runs the test case from $runnerArgs * - * @param array $runnerArgs list of arguments as obtained from parseArgs() - * @param array $options list of options as constructed by runnerOptions() + * @param array $runnerArgs list of arguments as obtained from _parseArgs() + * @param array $options list of options as constructed by _runnerOptions() * @return void */ - protected function run($runnerArgs, $options = array()) { + protected function _run($runnerArgs, $options = array()) { restore_error_handler(); restore_error_handler(); @@ -275,7 +276,7 @@ class TestsuiteShell extends Shell { * @return void */ public function available() { - $params = $this->parseArgs(); + $params = $this->_parseArgs(); $testCases = CakeTestLoader::generateTestList($params); $app = $params['app']; $plugin = $params['plugin']; @@ -309,14 +310,14 @@ class TestsuiteShell extends Shell { if (is_numeric($choice) && isset($cases[$choice])) { $this->args[0] = $category; $this->args[1] = $cases[$choice]; - $this->run($this->parseArgs(), $this->runnerOptions()); + $this->_run($this->_parseArgs(), $this->_runnerOptions()); break; } if (is_string($choice) && in_array($choice, $cases)) { $this->args[0] = $category; $this->args[1] = $choice; - $this->run($this->parseArgs(), $this->runnerOptions()); + $this->_run($this->_parseArgs(), $this->_runnerOptions()); break; } diff --git a/lib/Cake/Console/Command/UpgradeShell.php b/lib/Cake/Console/Command/UpgradeShell.php index 0c393faec..b32bb0d2b 100644 --- a/lib/Cake/Console/Command/UpgradeShell.php +++ b/lib/Cake/Console/Command/UpgradeShell.php @@ -1,4 +1,22 @@ 'Controller', 'Component' => 'Controller/Component', diff --git a/lib/Cake/Console/ConsoleErrorHandler.php b/lib/Cake/Console/ConsoleErrorHandler.php index 8fe8f33cd..43f3ec1b4 100644 --- a/lib/Cake/Console/ConsoleErrorHandler.php +++ b/lib/Cake/Console/ConsoleErrorHandler.php @@ -20,7 +20,7 @@ App::uses('ConsoleOutput', 'Console'); App::uses('CakeLog', 'Log'); /** - * Error Handler for Cake console. Does simple printing of the + * Error Handler for Cake console. Does simple printing of the * exception that occurred and the stack trace of the error. * * @package Cake.Console @@ -30,16 +30,14 @@ class ConsoleErrorHandler extends ErrorHandler { /** * Standard error stream. * - * @var filehandle - * @access public + * @var ConsoleOutput */ public static $stderr; /** * Get the stderr object for the console error handling. * - * @param Exception $error Exception to handle. - * @param array $messages Error messages + * @return ConsoleOutput */ public static function getStderr() { if (empty(self::$stderr)) { @@ -57,7 +55,7 @@ class ConsoleErrorHandler extends ErrorHandler { public static function handleException(Exception $exception) { $stderr = self::getStderr(); $stderr->write(__d('cake_console', "Error: %s\n%s", - $exception->getMessage(), + $exception->getMessage(), $exception->getTraceAsString() )); } @@ -66,10 +64,10 @@ class ConsoleErrorHandler extends ErrorHandler { * Handle errors in the console environment. Writes errors to stderr, * and logs messages if Configure::read('debug') is 0. * - * @param int $code Error code + * @param integer $code Error code * @param string $description Description of the error. * @param string $file The file the error occurred in. - * @param int $line The line the error occurred on. + * @param integer $line The line the error occurred on. * @param array $context The backtrace of the error. * @return void */ diff --git a/lib/Cake/Console/ConsoleInput.php b/lib/Cake/Console/ConsoleInput.php index 3223ccd32..f6d52a9b0 100644 --- a/lib/Cake/Console/ConsoleInput.php +++ b/lib/Cake/Console/ConsoleInput.php @@ -17,7 +17,7 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** - * Object wrapper for interacting with stdin + * Object wrapper for interacting with stdin * * @package Cake.Console */ diff --git a/lib/Cake/Console/ConsoleInputArgument.php b/lib/Cake/Console/ConsoleInputArgument.php index 0b686ed03..b44579894 100644 --- a/lib/Cake/Console/ConsoleInputArgument.php +++ b/lib/Cake/Console/ConsoleInputArgument.php @@ -84,8 +84,8 @@ class ConsoleInputArgument { /** * Generate the help for this argument. * - * @param int $width The width to make the name of the option. - * @return string + * @param integer $width The width to make the name of the option. + * @return string */ public function help($width = 0) { $name = $this->_name; @@ -131,7 +131,9 @@ class ConsoleInputArgument { /** * Check that $value is a valid choice for this argument. * + * @param string $value * @return boolean + * @throws ConsoleException */ public function validChoice($value) { if (empty($this->_choices)) { @@ -139,7 +141,7 @@ class ConsoleInputArgument { } if (!in_array($value, $this->_choices)) { throw new ConsoleException( - __d('cake_console', '"%s" is not a valid value for %s. Please use one of "%s"', + __d('cake_console', '"%s" is not a valid value for %s. Please use one of "%s"', $value, $this->_name, implode(', ', $this->_choices) )); } @@ -149,7 +151,7 @@ class ConsoleInputArgument { /** * Append this arguments XML representation to the passed in SimpleXml object. * - * @param SimpleXmlElement The parent element. + * @param SimpleXmlElement $parent The parent element. * @return SimpleXmlElement The parent with this argument appended. */ public function xml(SimpleXmlElement $parent) { diff --git a/lib/Cake/Console/ConsoleInputOption.php b/lib/Cake/Console/ConsoleInputOption.php index 67b7d61a8..d52e3cb6e 100644 --- a/lib/Cake/Console/ConsoleInputOption.php +++ b/lib/Cake/Console/ConsoleInputOption.php @@ -75,6 +75,7 @@ class ConsoleInputOption { * @param boolean $boolean Whether this option is a boolean option. Boolean options don't consume extra tokens * @param string $default The default value for this option. * @param array $choices Valid choices for this option. + * @throws ConsoleException */ public function __construct($name, $short = null, $help = '', $boolean = false, $default = '', $choices = array()) { if (is_array($name) && isset($name['name'])) { @@ -117,8 +118,8 @@ class ConsoleInputOption { /** * Generate the help for this this option. * - * @param int $width The width to make the name of the option. - * @return string + * @param integer $width The width to make the name of the option. + * @return string */ public function help($width = 0) { $default = $short = ''; @@ -176,7 +177,9 @@ class ConsoleInputOption { /** * Check that a value is a valid choice for this option. * + * @param string $value * @return boolean + * @throws ConsoleException */ public function validChoice($value) { if (empty($this->_choices)) { @@ -194,7 +197,7 @@ class ConsoleInputOption { /** * Append the option's xml into the parent. * - * @param SimpleXmlElement The parent element. + * @param SimpleXmlElement $parent The parent element. * @return SimpleXmlElement The parent with this option appended. */ public function xml(SimpleXmlElement $parent) { diff --git a/lib/Cake/Console/ConsoleInputSubcommand.php b/lib/Cake/Console/ConsoleInputSubcommand.php index 8bbf01982..4cac34244 100644 --- a/lib/Cake/Console/ConsoleInputSubcommand.php +++ b/lib/Cake/Console/ConsoleInputSubcommand.php @@ -37,7 +37,7 @@ class ConsoleInputSubcommand { * * @var string */ - protected $_help; + protected $_help; /** * The ConsoleOptionParser for this subcommand. @@ -51,7 +51,7 @@ class ConsoleInputSubcommand { * * @param mixed $name The long name of the subcommand, or an array with all the properties. * @param string $help The help text for this option - * @param mixed $parser A parser for this subcommand. Either a ConsoleOptionParser, or an array that can be + * @param mixed $parser A parser for this subcommand. Either a ConsoleOptionParser, or an array that can be * used with ConsoleOptionParser::buildFromArray() */ public function __construct($name, $help = '', $parser = null) { @@ -82,8 +82,8 @@ class ConsoleInputSubcommand { /** * Generate the help for this this subcommand. * - * @param int $width The width to make the name of the subcommand. - * @return string + * @param integer $width The width to make the name of the subcommand. + * @return string */ public function help($width = 0) { $name = $this->_name; @@ -108,7 +108,7 @@ class ConsoleInputSubcommand { /** * Append this subcommand to the Parent element * - * @param SimpleXmlElement The parent element. + * @param SimpleXmlElement $parent The parent element. * @return SimpleXmlElement The parent with this subcommand appended. */ public function xml(SimpleXmlElement $parent) { diff --git a/lib/Cake/Console/ConsoleOptionParser.php b/lib/Cake/Console/ConsoleOptionParser.php index 063ba9eff..ffafa76d6 100644 --- a/lib/Cake/Console/ConsoleOptionParser.php +++ b/lib/Cake/Console/ConsoleOptionParser.php @@ -232,7 +232,7 @@ class ConsoleOptionParser { /** * Get or set the description text for shell/task. * - * @param mixed $text The text to set, or null if you want to read. If an array the + * @param mixed $text The text to set, or null if you want to read. If an array the * text will be imploded with "\n" * @return mixed If reading, the value of the description. If setting $this will be returned */ @@ -284,8 +284,8 @@ class ConsoleOptionParser { * * @param mixed $name The long name you want to the value to be parsed out as when options are parsed. * Will also accept an instance of ConsoleInputOption - * @param array $params An array of parameters that define the behavior of the option - * @return returns $this. + * @param array $options An array of parameters that define the behavior of the option + * @return ConsoleOptionParser $this. */ public function addOption($name, $options = array()) { if (is_object($name) && $name instanceof ConsoleInputOption) { @@ -325,7 +325,7 @@ class ConsoleOptionParser { * * @param mixed $name The name of the argument. Will also accept an instance of ConsoleInputArgument * @param array $params Parameters for the argument, see above. - * @return $this. + * @return ConsoleOptionParser $this. */ public function addArgument($name, $params = array()) { if (is_object($name) && $name instanceof ConsoleInputArgument) { @@ -354,7 +354,7 @@ class ConsoleOptionParser { * * @param array $args Array of arguments to add. * @see ConsoleOptionParser::addArgument() - * @return $this + * @return ConsoleOptionParser $this */ public function addArguments(array $args) { foreach ($args as $name => $params) { @@ -369,7 +369,7 @@ class ConsoleOptionParser { * * @param array $options Array of options to add. * @see ConsoleOptionParser::addOption() - * @return $this + * @return ConsoleOptionParser $this */ public function addOptions(array $options) { foreach ($options as $name => $params) { @@ -390,8 +390,8 @@ class ConsoleOptionParser { * it will be used. * * @param mixed $name Name of the subcommand. Will also accept an instance of ConsoleInputSubcommand - * @param array $params Array of params, see above. - * @return $this. + * @param array $options Array of params, see above. + * @return ConsoleOptionParser $this. */ public function addSubcommand($name, $options = array()) { if (is_object($name) && $name instanceof ConsoleInputSubcommand) { @@ -414,7 +414,7 @@ class ConsoleOptionParser { * Add multiple subcommands at once. * * @param array $commands Array of subcommands. - * @return $this + * @return ConsoleOptionParser $this */ public function addSubcommands(array $commands) { foreach ($commands as $name => $params) { @@ -459,8 +459,7 @@ class ConsoleOptionParser { * @param string $command The subcommand to use. If this parameter is a subcommand, that has a parser, * That parser will be used to parse $argv instead. * @return Array array($params, $args) - * @throws InvalidArgumentException When an invalid parameter is encountered. - * RuntimeException when required arguments are not supplied. + * @throws ConsoleException When an invalid parameter is encountered. */ public function parse($argv, $command = null) { if (isset($this->_subcommands[$command]) && $this->_subcommands[$command]->parser()) { @@ -506,7 +505,8 @@ class ConsoleOptionParser { * * @param string $subcommand If present and a valid subcommand that has a linked parser. * That subcommands help will be shown instead. - * @param int $width The width to format user content to. Defaults to 72 + * @param string $format Define the output format, can be text or xml + * @param integer $width The width to format user content to. Defaults to 72 * @return string Generated help. */ public function help($subcommand = null, $format = 'text', $width = 72) { @@ -568,9 +568,10 @@ class ConsoleOptionParser { /** * Parse an option by its name index. * - * @param string $option The option to parse. + * @param string $name The name to parse. * @param array $params The params to append the parsed value into * @return array Params with $option added in. + * @throws ConsoleException */ protected function _parseOption($name, $params) { if (!isset($this->_options[$name])) { @@ -617,6 +618,7 @@ class ConsoleOptionParser { * @param string $argument The argument to append * @param array $args The array of parsed args to append to. * @return array Args + * @throws ConsoleException */ protected function _parseArg($argument, $args) { if (empty($this->_args)) { @@ -637,8 +639,7 @@ class ConsoleOptionParser { /** * Find the next token in the argv set. * - * @param string - * @return next token or '' + * @return string next token or '' */ protected function _nextToken() { return isset($this->_tokens[0]) ? $this->_tokens[0] : ''; diff --git a/lib/Cake/Console/ConsoleOutput.php b/lib/Cake/Console/ConsoleOutput.php index b9be1cb99..ffe51f7c4 100644 --- a/lib/Cake/Console/ConsoleOutput.php +++ b/lib/Cake/Console/ConsoleOutput.php @@ -18,8 +18,8 @@ /** * Object wrapper for outputting information from a shell application. * Can be connected to any stream resource that can be used with fopen() - * - * Can generate colorized output on consoles that support it. There are a few + * + * Can generate colorized output on consoles that support it. There are a few * built in styles * * - `error` Error messages. @@ -141,7 +141,7 @@ class ConsoleOutput { * * Checks for a pretty console environment. Ansicon allows pretty consoles * on windows, and is supported. - * + * * @param string $stream The identifier of the stream to write output to. */ public function __construct($stream = 'php://stdout') { @@ -265,8 +265,8 @@ class ConsoleOutput { /** * Get/Set the output type to use. The output type how formatting tags are treated. - * - * @param int $type The output type to use. Should be one of the class constants. + * + * @param integer $type The output type to use. Should be one of the class constants. * @return mixed Either null or the value if getting. */ public function outputAs($type = null) { @@ -279,7 +279,6 @@ class ConsoleOutput { /** * clean up and close handles * - * @return void */ public function __destruct() { fclose($this->_output); diff --git a/lib/Cake/Console/HelpFormatter.php b/lib/Cake/Console/HelpFormatter.php index 88f73caa5..6e7e6f523 100644 --- a/lib/Cake/Console/HelpFormatter.php +++ b/lib/Cake/Console/HelpFormatter.php @@ -158,6 +158,7 @@ class HelpFormatter { /** * Iterate over a collection and find the longest named thing. * + * @param array $collection * @return integer */ protected function _getMaxLength($collection) { @@ -179,7 +180,7 @@ class HelpFormatter { $xml = new SimpleXmlElement(''); $xml->addChild('command', $parser->command()); $xml->addChild('description', $parser->description()); - + $xml->addChild('epilog', $parser->epilog()); $subcommands = $xml->addChild('subcommands'); foreach ($parser->subcommands() as $command) { diff --git a/lib/Cake/Console/Shell.php b/lib/Cake/Console/Shell.php index 9d2ba2950..646c937a2 100644 --- a/lib/Cake/Console/Shell.php +++ b/lib/Cake/Console/Shell.php @@ -48,7 +48,6 @@ class Shell extends Object { * If true, the script will ask for permission to perform actions. * * @var boolean - * @access public */ public $interactive = true; @@ -56,7 +55,6 @@ class Shell extends Object { * Contains command switches parsed from the command line. * * @var array - * @access public */ public $params = array(); @@ -144,7 +142,7 @@ class Shell extends Object { * @param ConsoleOutput $stderr A ConsoleOutput object for stderr. * @param ConsoleInput $stdin A ConsoleInput object for stdin. */ - function __construct($stdout = null, $stderr = null, $stdin = null) { + public function __construct($stdout = null, $stderr = null, $stdin = null) { if ($this->name == null) { $this->name = Inflector::camelize(str_replace(array('Shell', 'Task'), '', get_class($this))); } @@ -216,7 +214,7 @@ class Shell extends Object { * makes $this->AppModel available to subclasses * If public $uses is an array of models will load those models * - * @return bool + * @return boolean */ protected function _loadModels() { if ($this->uses === null || $this->uses === false) { @@ -245,7 +243,7 @@ class Shell extends Object { /** * Loads tasks defined in public $tasks * - * @return bool + * @return boolean */ public function loadTasks() { if ($this->tasks === true || empty($this->tasks) || empty($this->Tasks)) { @@ -310,9 +308,7 @@ class Shell extends Object { * * `return $this->dispatchShell('schema', 'create', 'i18n', '--dry');` * - * @param mixed $command Either an array of args similar to $argv. Or a string command, that can be - * exploded on space to simulate argv. - * @return mixed. The return of the other shell. + * @return mixed The return of the other shell. */ public function dispatchShell() { $args = func_get_args(); @@ -357,7 +353,7 @@ class Shell extends Object { } catch (ConsoleException $e) { return $this->out($this->OptionParser->help($command)); } - + $this->command = $command; if (!empty($this->params['help'])) { return $this->_displayHelp($command); @@ -383,6 +379,7 @@ class Shell extends Object { /** * Display the help in the correct format * + * @param string $command * @return void */ protected function _displayHelp($command) { @@ -410,7 +407,8 @@ class Shell extends Object { /** * Overload get for lazy building of tasks * - * @return void + * @param string $name + * @return Shell Object of Task */ public function __get($name) { if (empty($this->{$name}) && in_array($name, $this->taskNames)) { @@ -430,7 +428,7 @@ class Shell extends Object { * @param string $prompt Prompt text. * @param mixed $options Array or string of options. * @param string $default Default input value. - * @return Either the default value, or the user-provided input. + * @return mixed Either the default value, or the user-provided input. */ public function in($prompt, $options = null, $default = null) { if (!$this->interactive) { @@ -523,7 +521,7 @@ class Shell extends Object { * @param mixed $message A string or a an array of strings to output * @param integer $newlines Number of newlines to append * @param integer $level The message's output level, see above. - * @return integer Returns the number of bytes returned from writing to stdout. + * @return integer|boolean Returns the number of bytes returned from writing to stdout. */ public function out($message = null, $newlines = 1, $level = Shell::NORMAL) { $currentLevel = Shell::NORMAL; @@ -545,6 +543,7 @@ class Shell extends Object { * * @param mixed $message A string or a an array of strings to output * @param integer $newlines Number of newlines to append + * @return void */ public function err($message = null, $newlines = 1) { $this->stderr->write($message, $newlines); @@ -554,7 +553,6 @@ class Shell extends Object { * Returns a single or multiple linefeeds sequences. * * @param integer $multiplier Number of times the linefeed sequence should be repeated - * @access public * @return string */ public function nl($multiplier = 1) { @@ -566,6 +564,7 @@ class Shell extends Object { * * @param integer $newlines Number of newlines to pre- and append * @param integer $width Width of the line, defaults to 63 + * @return void */ public function hr($newlines = 0, $width = 63) { $this->out(null, $newlines); @@ -579,6 +578,7 @@ class Shell extends Object { * * @param string $title Title of the error * @param string $message An optional error message + * @return void */ public function error($title, $message = null) { $this->err(__d('cake_console', 'Error: %s', $title)); @@ -670,7 +670,7 @@ class Shell extends Object { * Makes absolute file path easier to read * * @param string $file Absolute file path - * @return sting short path + * @return string short path */ public function shortPath($file) { $shortPath = str_replace(ROOT, null, $file); @@ -774,7 +774,7 @@ class Shell extends Object { * @param string $pluginName Name of the plugin you want ie. DebugKit * @return string $path path to the correct plugin. */ - function _pluginPath($pluginName) { + protected function _pluginPath($pluginName) { if (CakePlugin::loaded($pluginName)) { return CakePlugin::path($pluginName); } diff --git a/lib/Cake/Console/ShellDispatcher.php b/lib/Cake/Console/ShellDispatcher.php index e188151c0..6d72e07db 100644 --- a/lib/Cake/Console/ShellDispatcher.php +++ b/lib/Cake/Console/ShellDispatcher.php @@ -44,8 +44,7 @@ class ShellDispatcher { * a status code of either 0 or 1 according to the result of the dispatch. * * @param array $args the argv from PHP - * @param bool $bootstrap Should the environment be bootstrapped. - * @return void + * @param boolean $bootstrap Should the environment be bootstrapped. */ public function __construct($args = array(), $bootstrap = true) { set_time_limit(0); @@ -96,9 +95,10 @@ class ShellDispatcher { * Defines current working environment. * * @return void + * @throws CakeException */ protected function _initEnvironment() { - if (!$this->__bootstrap()) { + if (!$this->_bootstrap()) { $message = "Unable to load CakePHP core.\nMake sure " . DS . 'lib' . DS . 'Cake exists in ' . CAKE_CORE_INCLUDE_PATH; throw new CakeException($message); } @@ -119,7 +119,7 @@ class ShellDispatcher { * * @return boolean Success. */ - private function __bootstrap() { + protected function _bootstrap() { define('ROOT', $this->params['root']); define('APP_DIR', $this->params['app']); define('APP', $this->params['working'] . DS); @@ -149,6 +149,7 @@ class ShellDispatcher { * Dispatches a CLI request * * @return boolean + * @throws MissingShellMethodException */ public function dispatch() { $shell = $this->shiftArgs(); @@ -198,8 +199,8 @@ class ShellDispatcher { * All paths in the loaded shell paths are searched. * * @param string $shell Optionally the name of a plugin - * @return mixed False if no shell could be found or an object on success - * @throws MissingShellFileException, MissingShellClassException when errors are encountered. + * @return mixed An object + * @throws MissingShellFileException when errors are encountered. */ protected function _getShell($shell) { list($plugin, $shell) = pluginSplit($shell, true); @@ -221,7 +222,8 @@ class ShellDispatcher { /** * Parses command line options and extracts the directory paths from $params * - * @param array $params Parameters to parse + * @param array $args Parameters to parse + * @return void */ public function parseParams($args) { $this->_parsePaths($args); @@ -276,6 +278,7 @@ class ShellDispatcher { /** * Parses out the paths from from the argv * + * @param array $args * @return void */ protected function _parsePaths($args) { @@ -316,7 +319,7 @@ class ShellDispatcher { /** * Stop execution of the current script * - * @param $status see http://php.net/exit for values + * @param integer|string $status see http://php.net/exit for values * @return void */ protected function _stop($status = 0) { diff --git a/lib/Cake/Console/TaskCollection.php b/lib/Cake/Console/TaskCollection.php index 6505f8cac..55e77327d 100644 --- a/lib/Cake/Console/TaskCollection.php +++ b/lib/Cake/Console/TaskCollection.php @@ -27,7 +27,7 @@ class TaskCollection extends ObjectCollection { /** * Shell to use to set params to tasks. * - * @var array + * @var Shell */ protected $_Shell; @@ -41,8 +41,7 @@ class TaskCollection extends ObjectCollection { /** * Constructor * - * @param array $paths Array of paths to search for tasks on . - * @return void + * @param Shell $Shell */ public function __construct(Shell $Shell) { $this->_Shell = $Shell; @@ -51,7 +50,7 @@ class TaskCollection extends ObjectCollection { /** * Loads/constructs a task. Will return the instance in the collection * if it already exists. - * + * * @param string $task Task name to load * @param array $settings Settings for the task. * @return Task A task object, Either the existing loaded task or a new one. diff --git a/lib/Cake/Console/Templates/default/classes/controller.ctp b/lib/Cake/Console/Templates/default/classes/controller.ctp index b87107793..d476bb783 100644 --- a/lib/Cake/Console/Templates/default/classes/controller.ctp +++ b/lib/Cake/Console/Templates/default/classes/controller.ctp @@ -24,6 +24,17 @@ echo " Controller * + */ class Controller extends AppController { diff --git a/lib/Cake/Console/Templates/default/classes/model.ctp b/lib/Cake/Console/Templates/default/classes/model.ctp index b4ea83ea9..242fa95f4 100644 --- a/lib/Cake/Console/Templates/default/classes/model.ctp +++ b/lib/Cake/Console/Templates/default/classes/model.ctp @@ -23,6 +23,15 @@ echo " /** * Model * + */ class extends AppModel { diff --git a/lib/Cake/Console/Templates/skel/Controller/PagesController.php b/lib/Cake/Console/Templates/skel/Controller/PagesController.php index 522dbf3a2..cf34b0a2a 100644 --- a/lib/Cake/Console/Templates/skel/Controller/PagesController.php +++ b/lib/Cake/Console/Templates/skel/Controller/PagesController.php @@ -32,7 +32,6 @@ class PagesController extends AppController { * Controller name * * @var string - * @access public */ public $name = 'Pages'; @@ -40,7 +39,6 @@ class PagesController extends AppController { * Default helper * * @var array - * @access public */ public $helpers = array('Html'); @@ -48,7 +46,6 @@ class PagesController extends AppController { * This controller does not use a model * * @var array - * @access public */ public $uses = array(); @@ -56,7 +53,6 @@ class PagesController extends AppController { * Displays a view * * @param mixed What page to display - * @access public */ public function display() { $path = func_get_args(); diff --git a/lib/Cake/Controller/CakeErrorController.php b/lib/Cake/Controller/CakeErrorController.php index bff8a39b6..fea081b61 100644 --- a/lib/Cake/Controller/CakeErrorController.php +++ b/lib/Cake/Controller/CakeErrorController.php @@ -4,9 +4,27 @@ * * Controller used by ErrorHandler to render error views. * + * PHP 5 + * + * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) + * Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * + * Licensed under The MIT License + * Redistributions of files must retain the above copyright notice. + * + * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) + * @link http://cakephp.org CakePHP(tm) Project * @package Cake.Controller + * @since CakePHP(tm) v 2.0 + * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ class CakeErrorController extends AppController { + +/** + * Controller name + * + * @var string + */ public $name = 'CakeError'; /** @@ -19,8 +37,8 @@ class CakeErrorController extends AppController { /** * __construct * - * @access public - * @return void + * @param CakeRequest $request + * @param CakeResponse $response */ public function __construct($request = null, $response = null) { parent::__construct($request, $response); diff --git a/lib/Cake/Controller/Component.php b/lib/Cake/Controller/Component.php index 6b6365524..3bd0232b4 100644 --- a/lib/Cake/Controller/Component.php +++ b/lib/Cake/Controller/Component.php @@ -86,7 +86,7 @@ class Component extends Object { /** * Magic method for lazy loading $components. * - * @param sting $name Name of component to get. + * @param string $name Name of component to get. * @return mixed A Component object or null. */ public function __get($name) { @@ -102,7 +102,7 @@ class Component extends Object { /** * Called before the Controller::beforeFilter(). * - * @param object $controller Controller with components to initialize + * @param Controller $controller Controller with components to initialize * @return void * @link http://book.cakephp.org/view/998/MVC-Class-Access-Within-Components */ @@ -111,7 +111,7 @@ class Component extends Object { /** * Called after the Controller::beforeFilter() and before the controller action * - * @param object $controller Controller with components to startup + * @param Controller $controller Controller with components to startup * @return void * @link http://book.cakephp.org/view/998/MVC-Class-Access-Within-Components */ @@ -121,7 +121,7 @@ class Component extends Object { * Called after the Controller::beforeRender(), after the view class is loaded, and before the * Controller::render() * - * @param object $controller Controller with components to beforeRender + * @param Controller $controller Controller with components to beforeRender * @return void */ public function beforeRender($controller) { } @@ -129,7 +129,7 @@ class Component extends Object { /** * Called after Controller::render() and before the output is printed to the browser. * - * @param object $controller Controller with components to shutdown + * @param Controller $controller Controller with components to shutdown * @return void */ public function shutdown($controller) { } @@ -146,11 +146,11 @@ class Component extends Object { * If your response is a string or an array that does not contain a 'url' key it will * be used as the new url to redirect to. * - * @param object $controller Controller with components to beforeRedirect - * @param mixed $url Either the string or url array that is being redirected to. - * @param int $status The status code of the redirect - * @param bool $exit Will the script exit. - * @return mixed Either an array or null. + * @param Controller $controller Controller with components to beforeRedirect + * @param string|array $url Either the string or url array that is being redirected to. + * @param integer $status The status code of the redirect + * @param boolean $exit Will the script exit. + * @return array|null Either an array or null. */ public function beforeRedirect($controller, $url, $status = null, $exit = true) {} diff --git a/lib/Cake/Controller/Component/AclComponent.php b/lib/Cake/Controller/Component/AclComponent.php index 6e1c2a822..c34fb7a52 100644 --- a/lib/Cake/Controller/Component/AclComponent.php +++ b/lib/Cake/Controller/Component/AclComponent.php @@ -36,8 +36,7 @@ class AclComponent extends Component { /** * Instance of an ACL class * - * @var object - * @access protected + * @var AclInterface */ protected $_Instance = null; @@ -58,6 +57,8 @@ class AclComponent extends Component { /** * Constructor. Will return an instance of the correct ACL class as defined in `Configure::read('Acl.classname')` * + * @param ComponentCollection $collection + * @param array $settings * @throws CakeException when Acl.classname could not be loaded. */ public function __construct(ComponentCollection $collection, $settings = array()) { @@ -262,7 +263,7 @@ class DbAcl extends Object implements AclInterface { * Constructor * */ - function __construct() { + public function __construct() { parent::__construct(); App::uses('AclNode', 'Model'); $this->Aro = ClassRegistry::init(array('class' => 'Aro', 'alias' => 'Aro')); @@ -424,7 +425,7 @@ class DbAcl extends Object implements AclInterface { * * @param string $aro ARO The requesting object identifier. * @param string $aco ACO The controlled object identifier. - * @param string $actions Action (defaults to *) + * @param string $action Action (defaults to *) * @return boolean Success * @link http://book.cakephp.org/view/1248/Assigning-Permissions */ @@ -437,7 +438,7 @@ class DbAcl extends Object implements AclInterface { * * @param string $aro ARO The requesting object identifier. * @param string $aco ACO The controlled object identifier. - * @param string $actions Action (defaults to *) + * @param string $action Action (defaults to *) * @return boolean Success */ public function inherit($aro, $aco, $action = "*") { @@ -449,7 +450,7 @@ class DbAcl extends Object implements AclInterface { * * @param string $aro ARO The requesting object identifier. * @param string $aco ACO The controlled object identifier. - * @param string $actions Action (defaults to *) + * @param string $action Action (defaults to *) * @return boolean Success * @see allow() */ @@ -462,7 +463,7 @@ class DbAcl extends Object implements AclInterface { * * @param string $aro ARO The requesting object identifier. * @param string $aco ACO The controlled object identifier. - * @param string $actions Action (defaults to *) + * @param string $action Action (defaults to *) * @return boolean Success * @see deny() */ @@ -526,7 +527,6 @@ class IniAcl extends Object implements AclInterface { * Array with configuration, parsed from ini file * * @var array - * @access public */ public $config = null; diff --git a/lib/Cake/Controller/Component/Auth/ActionsAuthorize.php b/lib/Cake/Controller/Component/Auth/ActionsAuthorize.php index fcddf0dc2..88c915fe9 100644 --- a/lib/Cake/Controller/Component/Auth/ActionsAuthorize.php +++ b/lib/Cake/Controller/Component/Auth/ActionsAuthorize.php @@ -12,7 +12,7 @@ * @link http://cakephp.org CakePHP(tm) Project * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ - + App::uses('BaseAuthorize', 'Controller/Component/Auth'); /** diff --git a/lib/Cake/Controller/Component/Auth/BaseAuthenticate.php b/lib/Cake/Controller/Component/Auth/BaseAuthenticate.php index 83426132a..7fa44e7cd 100644 --- a/lib/Cake/Controller/Component/Auth/BaseAuthenticate.php +++ b/lib/Cake/Controller/Component/Auth/BaseAuthenticate.php @@ -99,10 +99,10 @@ abstract class BaseAuthenticate { abstract public function authenticate(CakeRequest $request, CakeResponse $response); /** - * Allows you to hook into AuthComponent::logout(), + * Allows you to hook into AuthComponent::logout(), * and implement specialized logout behaviour. - * - * All attached authentication objects will have this method + * + * All attached authentication objects will have this method * called when a user logs out. * * @param array $user The user about to be logged out. diff --git a/lib/Cake/Controller/Component/Auth/BaseAuthorize.php b/lib/Cake/Controller/Component/Auth/BaseAuthorize.php index bbbcc60e3..d68f7b1b6 100644 --- a/lib/Cake/Controller/Component/Auth/BaseAuthorize.php +++ b/lib/Cake/Controller/Component/Auth/BaseAuthorize.php @@ -34,7 +34,7 @@ abstract class BaseAuthorize { * @var ComponentCollection */ protected $_Collection; - + /** * Settings for authorize objects. * @@ -61,7 +61,7 @@ abstract class BaseAuthorize { /** * Constructor * - * @param Controller $controller The controller for this request. + * @param ComponentCollection $collection The controller for this request. * @param string $settings An array of settings. This class does not use any settings. */ public function __construct(ComponentCollection $collection, $settings = array()) { @@ -75,7 +75,7 @@ abstract class BaseAuthorize { * Checks user authorization. * * @param array $user Active user data - * @param CakeRequest $request + * @param CakeRequest $request * @return boolean */ abstract public function authorize($user, CakeRequest $request); @@ -84,7 +84,8 @@ abstract class BaseAuthorize { * Accessor to the controller object. * * @param mixed $controller null to get, a controller to set. - * @return mixed. + * @return mixed + * @throws CakeException */ public function controller($controller = null) { if ($controller) { @@ -102,6 +103,7 @@ abstract class BaseAuthorize { * that need to get information about the plugin, controller, and action being invoked. * * @param CakeRequest $request The request a path is needed for. + * @param string $path * @return string the action path for the given request. */ public function action($request, $path = '/:plugin/:controller/:action') { diff --git a/lib/Cake/Controller/Component/Auth/BasicAuthenticate.php b/lib/Cake/Controller/Component/Auth/BasicAuthenticate.php index 3a4ff99da..347deec9f 100644 --- a/lib/Cake/Controller/Component/Auth/BasicAuthenticate.php +++ b/lib/Cake/Controller/Component/Auth/BasicAuthenticate.php @@ -24,10 +24,10 @@ App::uses('BaseAuthenticate', 'Controller/Component/Auth'); * Auth must support cookies. * * ### Using Basic auth - * + * * In your controller's components array, add auth + the required settings. * {{{ - * var $components = array( + * public $components = array( * 'Auth' => array( * 'authenticate' => array('Basic') * ) @@ -76,7 +76,7 @@ class BasicAuthenticate extends BaseAuthenticate { } /** - * Authenticate a user using basic HTTP auth. Will use the configured User model and attempt a + * Authenticate a user using basic HTTP auth. Will use the configured User model and attempt a * login using basic HTTP auth. * * @param CakeRequest $request The request to authenticate with. @@ -104,7 +104,7 @@ class BasicAuthenticate extends BaseAuthenticate { public function getUser($request) { $username = env('PHP_AUTH_USER'); $pass = env('PHP_AUTH_PW'); - + if (empty($username) || empty($pass)) { return false; } diff --git a/lib/Cake/Controller/Component/Auth/ControllerAuthorize.php b/lib/Cake/Controller/Component/Auth/ControllerAuthorize.php index f36d493c1..9328cacee 100644 --- a/lib/Cake/Controller/Component/Auth/ControllerAuthorize.php +++ b/lib/Cake/Controller/Component/Auth/ControllerAuthorize.php @@ -41,7 +41,8 @@ class ControllerAuthorize extends BaseAuthorize { * Get/set the controller this authorize object will be working with. Also checks that isAuthorized is implemented. * * @param mixed $controller null to get, a controller to set. - * @return mixed. + * @return mixed + * @throws CakeException */ public function controller($controller = null) { if ($controller) { @@ -56,7 +57,7 @@ class ControllerAuthorize extends BaseAuthorize { * Checks user authorization using a controller callback. * * @param array $user Active user data - * @param CakeRequest $request + * @param CakeRequest $request * @return boolean */ public function authorize($user, CakeRequest $request) { diff --git a/lib/Cake/Controller/Component/Auth/CrudAuthorize.php b/lib/Cake/Controller/Component/Auth/CrudAuthorize.php index 1ec305481..947cb9b64 100644 --- a/lib/Cake/Controller/Component/Auth/CrudAuthorize.php +++ b/lib/Cake/Controller/Component/Auth/CrudAuthorize.php @@ -81,9 +81,9 @@ class CrudAuthorize extends BaseAuthorize { */ public function authorize($user, CakeRequest $request) { if (!isset($this->settings['actionMap'][$request->params['action']])) { - trigger_error(__d('cake_dev', + trigger_error(__d('cake_dev', 'CrudAuthorize::authorize() - Attempted access of un-mapped action "%1$s" in controller "%2$s"', - $request->action, + $request->action, $request->controller ), E_USER_WARNING diff --git a/lib/Cake/Controller/Component/Auth/DigestAuthenticate.php b/lib/Cake/Controller/Component/Auth/DigestAuthenticate.php index 0ec831cdb..0e3d004b5 100644 --- a/lib/Cake/Controller/Component/Auth/DigestAuthenticate.php +++ b/lib/Cake/Controller/Component/Auth/DigestAuthenticate.php @@ -20,17 +20,17 @@ App::uses('BaseAuthenticate', 'Controller/Component/Auth'); * * Provides Digest HTTP authentication support for AuthComponent. Unlike most AuthComponent adapters, * DigestAuthenticate requires a special password hash that conforms to RFC2617. You can create this - * password using `DigestAuthenticate::password()`. If you wish to use digest authentication alongside other + * password using `DigestAuthenticate::password()`. If you wish to use digest authentication alongside other * authentication methods, its recommended that you store the digest authentication separately. * * Clients using Digest Authentication must support cookies. Since AuthComponent identifies users based * on Session contents, clients without support for cookies will not function properly. * * ### Using Digest auth - * + * * In your controller's components array, add auth + the required settings. * {{{ - * var $components = array( + * public $components = array( * 'Auth' => array( * 'authenticate' => array('Digest') * ) @@ -47,7 +47,7 @@ App::uses('BaseAuthenticate', 'Controller/Component/Auth'); * * `$digestPass = DigestAuthenticate::password($username, env('SERVER_NAME'), $password);` * - * Its recommended that you store this digest auth only password separate from password hashes used for other + * Its recommended that you store this digest auth only password separate from password hashes used for other * login methods. For example `User.digest_pass` could be used for a digest password, while `User.password` would * store the password hash for use with other methods like Basic or Form. * @@ -101,7 +101,7 @@ class DigestAuthenticate extends BaseAuthenticate { } } /** - * Authenticate a user using Digest HTTP auth. Will use the configured User model and attempt a + * Authenticate a user using Digest HTTP auth. Will use the configured User model and attempt a * login using Digest HTTP auth. * * @param CakeRequest $request The request to authenticate with. @@ -230,7 +230,7 @@ class DigestAuthenticate extends BaseAuthenticate { } /** - * Creates an auth digest password hash to store + * Creates an auth digest password hash to store * * @param string $username The username to use in the digest hash. * @param string $password The unhashed password to make a digest hash for. diff --git a/lib/Cake/Controller/Component/Auth/FormAuthenticate.php b/lib/Cake/Controller/Component/Auth/FormAuthenticate.php index 9424f72b6..833b4d687 100644 --- a/lib/Cake/Controller/Component/Auth/FormAuthenticate.php +++ b/lib/Cake/Controller/Component/Auth/FormAuthenticate.php @@ -38,7 +38,7 @@ class FormAuthenticate extends BaseAuthenticate { /** * Authenticates the identity contained in a request. Will use the `settings.userModel`, and `settings.fields` - * to find POST data that is used to find a matching record in the `settings.userModel`. Will return false if + * to find POST data that is used to find a matching record in the `settings.userModel`. Will return false if * there is no post data, either username or password is missing, of if the scope conditions have not been met. * * @param CakeRequest $request The request that contains login information. diff --git a/lib/Cake/Controller/Component/AuthComponent.php b/lib/Cake/Controller/Component/AuthComponent.php index 14f32bf65..8bd4dd4d5 100644 --- a/lib/Cake/Controller/Component/AuthComponent.php +++ b/lib/Cake/Controller/Component/AuthComponent.php @@ -240,7 +240,7 @@ class AuthComponent extends Component { /** * Initializes AuthComponent for use in the controller * - * @param object $controller A reference to the instantiating controller object + * @param Controller $controller A reference to the instantiating controller object * @return void */ public function initialize($controller) { @@ -257,7 +257,7 @@ class AuthComponent extends Component { * Main execution method. Handles redirecting of invalid users, and processing * of login form data. * - * @param object $controller A reference to the instantiating controller object + * @param Controller $controller A reference to the instantiating controller object * @return boolean */ public function startup($controller) { @@ -277,7 +277,7 @@ class AuthComponent extends Component { return true; } - if (!$this->__setDefaults()) { + if (!$this->_setDefaults()) { return false; } $request = $controller->request; @@ -337,11 +337,9 @@ class AuthComponent extends Component { * Attempts to introspect the correct values for object properties including * $userModel and $sessionKey. * - * @param object $controller A reference to the instantiating controller object * @return boolean - * @access private */ - function __setDefaults() { + protected function _setDefaults() { $defaults = array( 'logoutRedirect' => $this->loginAction, 'authError' => __d('cake', 'You are not authorized to access that location.') @@ -387,6 +385,7 @@ class AuthComponent extends Component { * Loads the authorization objects configured. * * @return mixed Either null when authorize is empty, or the loaded authorization objects. + * @throws CakeException */ public function constructAuthorize() { if (empty($this->authorize)) { @@ -428,13 +427,11 @@ class AuthComponent extends Component { * * `$this->Auth->allow('*');` * - * @param mixed $action Controller action name or array of actions - * @param string $action Controller action name - * @param string ... etc. + * @param mixed $action,... Controller action name or array of actions * @return void * @link http://book.cakephp.org/view/1257/allow */ - public function allow() { + public function allow($action) { $args = func_get_args(); if (empty($args) || $args == array('*')) { $this->allowedActions = $this->_methods; @@ -454,14 +451,12 @@ class AuthComponent extends Component { * `$this->Auth->deny(array('edit', 'add'));` or * `$this->Auth->deny('edit', 'add');` * - * @param mixed $action Controller action name or array of actions - * @param string $action Controller action name - * @param string ... etc. + * @param mixed $action,... Controller action name or array of actions * @return void * @see AuthComponent::allow() * @link http://book.cakephp.org/view/1258/deny */ - public function deny() { + public function deny($action) { $args = func_get_args(); if (isset($args[0]) && is_array($args[0])) { $args = $args[0]; @@ -503,7 +498,7 @@ class AuthComponent extends Component { * @link http://book.cakephp.org/view/1261/login */ public function login($user = null) { - $this->__setDefaults(); + $this->_setDefaults(); if (empty($user)) { $user = $this->identify($this->request, $this->response); @@ -520,13 +515,12 @@ class AuthComponent extends Component { * custom logout logic. AuthComponent will remove the session data, so * there is no need to do that in an authentication object. * - * @param mixed $url Optional URL to redirect the user to after logout - * @return string AuthComponent::$loginAction - * @see AuthComponent::$loginAction + * @return string AuthComponent::$logoutRedirect + * @see AuthComponent::$logoutRedirect * @link http://book.cakephp.org/view/1262/logout */ public function logout() { - $this->__setDefaults(); + $this->_setDefaults(); if (empty($this->_authenticateObjects)) { $this->constructAuthenticate(); } @@ -615,6 +609,7 @@ class AuthComponent extends Component { * by credentials contained in $request. * * @param CakeRequest $request The request that contains authentication data. + * @param CakeResponse $response The response * @return array User record data, or false, if the user could not be identified. */ public function identify(CakeRequest $request, CakeResponse $response) { @@ -634,6 +629,7 @@ class AuthComponent extends Component { * loads the configured authentication objects. * * @return mixed either null on empty authenticate value, or an array of loaded objects. + * @throws CakeException */ public function constructAuthenticate() { if (empty($this->authenticate)) { @@ -676,7 +672,8 @@ class AuthComponent extends Component { /** * Component shutdown. If user is logged in, wipe out redirect. * - * @param object $controller Instantiating controller + * @param Controller $controller Instantiating controller + * @return void */ public function shutdown($controller) { if ($this->loggedIn()) { @@ -688,7 +685,6 @@ class AuthComponent extends Component { * Check whether or not the current user has data in the session, and is considered logged in. * * @return boolean true if the user is logged in, false otherwise - * @access public */ public function loggedIn() { return $this->user() != array(); diff --git a/lib/Cake/Controller/Component/CookieComponent.php b/lib/Cake/Controller/Component/CookieComponent.php index 4566e514a..c20d57297 100644 --- a/lib/Cake/Controller/Component/CookieComponent.php +++ b/lib/Cake/Controller/Component/CookieComponent.php @@ -38,7 +38,6 @@ class CookieComponent extends Component { * $this->Cookie->name = 'CookieName'; * * @var string - * @access public */ public $name = 'CakeCookie'; @@ -51,7 +50,6 @@ class CookieComponent extends Component { * $this->Cookie->time = '5 Days'; * * @var mixed - * @access public */ public $time = null; @@ -67,7 +65,6 @@ class CookieComponent extends Component { * The default value is the entire domain. * * @var string - * @access public */ public $path = '/'; @@ -83,7 +80,6 @@ class CookieComponent extends Component { * Set $this->Cookie->domain = '.example.com'; in your controller beforeFilter * * @var string - * @access public */ public $domain = ''; @@ -97,7 +93,6 @@ class CookieComponent extends Component { * When set to true, the cookie will only be set if a secure connection exists. * * @var boolean - * @access public */ public $secure = false; @@ -108,14 +103,13 @@ class CookieComponent extends Component { * $this->Cookie->key = 'SomeRandomString'; * * @var string - * @access protected */ public $key = null; /** * HTTP only cookie * - * Set to true to make HTTP only cookies. Cookies that are HTTP only + * Set to true to make HTTP only cookies. Cookies that are HTTP only * are not accessible in Javascript. * * @var boolean @@ -129,7 +123,6 @@ class CookieComponent extends Component { * * @see CookieComponent::read(); * @var string - * @access private */ protected $_values = array(); @@ -140,7 +133,6 @@ class CookieComponent extends Component { * Defaults to Security::cipher(); * * @var string - * @access private * @todo add additional encryption methods */ protected $_type = 'cipher'; @@ -149,7 +141,6 @@ class CookieComponent extends Component { * Used to reset cookie time if $expire is passed to CookieComponent::write() * * @var string - * @access private */ protected $_reset = null; @@ -159,7 +150,6 @@ class CookieComponent extends Component { * This is controlled by CookieComponent::time; * * @var string - * @access private */ protected $_expires = 0; @@ -180,6 +170,8 @@ class CookieComponent extends Component { /** * Start CookieComponent for use in the controller * + * @param Controller $controller + * @return void */ public function startup($controller) { $this->_expire($this->time); @@ -205,6 +197,7 @@ class CookieComponent extends Component { * @param mixed $value Value * @param boolean $encrypt Set to true to encrypt value, false otherwise * @param string $expires Can be either Unix timestamp, or date string + * @return void */ public function write($key, $value = null, $encrypt = true, $expires = null) { if (is_null($encrypt)) { @@ -212,7 +205,7 @@ class CookieComponent extends Component { } $this->_encrypted = $encrypt; $this->_expire($expires); - + if (!is_array($key)) { $key = array($key => $value); } @@ -327,7 +320,7 @@ class CookieComponent extends Component { * Will allow overriding default encryption method. * * @param string $type Encryption method - * @access public + * @return void * @todo NOT IMPLEMENTED */ public function type($type = 'cipher') { @@ -345,7 +338,7 @@ class CookieComponent extends Component { * CookieComponent::write(string, string, boolean, '5 Days'); * * @param mixed $expires Can be either Unix timestamp, or date string - * @return int Unix timestamp + * @return integer Unix timestamp */ protected function _expire($expires = null) { $now = time(); @@ -369,10 +362,11 @@ class CookieComponent extends Component { * * @param string $name Name for cookie * @param string $value Value for cookie + * @return void */ protected function _write($name, $value) { $this->_setcookie( - $this->name . $name, $this->_encrypt($value), + $this->name . $name, $this->_encrypt($value), $this->_expires, $this->path, $this->domain, $this->secure, $this->httpOnly ); @@ -390,7 +384,7 @@ class CookieComponent extends Component { */ protected function _delete($name) { $this->_setcookie( - $this->name . $name, '', + $this->name . $name, '', time() - 42000, $this->path, $this->domain, $this->secure, $this->httpOnly ); } @@ -402,6 +396,7 @@ class CookieComponent extends Component { * of the HTTP response, and should be handled there. * * @param string $name Name of the cookie + * @param string $value Value of the cookie * @param integer $expire Time the cookie expires in * @param string $path Path the cookie applies to * @param string $domain Domain the cookie is for. diff --git a/lib/Cake/Controller/Component/EmailComponent.php b/lib/Cake/Controller/Component/EmailComponent.php index a7024144d..de23ea361 100644 --- a/lib/Cake/Controller/Component/EmailComponent.php +++ b/lib/Cake/Controller/Component/EmailComponent.php @@ -37,7 +37,6 @@ class EmailComponent extends Component { * Recipient of the email * * @var string - * @access public */ public $to = null; @@ -45,7 +44,6 @@ class EmailComponent extends Component { * The mail which the email is sent from * * @var string - * @access public */ public $from = null; @@ -53,7 +51,6 @@ class EmailComponent extends Component { * The email the recipient will reply to * * @var string - * @access public */ public $replyTo = null; @@ -61,7 +58,6 @@ class EmailComponent extends Component { * The read receipt email * * @var string - * @access public */ public $readReceipt = null; @@ -72,7 +68,6 @@ class EmailComponent extends Component { * - Unknown user * * @var string - * @access public */ public $return = null; @@ -83,7 +78,6 @@ class EmailComponent extends Component { * The Recipient WILL be able to see this list * * @var array - * @access public */ public $cc = array(); @@ -94,7 +88,6 @@ class EmailComponent extends Component { * The Recipient WILL NOT be able to see this list * * @var array - * @access public */ public $bcc = array(); @@ -105,13 +98,12 @@ class EmailComponent extends Component { * * @var string */ - var $date = null; + public $date = null; /** * The subject of the email * * @var string - * @access public */ public $subject = null; @@ -120,7 +112,6 @@ class EmailComponent extends Component { * Keys will be prefixed 'X-' as per RFC2822 Section 4.7.5 * * @var array - * @access public */ public $headers = array(); @@ -130,7 +121,6 @@ class EmailComponent extends Component { * These will NOT be used if you are using safemode and mail() * * @var string - * @access public */ public $additionalParams = null; @@ -138,7 +128,6 @@ class EmailComponent extends Component { * Layout for the View * * @var string - * @access public */ public $layout = 'default'; @@ -146,7 +135,6 @@ class EmailComponent extends Component { * Template for the view * * @var string - * @access public */ public $template = null; @@ -158,7 +146,6 @@ class EmailComponent extends Component { * (which leads to doubling CR if CRLF is used). * * @var string - * @access public */ public $lineFeed = PHP_EOL; @@ -171,7 +158,6 @@ class EmailComponent extends Component { * - both * * @var string - * @access public */ public $sendAs = 'text'; @@ -184,7 +170,6 @@ class EmailComponent extends Component { * - debug * * @var string - * @access public */ public $delivery = 'mail'; @@ -192,7 +177,6 @@ class EmailComponent extends Component { * charset the email is sent in * * @var string - * @access public */ public $charset = 'utf-8'; @@ -202,7 +186,6 @@ class EmailComponent extends Component { * Can be both absolute and relative paths * * @var array - * @access public */ public $attachments = array(); @@ -210,7 +193,6 @@ class EmailComponent extends Component { * What mailer should EmailComponent identify itself as * * @var string - * @access public */ public $xMailer = 'CakePHP Email Component'; @@ -218,7 +200,6 @@ class EmailComponent extends Component { * The list of paths to search if an attachment isnt absolute * * @var array - * @access public */ public $filePaths = array(); @@ -234,7 +215,6 @@ class EmailComponent extends Component { * - client * * @var array - * @access public * @link http://book.cakephp.org/view/1290/Sending-A-Message-Using-SMTP */ public $smtpOptions = array(); @@ -243,7 +223,6 @@ class EmailComponent extends Component { * Contains the rendered plain text message if one was sent. * * @var string - * @access public */ public $textMessage = null; @@ -251,7 +230,6 @@ class EmailComponent extends Component { * Contains the rendered HTML message if one was sent. * * @var string - * @access public */ public $htmlMessage = null; @@ -265,14 +243,13 @@ class EmailComponent extends Component { * could encounter delivery issues if you do not. * * @var mixed - * @access public */ public $messageId = true; /** * Controller reference * - * @var object Controller + * @var Controller */ protected $_controller = null; @@ -290,7 +267,8 @@ class EmailComponent extends Component { /** * Initialize component * - * @param object $controller Instantiating controller + * @param Controller $controller Instantiating controller + * @return void */ public function initialize($controller) { if (Configure::read('App.encoding') !== null) { @@ -384,6 +362,7 @@ class EmailComponent extends Component { /** * Reset all EmailComponent internal variables to be able to send out a new email. * + * @return void * @link http://book.cakephp.org/view/1285/Sending-Multiple-Emails-in-a-loop */ public function reset() { @@ -427,9 +406,8 @@ class EmailComponent extends Component { * * @param string $attachment Attachment file name to find * @return string Path to located file - * @access private */ - function _findFiles($attachment) { + protected function _findFiles($attachment) { if (file_exists($attachment)) { return $attachment; } @@ -447,9 +425,8 @@ class EmailComponent extends Component { * * @param string $subject String to encode * @return string Encoded string - * @access private */ - function _encode($subject) { + protected function _encode($subject) { $subject = $this->_strip($subject); $nl = "\r\n"; @@ -494,9 +471,8 @@ class EmailComponent extends Component { * @param string $value Value to strip * @param boolean $message Set to true to indicate main message content * @return string Stripped value - * @access private */ - function _strip($value, $message = false) { + protected function _strip($value, $message = false) { $search = '%0a|%0d|Content-(?:Type|Transfer-Encoding)\:'; $search .= '|charset\=|mime-version\:|multipart/mixed|(?:[^a-z]to|b?cc)\:.*'; diff --git a/lib/Cake/Controller/Component/PaginatorComponent.php b/lib/Cake/Controller/Component/PaginatorComponent.php index 90c505ba7..0cf29454c 100644 --- a/lib/Cake/Controller/Component/PaginatorComponent.php +++ b/lib/Cake/Controller/Component/PaginatorComponent.php @@ -101,9 +101,10 @@ class PaginatorComponent extends Component { * * @param mixed $object Model to paginate (e.g: model instance, or 'Model', or 'Model.InnerModel') * @param mixed $scope Additional find conditions to use while paginating - * @param array $whitelist List of allowed fields for ordering. This allows you to prevent ordering + * @param array $whitelist List of allowed fields for ordering. This allows you to prevent ordering * on non-indexed, or undesirable columns. * @return array Model query results + * @throws MissingModelException */ public function paginate($object = null, $scope = array(), $whitelist = array()) { if (is_array($object)) { @@ -307,7 +308,7 @@ class PaginatorComponent extends Component { } /** - * Validate that the desired sorting can be performed on the $object. Only fields or + * Validate that the desired sorting can be performed on the $object. Only fields or * virtualFields can be sorted on. The direction param will also be sanitized. Lastly * sort + direction keys will be converted into the model friendly order key. * @@ -330,14 +331,14 @@ class PaginatorComponent extends Component { } $options['order'] = array($options['sort'] => $direction); } - + if (!empty($whitelist)) { $field = key($options['order']); if (!in_array($field, $whitelist)) { $options['order'] = null; } } - + if (!empty($options['order']) && is_array($options['order'])) { $alias = $object->alias ; $key = $field = key($options['order']); @@ -356,7 +357,7 @@ class PaginatorComponent extends Component { $options['order'][$alias . '.' . $field] = $value; } } - + return $options; } diff --git a/lib/Cake/Controller/Component/RequestHandlerComponent.php b/lib/Cake/Controller/Component/RequestHandlerComponent.php index 1796088bc..02f7eabe0 100644 --- a/lib/Cake/Controller/Component/RequestHandlerComponent.php +++ b/lib/Cake/Controller/Component/RequestHandlerComponent.php @@ -72,7 +72,7 @@ class RequestHandlerComponent extends Component { * * @var string */ - private $__renderType = null; + protected $_renderType = null; /** * A mapping between extensions and deserializers for request bodies of that type. @@ -80,7 +80,7 @@ class RequestHandlerComponent extends Component { * * @var array */ - private $__inputTypeMap = array( + protected $_inputTypeMap = array( 'json' => array('json_decode', true) ); @@ -90,18 +90,18 @@ class RequestHandlerComponent extends Component { * @param ComponentCollection $collection ComponentCollection object. * @param array $settings Array of settings. */ - function __construct(ComponentCollection $collection, $settings = array()) { - $this->addInputType('xml', array(array($this, '_convertXml'))); + public function __construct(ComponentCollection $collection, $settings = array()) { + $this->addInputType('xml', array(array($this, 'convertXml'))); parent::__construct($collection, $settings); } /** * Initializes the component, gets a reference to Controller::$parameters, and - * checks to see if a file extension has been parsed by the Router. Or if the + * checks to see if a file extension has been parsed by the Router. Or if the * HTTP_ACCEPT_TYPE is set to a single value that is a supported extension and mapped type. * If yes, RequestHandler::$ext is set to that value * - * @param object $controller A reference to the controller + * @param Controller $controller A reference to the controller * @param array $settings Array of settings to _set(). * @return void * @see Router::parseExtensions() @@ -142,7 +142,7 @@ class RequestHandlerComponent extends Component { * - If the XML data is POSTed, the data is parsed into an XML object, which is assigned * to the $data property of the controller, which can then be saved to a model object. * - * @param object $controller A reference to the controller + * @param Controller $controller A reference to the controller * @return void */ public function startup($controller) { @@ -160,7 +160,7 @@ class RequestHandlerComponent extends Component { $this->respondAs('html', array('charset' => Configure::read('App.encoding'))); } - foreach ($this->__inputTypeMap as $type => $handler) { + foreach ($this->_inputTypeMap as $type => $handler) { if ($this->requestedWith($type)) { $input = call_user_func_array(array($controller->request, 'input'), $handler); $controller->request->data = $input; @@ -172,11 +172,10 @@ class RequestHandlerComponent extends Component { * Helper method to parse xml input data, due to lack of anonymous functions * this lives here. * - * @param string $xml + * @param string $xml * @return array Xml array data - * @access protected */ - public function _convertXml($xml) { + public function convertXml($xml) { try { $xml = Xml::build($xml); if (isset($xml->data)) { @@ -191,9 +190,11 @@ class RequestHandlerComponent extends Component { /** * Handles (fakes) redirects for Ajax requests using requestAction() * - * @param object $controller A reference to the controller - * @param mixed $url A string or array containing the redirect location - * @param mixed HTTP Status for redirect + * @param Controller $controller A reference to the controller + * @param string|array $url A string or array containing the redirect location + * @param mixed $status HTTP Status for redirect + * @param boolean $exit + * @return void */ public function beforeRedirect($controller, $url, $status = null, $exit = true) { if (!$this->request->is('ajax')) { @@ -238,7 +239,7 @@ class RequestHandlerComponent extends Component { /** * Returns true if the current request is over HTTPS, false otherwise. * - * @return bool True if call is over HTTPS + * @return boolean True if call is over HTTPS * @deprecated use `$this->request->is('ssl')` instead. */ public function isSSL() { @@ -285,7 +286,7 @@ class RequestHandlerComponent extends Component { /** * Returns true if the client accepts WAP content * - * @return bool + * @return boolean */ public function isWap() { return $this->prefers('wap'); @@ -373,6 +374,7 @@ class RequestHandlerComponent extends Component { /** * Gets remote client IP * + * @param boolean $safe * @return string Client IP address * @deprecated use $this->request->clientIp() from your, controller instead. */ @@ -435,7 +437,7 @@ class RequestHandlerComponent extends Component { if (!$this->request->is('post') && !$this->request->is('put')) { return null; } - + list($contentType) = explode(';', env('CONTENT_TYPE')); if ($type == null) { return $this->mapType($contentType); @@ -496,7 +498,7 @@ class RequestHandlerComponent extends Component { /** * Sets the layout and template paths for the content type defined by $type. - * + * * ### Usage: * * Render the response as an 'ajax' response. @@ -507,7 +509,7 @@ class RequestHandlerComponent extends Component { * * `$this->RequestHandler->renderAs($this, 'xml', array('attachment' => 'myfile.xml');` * - * @param object $controller A reference to a controller object + * @param Controller $controller A reference to a controller object * @param string $type Type of response to send (e.g: 'ajax') * @param array $options Array of options to use * @return void @@ -528,13 +530,13 @@ class RequestHandlerComponent extends Component { } $controller->ext = '.ctp'; - if (empty($this->__renderType)) { + if (empty($this->_renderType)) { $controller->viewPath .= DS . $type; } else { - $remove = preg_replace("/([\/\\\\]{$this->__renderType})$/", DS . $type, $controller->viewPath); + $remove = preg_replace("/([\/\\\\]{$this->_renderType})$/", DS . $type, $controller->viewPath); $controller->viewPath = $remove; } - $this->__renderType = $type; + $this->_renderType = $type; $controller->layoutPath = $type; if ($this->response->getMimeType($type)) { @@ -650,7 +652,7 @@ class RequestHandlerComponent extends Component { } /** - * Add a new mapped input type. Mapped input types are automatically + * Add a new mapped input type. Mapped input types are automatically * converted by RequestHandlerComponent during the startup() callback. * * @param string $type The type alias being converted, ie. json @@ -658,11 +660,12 @@ class RequestHandlerComponent extends Component { * be the handling callback, all other arguments should be additional parameters * for the handler. * @return void + * @throws CakeException */ public function addInputType($type, $handler) { if (!is_array($handler) || !isset($handler[0]) || !is_callable($handler[0])) { throw new CakeException(__d('cake_dev', 'You must give a handler callback.')); } - $this->__inputTypeMap[$type] = $handler; + $this->_inputTypeMap[$type] = $handler; } } diff --git a/lib/Cake/Controller/Component/SecurityComponent.php b/lib/Cake/Controller/Component/SecurityComponent.php index ff600cf85..0bfea1786 100644 --- a/lib/Cake/Controller/Component/SecurityComponent.php +++ b/lib/Cake/Controller/Component/SecurityComponent.php @@ -33,7 +33,6 @@ class SecurityComponent extends Component { * The controller method that will be called if this request is black-hole'd * * @var string - * @access public */ public $blackHoleCallback = null; @@ -41,7 +40,6 @@ class SecurityComponent extends Component { * List of controller actions for which a POST request is required * * @var array - * @access public * @see SecurityComponent::requirePost() */ public $requirePost = array(); @@ -50,7 +48,6 @@ class SecurityComponent extends Component { * List of controller actions for which a GET request is required * * @var array - * @access public * @see SecurityComponent::requireGet() */ public $requireGet = array(); @@ -59,7 +56,6 @@ class SecurityComponent extends Component { * List of controller actions for which a PUT request is required * * @var array - * @access public * @see SecurityComponent::requirePut() */ public $requirePut = array(); @@ -68,7 +64,6 @@ class SecurityComponent extends Component { * List of controller actions for which a DELETE request is required * * @var array - * @access public * @see SecurityComponent::requireDelete() */ public $requireDelete = array(); @@ -77,7 +72,6 @@ class SecurityComponent extends Component { * List of actions that require an SSL-secured connection * * @var array - * @access public * @see SecurityComponent::requireSecure() */ public $requireSecure = array(); @@ -86,7 +80,6 @@ class SecurityComponent extends Component { * List of actions that require a valid authentication key * * @var array - * @access public * @see SecurityComponent::requireAuth() */ public $requireAuth = array(); @@ -96,7 +89,6 @@ class SecurityComponent extends Component { * requests. * * @var array - * @access public * @see SecurityComponent::requireAuth() */ public $allowedControllers = array(); @@ -106,7 +98,6 @@ class SecurityComponent extends Component { * requests. * * @var array - * @access public * @see SecurityComponent::requireAuth() */ public $allowedActions = array(); @@ -135,7 +126,6 @@ class SecurityComponent extends Component { * services, etc. * * @var boolean - * @access public */ public $validatePost = true; @@ -150,7 +140,7 @@ class SecurityComponent extends Component { /** * The duration from when a CSRF token is created that it will expire on. - * Each form/page request will generate a new token that can only be submitted once unless + * Each form/page request will generate a new token that can only be submitted once unless * it expires. Can be any value compatible with strtotime() * * @var string @@ -171,7 +161,6 @@ class SecurityComponent extends Component { * Other components used by the Security component * * @var array - * @access public */ public $components = array('Session'); @@ -192,7 +181,7 @@ class SecurityComponent extends Component { /** * Component startup. All security checking happens here. * - * @param object $controller Instantiating controller + * @param Controller $controller Instantiating controller * @return void */ public function startup($controller) { @@ -288,10 +277,9 @@ class SecurityComponent extends Component { * Black-hole an invalid request with a 404 error or custom callback. If SecurityComponent::$blackHoleCallback * is specified, it will use this callback by executing the method indicated in $error * - * @param object $controller Instantiating controller + * @param Controller $controller Instantiating controller * @param string $error Error method * @return mixed If specified, controller blackHoleCallback's response, or no return otherwise - * @access public * @see SecurityComponent::$blackHoleCallback * @link http://book.cakephp.org/view/1307/blackHole-object-controller-string-error */ @@ -325,8 +313,8 @@ class SecurityComponent extends Component { /** * Check if HTTP methods are required * - * @param object $controller Instantiating controller - * @return bool true if $method is required + * @param Controller $controller Instantiating controller + * @return boolean true if $method is required */ protected function _methodsRequired($controller) { foreach (array('Post', 'Get', 'Put', 'Delete') as $method) { @@ -348,8 +336,8 @@ class SecurityComponent extends Component { /** * Check if access requires secure connection * - * @param object $controller Instantiating controller - * @return bool true if secure connection required + * @param Controller $controller Instantiating controller + * @return boolean true if secure connection required */ protected function _secureRequired($controller) { if (is_array($this->requireSecure) && !empty($this->requireSecure)) { @@ -369,8 +357,8 @@ class SecurityComponent extends Component { /** * Check if authentication is required * - * @param object $controller Instantiating controller - * @return bool true if authentication required + * @param Controller $controller Instantiating controller + * @return boolean true if authentication required */ protected function _authRequired($controller) { if (is_array($this->requireAuth) && !empty($this->requireAuth) && !empty($this->request->data)) { @@ -404,8 +392,8 @@ class SecurityComponent extends Component { /** * Validate submitted form * - * @param object $controller Instantiating controller - * @return bool true if submitted form is valid + * @param Controller $controller Instantiating controller + * @return boolean true if submitted form is valid */ protected function _validatePost($controller) { if (empty($controller->request->data)) { @@ -484,8 +472,8 @@ class SecurityComponent extends Component { /** * Add authentication key for new form posts * - * @param object $controller Instantiating controller - * @return bool Success + * @param Controller $controller Instantiating controller + * @return boolean Success */ protected function _generateToken($controller) { if (isset($controller->request->params['requested']) && $controller->request->params['requested'] === 1) { @@ -510,7 +498,7 @@ class SecurityComponent extends Component { if (!empty($tokenData['csrfTokens']) && is_array($tokenData['csrfTokens'])) { $token['csrfTokens'] = $this->_expireTokens($tokenData['csrfTokens']); } - } + } if ($this->csrfCheck && ($this->csrfUseOnce || empty($token['csrfTokens'])) ) { $token['csrfTokens'][$authKey] = strtotime($this->csrfExpires); } @@ -551,7 +539,7 @@ class SecurityComponent extends Component { * Uses a simple timeout to expire the tokens. * * @param array $tokens An array of nonce => expires. - * @return An array of nonce => expires. + * @return array An array of nonce => expires. */ protected function _expireTokens($tokens) { $now = time(); @@ -566,7 +554,7 @@ class SecurityComponent extends Component { /** * Calls a controller callback method * - * @param object $controller Controller to run callback on + * @param Controller $controller Controller to run callback on * @param string $method Method to execute * @param array $params Parameters to send to method * @return mixed Controller callback method's response diff --git a/lib/Cake/Controller/Component/SessionComponent.php b/lib/Cake/Controller/Component/SessionComponent.php index 3fa5472ba..f543427ba 100644 --- a/lib/Cake/Controller/Component/SessionComponent.php +++ b/lib/Cake/Controller/Component/SessionComponent.php @@ -32,7 +32,7 @@ App::uses('CakeSession', 'Model/Datasource'); class SessionComponent extends Component { /** - * Get / Set the userAgent + * Get / Set the userAgent * * @param string $userAgent Set the userAgent * @return void @@ -121,6 +121,7 @@ class SessionComponent extends Component { * @param string $element Element to wrap flash message in. * @param array $params Parameters to be sent to layout as view variables * @param string $key Message key, default is 'flash' + * @return void * @link http://book.cakephp.org/view/1313/setFlash */ public function setFlash($message, $element = 'default', $params = array(), $key = 'flash') { @@ -167,7 +168,7 @@ class SessionComponent extends Component { * If $id is passed in a beforeFilter, the Session will be started * with the specified id * - * @param $id string + * @param string $id * @return string */ public function id($id = null) { diff --git a/lib/Cake/Controller/ComponentCollection.php b/lib/Cake/Controller/ComponentCollection.php index ef9e8fa1d..68cc443b3 100644 --- a/lib/Cake/Controller/ComponentCollection.php +++ b/lib/Cake/Controller/ComponentCollection.php @@ -69,7 +69,7 @@ class ComponentCollection extends ObjectCollection { * ); * }}} * All calls to the `Email` component would use `AliasedEmail` instead. - * + * * @param string $component Component name to load * @param array $settings Settings for the component. * @return Component A component object, Either the existing loaded component or a new one. diff --git a/lib/Cake/Controller/Controller.php b/lib/Cake/Controller/Controller.php index 079c83c4b..083d261ce 100644 --- a/lib/Cake/Controller/Controller.php +++ b/lib/Cake/Controller/Controller.php @@ -47,7 +47,15 @@ App::uses('View', 'View'); * using Router::connect(). * * @package Cake.Controller - * @link http://book.cakephp.org/view/956/Introduction + * @property AclComponent $Acl + * @property AuthComponent $Auth + * @property CookieComponent $Cookie + * @property EmailComponent $Email + * @property PaginatorComponent $Paginator + * @property RequestHandlerComponent $RequestHandler + * @property SecurityComponent $Security + * @property SessionComponent $Session + * @link http://book.cakephp.org/view/956/Introduction */ class Controller extends Object { @@ -293,7 +301,7 @@ class Controller extends Object { * * @param CakeRequest $request Request object for this controller. Can be null for testing, * but expect that features that use the request parameters will not work. - * @param CakeResponse $response Response object for this controller. + * @param CakeResponse $response Response object for this controller. */ public function __construct($request = null, $response = null) { if ($this->name === null) { @@ -326,6 +334,7 @@ class Controller extends Object { * Provides backwards compatibility to avoid problems with empty and isset to alias properties. * Lazy loads models using the loadModel() method if declared in $uses * + * @param string $name * @return void */ public function __isset($name) { @@ -366,6 +375,7 @@ class Controller extends Object { * Provides backwards compatibility access to the request object properties. * Also provides the params alias. * + * @param string $name * @return void */ public function __get($name) { @@ -393,6 +403,8 @@ class Controller extends Object { /** * Provides backwards compatibility access for setting values to the request object. * + * @param string $name + * @param mixed $value * @return void */ public function __set($name, $value) { @@ -443,11 +455,12 @@ class Controller extends Object { } /** - * Dispatches the controller action. Checks that the action + * Dispatches the controller action. Checks that the action * exists and isn't private. * * @param CakeRequest $request - * @return The resulting response. + * @return mixed The resulting response. + * @throws PrivateActionException, MissingActionException */ public function invokeAction(CakeRequest $request) { $reflection = new ReflectionClass($this); @@ -474,7 +487,7 @@ class Controller extends Object { } /** - * Check if the request's action is marked as private, with an underscore, + * Check if the request's action is marked as private, with an underscore, * or if the request is attempting to directly accessing a prefixed action. * * @param ReflectionMethod $method The method to be invoked. @@ -483,7 +496,7 @@ class Controller extends Object { */ protected function _isPrivateAction(ReflectionMethod $method, CakeRequest $request) { $privateAction = ( - $method->name[0] === '_' || + $method->name[0] === '_' || !$method->isPublic() || !in_array($method->name, $this->methods) ); @@ -513,7 +526,7 @@ class Controller extends Object { * * @return void */ - protected function __mergeVars() { + protected function _mergeControllerVars() { $pluginController = $pluginDot = null; if (!empty($this->plugin)) { @@ -571,7 +584,7 @@ class Controller extends Object { * @throws MissingModelException */ public function constructClasses() { - $this->__mergeVars(); + $this->_mergeControllerVars(); $this->Components->init($this); if ($this->uses) { $this->uses = (array) $this->uses; @@ -869,7 +882,7 @@ class Controller extends Object { $this->request->params['models'][$className] = compact('plugin', 'className'); } } if (!empty($this->modelClass) && ($this->uses === false || $this->uses === array())) { - $this->request->params['models'][$this->modelClass] = array('plugin' => $this->plugin, 'className' => $this->modelClass); + $this->request->params['models'][$this->modelClass] = array('plugin' => $this->plugin, 'className' => $this->modelClass); } $models = ClassRegistry::keys(); @@ -1017,6 +1030,7 @@ class Controller extends Object { * Called before the controller action. You can use this method to configure and customize components * or perform logic that needs to happen before each controller action. * + * @return void * @link http://book.cakephp.org/view/984/Callbacks */ public function beforeFilter() { @@ -1026,6 +1040,7 @@ class Controller extends Object { * Called after the controller action is run, but before the view is rendered. You can use this method * to perform logic or set view variables that are required on every request. * + * @return void * @link http://book.cakephp.org/view/984/Callbacks */ public function beforeRender() { @@ -1051,6 +1066,7 @@ class Controller extends Object { /** * Called after the controller action is run and rendered. * + * @return void * @link http://book.cakephp.org/view/984/Callbacks */ public function afterFilter() { @@ -1063,10 +1079,22 @@ class Controller extends Object { * @return boolean Success * @link http://book.cakephp.org/view/984/Callbacks */ - public function _beforeScaffold($method) { + public function beforeScaffold($method) { return true; } +/** + * Alias to beforeScaffold() + * + * @param string $method + * @return boolean + * @see Controller::beforeScaffold() + * @deprecated + */ + protected function _beforeScaffold($method) { + return $this->beforeScaffold($method); + } + /** * This method should be overridden in child classes. * @@ -1074,10 +1102,22 @@ class Controller extends Object { * @return boolean Success * @link http://book.cakephp.org/view/984/Callbacks */ - public function _afterScaffoldSave($method) { + public function afterScaffoldSave($method) { return true; } +/** + * Alias to afterScaffoldSave() + * + * @param string $method + * @return boolean + * @see Controller::afterScaffoldSave() + * @deprecated + */ + protected function _afterScaffoldSave($method) { + return $this->afterScaffoldSave($method); + } + /** * This method should be overridden in child classes. * @@ -1085,10 +1125,22 @@ class Controller extends Object { * @return boolean Success * @link http://book.cakephp.org/view/984/Callbacks */ - public function _afterScaffoldSaveError($method) { + public function afterScaffoldSaveError($method) { return true; } +/** + * Alias to afterScaffoldSaveError() + * + * @param string $method + * @return boolean + * @see Controller::afterScaffoldSaveError() + * @deprecated + */ + protected function _afterScaffoldSaveError($method) { + return $this->afterScaffoldSaveError($method); + } + /** * This method should be overridden in child classes. * If not it will render a scaffold error. @@ -1098,7 +1150,20 @@ class Controller extends Object { * @return boolean Success * @link http://book.cakephp.org/view/984/Callbacks */ - public function _scaffoldError($method) { + public function scaffoldError($method) { return false; } + +/** + * Alias to scaffoldError() + * + * @param string $method + * @return boolean + * @see Controller::scaffoldError() + * @deprecated + */ + protected function _scaffoldError($method) { + return $this->scaffoldError($method); + } + } diff --git a/lib/Cake/Controller/PagesController.php b/lib/Cake/Controller/PagesController.php index 22b107432..bd6a3e7d7 100644 --- a/lib/Cake/Controller/PagesController.php +++ b/lib/Cake/Controller/PagesController.php @@ -35,7 +35,6 @@ class PagesController extends AppController { * Controller name * * @var string - * @access public */ public $name = 'Pages'; @@ -43,7 +42,6 @@ class PagesController extends AppController { * Default helper * * @var array - * @access public */ public $helpers = array('Html', 'Session'); @@ -51,7 +49,6 @@ class PagesController extends AppController { * This controller does not use a model * * @var array - * @access public */ public $uses = array(); @@ -59,6 +56,7 @@ class PagesController extends AppController { * Displays a view * * @param mixed What page to display + * @return void */ public function display() { $path = func_get_args(); diff --git a/lib/Cake/Controller/Scaffold.php b/lib/Cake/Controller/Scaffold.php index ec8e281a4..db781dd98 100644 --- a/lib/Cake/Controller/Scaffold.php +++ b/lib/Cake/Controller/Scaffold.php @@ -78,7 +78,6 @@ class Scaffold { * valid session. * * @var boolean - * @access public */ protected $_validSession = null; @@ -86,9 +85,8 @@ class Scaffold { * List of variables to collect from the associated controller * * @var array - * @access private */ - private $__passedVars = array( + protected $_passedVars = array( 'layout', 'name', 'viewPath', 'request' ); @@ -96,7 +94,6 @@ class Scaffold { * Title HTML element for current scaffolded view * * @var string - * @access public */ public $scaffoldTitle = null; @@ -105,13 +102,14 @@ class Scaffold { * * @param Controller $controller Controller to scaffold * @param CakeRequest $request Request parameters. + * @throws MissingModelException */ public function __construct(Controller $controller, CakeRequest $request) { $this->controller = $controller; - $count = count($this->__passedVars); + $count = count($this->_passedVars); for ($j = 0; $j < $count; $j++) { - $var = $this->__passedVars[$j]; + $var = $this->_passedVars[$j]; $this->{$var} = $controller->{$var}; } @@ -157,9 +155,10 @@ class Scaffold { * * @param CakeRequest $request Request Object for scaffolding * @return mixed A rendered view of a row from Models database table + * @throws NotFoundException */ protected function _scaffoldView(CakeRequest $request) { - if ($this->controller->_beforeScaffold('view')) { + if ($this->controller->beforeScaffold('view')) { if (isset($request->params['pass'][0])) { $this->ScaffoldModel->id = $request->params['pass'][0]; } @@ -172,7 +171,7 @@ class Scaffold { Inflector::variable($this->controller->modelClass), $this->request->data ); $this->controller->render($this->request['action'], $this->layout); - } elseif ($this->controller->_scaffoldError('view') === false) { + } elseif ($this->controller->scaffoldError('view') === false) { return $this->_scaffoldError(); } } @@ -184,13 +183,13 @@ class Scaffold { * @return mixed A rendered view listing rows from Models database table */ protected function _scaffoldIndex($params) { - if ($this->controller->_beforeScaffold('index')) { + if ($this->controller->beforeScaffold('index')) { $this->ScaffoldModel->recursive = 0; $this->controller->set( Inflector::variable($this->controller->name), $this->controller->paginate() ); $this->controller->render($this->request['action'], $this->layout); - } elseif ($this->controller->_scaffoldError('index') === false) { + } elseif ($this->controller->scaffoldError('index') === false) { return $this->_scaffoldError(); } } @@ -215,6 +214,7 @@ class Scaffold { * @param CakeRequest $request Request Object for scaffolding * @param string $action add or edt * @return mixed Success on save/update, add/edit form if data is empty or error if save or update fails + * @throws NotFoundException */ protected function _scaffoldSave(CakeRequest $request, $action = 'edit') { $formAction = 'edit'; @@ -224,7 +224,7 @@ class Scaffold { $success = __d('cake', 'saved'); } - if ($this->controller->_beforeScaffold($action)) { + if ($this->controller->beforeScaffold($action)) { if ($action == 'edit') { if (isset($request->params['pass'][0])) { $this->ScaffoldModel->id = $request['pass'][0]; @@ -240,7 +240,7 @@ class Scaffold { } if ($this->ScaffoldModel->save($request->data)) { - if ($this->controller->_afterScaffoldSave($action)) { + if ($this->controller->afterScaffoldSave($action)) { $message = __d('cake', 'The %1$s has been %2$s', Inflector::humanize($this->modelKey), @@ -248,7 +248,7 @@ class Scaffold { ); return $this->_sendMessage($message); } else { - return $this->controller->_afterScaffoldSaveError($action); + return $this->controller->afterScaffoldSaveError($action); } } else { if ($this->_validSession) { @@ -277,7 +277,7 @@ class Scaffold { } return $this->_scaffoldForm($formAction); - } elseif ($this->controller->_scaffoldError($action) === false) { + } elseif ($this->controller->scaffoldError($action) === false) { return $this->_scaffoldError(); } } @@ -285,11 +285,12 @@ class Scaffold { /** * Performs a delete on given scaffolded Model. * - * @param array $params Parameters for scaffolding + * @param CakeRequest $request Request for scaffolding * @return mixed Success on delete, error if delete fails + * @throws MethodNotAllowedException, NotFoundException */ protected function _scaffoldDelete(CakeRequest $request) { - if ($this->controller->_beforeScaffold('delete')) { + if ($this->controller->beforeScaffold('delete')) { if (!$request->is('post')) { throw new MethodNotAllowedException(); } @@ -312,7 +313,7 @@ class Scaffold { ); return $this->_sendMessage($message); } - } elseif ($this->controller->_scaffoldError('delete') === false) { + } elseif ($this->controller->scaffoldError('delete') === false) { return $this->_scaffoldError(); } } @@ -349,6 +350,7 @@ class Scaffold { * * @param CakeRequest $request Request object for scaffolding * @return mixed A rendered view of scaffold action, or showing the error + * @throws MissingActionException, MissingDatabaseException */ protected function _scaffold(CakeRequest $request) { $db = ConnectionManager::getDataSource($this->ScaffoldModel->useDbConfig); diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php index bb400c4e9..1e92aa76c 100644 --- a/lib/Cake/Core/App.php +++ b/lib/Cake/Core/App.php @@ -122,50 +122,40 @@ class App { * * @var array */ - private static $__map = array(); - -/** - * Holds paths for deep searching of files. - * - * @var array - */ - private static $__paths = array(); - -/** - * Holds loaded files. - * - * @var array - */ - private static $__loaded = array(); + protected static $_map = array(); /** * Holds and key => value array of object types. * * @var array */ - private static $__objects = array(); + protected static $_objects = array(); /** * Holds the location of each class * + * @var array */ - private static $__classMap = array(); + protected static $_classMap = array(); /** * Holds the possible paths for each package name * + * @var array */ - private static $__packages = array(); + protected static $_packages = array(); /** * Holds the templates for each customizable package path in the application * + * @var array */ - private static $__packageFormat = array(); + protected static $_packageFormat = array(); /** * Maps an old style CakePHP class type to the corresponding package * + * @var array */ public static $legacy = array( 'models' => 'Model', @@ -182,19 +172,22 @@ class App { /** * Indicates whether the class cache should be stored again because of an addition to it * + * @var boolean */ - private static $_cacheChange = false; + protected static $_cacheChange = false; /** * Indicates whether the object cache should be stored again because of an addition to it * + * @var boolean */ - private static $_objectCacheChange = false; + protected static $_objectCacheChange = false; /** * Indicates the the Application is in the bootstrapping process. Used to better cache * loaded classes while the cache libraries have not been yet initialized * + * @var boolean */ public static $bootstrapping = false; @@ -219,8 +212,8 @@ class App { if (!empty($plugin)) { $path = array(); $pluginPath = self::pluginPath($plugin); - if (!empty(self::$__packageFormat[$type])) { - foreach (self::$__packageFormat[$type] as $f) { + if (!empty(self::$_packageFormat[$type])) { + foreach (self::$_packageFormat[$type] as $f) { $path[] = sprintf($f, $pluginPath); } } @@ -228,10 +221,10 @@ class App { return $path; } - if (!isset(self::$__packages[$type])) { + if (!isset(self::$_packages[$type])) { return array(); } - return self::$__packages[$type]; + return self::$_packages[$type]; } /** @@ -254,8 +247,8 @@ class App { * @return void */ public static function build($paths = array(), $mode = App::PREPEND) { - if (empty(self::$__packageFormat)) { - self::$__packageFormat = array( + if (empty(self::$_packageFormat)) { + self::$_packageFormat = array( 'Model' => array( '%s' . 'Model' . DS, '%s' . 'models' . DS @@ -330,7 +323,7 @@ class App { if (!empty(self::$legacy[$type])) { $type = self::$legacy[$type]; } - self::$__packages[$type] = (array)$new; + self::$_packages[$type] = (array)$new; self::objects($type, null, false); } return $paths; @@ -347,28 +340,28 @@ class App { $paths = $legacyPaths; $defaults = array(); - foreach (self::$__packageFormat as $package => $format) { + foreach (self::$_packageFormat as $package => $format) { foreach ($format as $f) { $defaults[$package][] = sprintf($f, APP); } } foreach ($defaults as $type => $default) { - if (empty(self::$__packages[$type]) || empty($paths)) { - self::$__packages[$type] = $default; + if (empty(self::$_packages[$type]) || empty($paths)) { + self::$_packages[$type] = $default; } if (!empty($paths[$type])) { if ($mode === App::PREPEND) { - $path = array_merge((array)$paths[$type], self::$__packages[$type]); + $path = array_merge((array)$paths[$type], self::$_packages[$type]); } else { - $path = array_merge(self::$__packages[$type], (array)$paths[$type]); + $path = array_merge(self::$_packages[$type], (array)$paths[$type]); } } else { - $path = self::$__packages[$type]; + $path = self::$_packages[$type]; } - self::$__packages[$type] = array_values(array_unique($path)); + self::$_packages[$type] = array_values(array_unique($path)); } } @@ -398,12 +391,12 @@ class App { */ public static function themePath($theme) { $themeDir = 'Themed' . DS . Inflector::camelize($theme); - foreach (self::$__packages['View'] as $path) { + foreach (self::$_packages['View'] as $path) { if (is_dir($path . $themeDir)) { return $path . $themeDir . DS ; } } - return self::$__packages['View'][0] . $themeDir . DS; + return self::$_packages['View'][0] . $themeDir . DS; } /** @@ -466,13 +459,13 @@ class App { $name = $type . str_replace(DS, '', $path); } - if (empty(self::$__objects) && $cache === true) { - self::$__objects = Cache::read('object_map', '_cake_core_'); + if (empty(self::$_objects) && $cache === true) { + self::$_objects = Cache::read('object_map', '_cake_core_'); } $cacheLocation = empty($plugin) ? 'app' : $plugin; - if ($cache !== true || !isset(self::$__objects[$cacheLocation][$name])) { + if ($cache !== true || !isset(self::$_objects[$cacheLocation][$name])) { $objects = array(); if (empty($path)) { @@ -506,13 +499,13 @@ class App { return $objects; } - self::$__objects[$cacheLocation][$name] = $objects; + self::$_objects[$cacheLocation][$name] = $objects; if ($cache) { self::$_objectCacheChange = true; } } - return self::$__objects[$cacheLocation][$name]; + return self::$_objects[$cacheLocation][$name]; } /** @@ -527,9 +520,10 @@ class App { * * @param string $className the name of the class to configure package for * @param string $location the package name + * @return void */ public static function uses($className, $location) { - self::$__classMap[$className] = $location; + self::$_classMap[$className] = $location; } /** @@ -539,22 +533,23 @@ class App { * if a class is name `MyCustomClass` the file name should be `MyCustomClass.php` * * @param string $className the name of the class to load + * @return boolean */ public static function load($className) { - if (!isset(self::$__classMap[$className])) { + if (!isset(self::$_classMap[$className])) { return false; } - if ($file = self::__mapped($className)) { + if ($file = self::_mapped($className)) { return include $file; } - $parts = explode('.', self::$__classMap[$className], 2); + $parts = explode('.', self::$_classMap[$className], 2); list($plugin, $package) = count($parts) > 1 ? $parts : array(null, current($parts)); $paths = self::path($package, $plugin); if (empty($plugin)) { - $appLibs = empty(self::$__packages['Lib']) ? APPLIBS : current(self::$__packages['Lib']); + $appLibs = empty(self::$_packages['Lib']) ? APPLIBS : current(self::$_packages['Lib']); $paths[] = $appLibs . $package . DS; $paths[] = CAKE . $package . DS; } @@ -562,7 +557,7 @@ class App { foreach ($paths as $path) { $file = $path . $className . '.php'; if (file_exists($file)) { - self::__map($file, $className); + self::_map($file, $className); return include $file; } } @@ -578,7 +573,7 @@ class App { } foreach ($tries as $file) { if (file_exists($file)) { - self::__map($file, $className); + self::_map($file, $className); return include $file; } } @@ -594,8 +589,8 @@ class App { * @return string package name or null if not declared */ public static function location($className) { - if (!empty(self::$__classMap[$className])) { - return self::$__classMap[$className]; + if (!empty(self::$_classMap[$className])) { + return self::$_classMap[$className]; } return null; } @@ -676,12 +671,11 @@ class App { * @param string $name unique name of the file for identifying it inside the application * @param string $plugin camel cased plugin name if any * @param string $type name of the packed where the class is located - * @param string $file filename if known, the $name param will be used otherwise * @param string $originalType type name as supplied initially by the user * @param boolean $parent whether to load the class parent or not * @return boolean true indicating the successful load and existence of the class */ - private function _loadClass($name, $plugin, $type, $originalType, $parent) { + protected static function _loadClass($name, $plugin, $type, $originalType, $parent) { if ($type == 'Console/Command' && $name == 'Shell') { $type = 'Console'; } else if (isset(self::$types[$originalType]['suffix'])) { @@ -717,10 +711,10 @@ class App { * @param array $search list of paths to search the file into * @param string $file filename if known, the $name param will be used otherwise * @param boolean $return whether this function should return the contents of the file after being parsed by php or just a success notice - * @return mixed, if $return contents of the file after php parses it, boolean indicating success otherwise + * @return mixed if $return contents of the file after php parses it, boolean indicating success otherwise */ - private function _loadFile($name, $plugin, $search, $file, $return) { - $mapped = self::__mapped($name, $plugin); + protected function _loadFile($name, $plugin, $search, $file, $return) { + $mapped = self::_mapped($name, $plugin); if ($mapped) { $file = $mapped; } else if (!empty($search)) { @@ -737,7 +731,7 @@ class App { } } if (!empty($file) && file_exists($file)) { - self::__map($file, $name, $plugin); + self::_map($file, $name, $plugin); $returnValue = include $file; if ($return) { return $returnValue; @@ -756,8 +750,8 @@ class App { * @param string $ext file extension if known * @return boolean true if the file was loaded successfully, false otherwise */ - private function _loadVendor($name, $plugin, $file, $ext) { - if ($mapped = self::__mapped($name, $plugin)) { + protected function _loadVendor($name, $plugin, $file, $ext) { + if ($mapped = self::_mapped($name, $plugin)) { return (bool) include_once($mapped); } $fileTries = array(); @@ -775,7 +769,7 @@ class App { foreach ($fileTries as $file) { foreach ($paths as $path) { if (file_exists($path . $file)) { - self::__map($path . $file, $name, $plugin); + self::_map($path . $file, $name, $plugin); return (bool) include($path . $file); } } @@ -789,8 +783,8 @@ class App { * @return void */ public static function init() { - self::$__map += (array)Cache::read('file_map', '_cake_core_'); - self::$__objects += (array)Cache::read('object_map', '_cake_core_'); + self::$_map += (array)Cache::read('file_map', '_cake_core_'); + self::$_objects += (array)Cache::read('object_map', '_cake_core_'); register_shutdown_function(array('App', 'shutdown')); self::uses('CakePlugin', 'Core'); } @@ -802,13 +796,12 @@ class App { * @param string $name unique name for this map * @param string $plugin camelized if object is from a plugin, the name of the plugin * @return void - * @access private */ - private static function __map($file, $name, $plugin = null) { + protected static function _map($file, $name, $plugin = null) { if ($plugin) { - self::$__map['Plugin'][$plugin][$name] = $file; + self::$_map['Plugin'][$plugin][$name] = $file; } else { - self::$__map[$name] = $file; + self::$_map[$name] = $file; } if (!self::$bootstrapping) { self::$_cacheChange = true; @@ -820,19 +813,18 @@ class App { * * @param string $name unique name * @param string $plugin camelized if object is from a plugin, the name of the plugin - * @return mixed, file path if found, false otherwise - * @access private + * @return mixed file path if found, false otherwise */ - private static function __mapped($name, $plugin = null) { + protected static function _mapped($name, $plugin = null) { if ($plugin) { - if (isset(self::$__map['Plugin'][$plugin][$name])) { - return self::$__map['Plugin'][$plugin][$name]; + if (isset(self::$_map['Plugin'][$plugin][$name])) { + return self::$_map['Plugin'][$plugin][$name]; } return false; } - if (isset(self::$__map[$name])) { - return self::$__map[$name]; + if (isset(self::$_map[$name])) { + return self::$_map[$name]; } return false; } @@ -840,16 +832,16 @@ class App { /** * Object destructor. * - * Writes cache file if changes have been made to the $__map or $__paths + * Writes cache file if changes have been made to the $_map * * @return void */ public static function shutdown() { if (self::$_cacheChange) { - Cache::write('file_map', array_filter(self::$__map), '_cake_core_'); + Cache::write('file_map', array_filter(self::$_map), '_cake_core_'); } if (self::$_objectCacheChange) { - Cache::write('object_map', self::$__objects, '_cake_core_'); + Cache::write('object_map', self::$_objects, '_cake_core_'); } } } diff --git a/lib/Cake/Core/CakePlugin.php b/lib/Cake/Core/CakePlugin.php index 8551f82d8..e3679a1b5 100644 --- a/lib/Cake/Core/CakePlugin.php +++ b/lib/Cake/Core/CakePlugin.php @@ -1,12 +1,35 @@ 1. * * ### Uncaught exceptions @@ -47,7 +47,7 @@ App::uses('AppController', 'Controller'); * * This gives you full control over the exception handling process. The class you choose should be * loaded in your app/Config/bootstrap.php, so its available to handle any exceptions. You can - * define the handler as any callback type. Using Exception.handler overrides all other exception + * define the handler as any callback type. Using Exception.handler overrides all other exception * handling settings and logic. * * #### Using `AppController::appError();` @@ -67,8 +67,8 @@ App::uses('AppController', 'Controller'); * * #### Logging exceptions * - * Using the built-in exception handling, you can log all the exceptions - * that are dealt with by ErrorHandler by setting `Exception.log` to true in your core.php. + * Using the built-in exception handling, you can log all the exceptions + * that are dealt with by ErrorHandler by setting `Exception.log` to true in your core.php. * Enabling this will log every exception to CakeLog and the configured loggers. * * ### PHP errors @@ -103,6 +103,7 @@ class ErrorHandler { * This will either use an AppError class if your application has one, * or use the default ExceptionRenderer. * + * @param Exception $exception * @return void * @see http://php.net/manual/en/function.set-exception-handler.php */ @@ -138,7 +139,7 @@ class ErrorHandler { /** * Set as the default error handler by CakePHP. Use Configure::write('Error.handler', $callback), to use your own - * error handling methods. This function will use Debugger to display errors when debug > 0. And + * error handling methods. This function will use Debugger to display errors when debug > 0. And * will log errors to CakeLog, when debug == 0. * * You can use Configure::write('Error.level', $value); to set what type of errors will be handled here. @@ -185,7 +186,7 @@ class ErrorHandler { /** * Map an error code into an Error word, and log location. * - * @param int $code Error code to map + * @param integer $code Error code to map * @return array Array of error word, and log location. */ protected static function _mapErrorCode($code) { diff --git a/lib/Cake/Error/ExceptionRenderer.php b/lib/Cake/Error/ExceptionRenderer.php index b1e2dfb62..d35142375 100644 --- a/lib/Cake/Error/ExceptionRenderer.php +++ b/lib/Cake/Error/ExceptionRenderer.php @@ -57,7 +57,6 @@ class ExceptionRenderer { * Controller instance. * * @var Controller - * @access public */ public $controller = null; @@ -87,8 +86,7 @@ class ExceptionRenderer { * If the error is a CakeException it will be converted to either a 400 or a 500 * code error depending on the code used to construct the error. * - * @param string $method Method producing the error - * @param array $messages Error messages + * @param Exception $exception Exception */ public function __construct(Exception $exception) { $this->controller = $this->_getController($exception); @@ -142,7 +140,6 @@ class ExceptionRenderer { * * @param Exception $exception The exception to get a controller for. * @return Controller - * @access protected */ protected function _getController($exception) { App::uses('CakeErrorController', 'Controller'); @@ -173,7 +170,7 @@ class ExceptionRenderer { /** * Generic handler for the internal framework errors CakePHP can generate. * - * @param CakeExeption $error + * @param CakeException $error * @return void */ protected function _cakeError(CakeException $error) { @@ -197,7 +194,8 @@ class ExceptionRenderer { /** * Convenience method to display a 400 series page. * - * @param array $params Parameters for controller + * @param Exception $error + * @return void */ public function error400($error) { $message = $error->getMessage(); @@ -217,7 +215,8 @@ class ExceptionRenderer { /** * Convenience method to display a 500 page. * - * @param array $params Parameters for controller + * @param Exception $error + * @return void */ public function error500($error) { $url = $this->controller->request->here(); @@ -235,6 +234,7 @@ class ExceptionRenderer { * Generate the response using the controller object. * * @param string $template The template to render. + * @return void */ protected function _outputMessage($template) { $this->controller->render($template); @@ -247,6 +247,7 @@ class ExceptionRenderer { * and doesn't call component methods. * * @param string $template The template to render + * @return void */ protected function _outputMessageSafe($template) { $this->controller->helpers = array('Form', 'Html', 'Session'); diff --git a/lib/Cake/I18n/I18n.php b/lib/Cake/I18n/I18n.php index 9308ffd32..f57838494 100644 --- a/lib/Cake/I18n/I18n.php +++ b/lib/Cake/I18n/I18n.php @@ -64,37 +64,37 @@ class I18n { * * @var string */ - private $__lang = null; + protected $_lang = null; /** * Translation strings for a specific domain read from the .mo or .po files * * @var array */ - private $__domains = array(); + protected $_domains = array(); /** - * Set to true when I18N::__bindTextDomain() is called for the first time. + * Set to true when I18N::_bindTextDomain() is called for the first time. * If a translation file is found it is set to false again * * @var boolean */ - private $__noLocale = false; + protected $_noLocale = false; /** - * Set to true when I18N::__bindTextDomain() is called for the first time. + * Set to true when I18N::_bindTextDomain() is called for the first time. * If a translation file is found it is set to false again * * @var array */ - private $__categories = array( - 'LC_ALL', 'LC_COLLATE', 'LC_CTYPE', 'LC_MONETARY', 'LC_NUMERIC', 'LC_TIME', 'LC_MESSAGES' + protected $_categories = array( + 'LC_ALL', 'LC_COLLATE', 'LC_CTYPE', 'LC_MONETARY', 'LC_NUMERIC', 'LC_TIME', 'LC_MESSAGES' ); /** * Return a static instance of the I18n class * - * @return object I18n + * @return I18n */ public static function &getInstance() { static $instance = array(); @@ -127,7 +127,7 @@ class I18n { } if (is_numeric($category)) { - $_this->category = $_this->__categories[$category]; + $_this->category = $_this->_categories[$category]; } $language = Configure::read('Config.language'); @@ -135,9 +135,9 @@ class I18n { $language = $_SESSION['Config']['language']; } - if (($_this->__lang && $_this->__lang !== $language) || !$_this->__lang) { + if (($_this->_lang && $_this->_lang !== $language) || !$_this->_lang) { $lang = $_this->l10n->get($language); - $_this->__lang = $lang; + $_this->_lang = $lang; } if (is_null($domain)) { @@ -146,24 +146,24 @@ class I18n { $_this->domain = $domain . '_' . $_this->l10n->lang; - if (!isset($_this->__domains[$domain][$_this->__lang])) { - $_this->__domains[$domain][$_this->__lang] = Cache::read($_this->domain, '_cake_core_'); + if (!isset($_this->_domains[$domain][$_this->_lang])) { + $_this->_domains[$domain][$_this->_lang] = Cache::read($_this->domain, '_cake_core_'); } - if (!isset($_this->__domains[$domain][$_this->__lang][$_this->category])) { - $_this->__bindTextDomain($domain); - Cache::write($_this->domain, $_this->__domains[$domain][$_this->__lang], '_cake_core_'); + if (!isset($_this->_domains[$domain][$_this->_lang][$_this->category])) { + $_this->_bindTextDomain($domain); + Cache::write($_this->domain, $_this->_domains[$domain][$_this->_lang], '_cake_core_'); } if ($_this->category == 'LC_TIME') { - return $_this->__translateTime($singular,$domain); + return $_this->_translateTime($singular,$domain); } if (!isset($count)) { $plurals = 0; - } elseif (!empty($_this->__domains[$domain][$_this->__lang][$_this->category]["%plural-c"]) && $_this->__noLocale === false) { - $header = $_this->__domains[$domain][$_this->__lang][$_this->category]["%plural-c"]; - $plurals = $_this->__pluralGuess($header, $count); + } elseif (!empty($_this->_domains[$domain][$_this->_lang][$_this->category]["%plural-c"]) && $_this->_noLocale === false) { + $header = $_this->_domains[$domain][$_this->_lang][$_this->category]["%plural-c"]; + $plurals = $_this->_pluralGuess($header, $count); } else { if ($count != 1) { $plurals = 1; @@ -172,8 +172,8 @@ class I18n { } } - if (!empty($_this->__domains[$domain][$_this->__lang][$_this->category][$singular])) { - if (($trans = $_this->__domains[$domain][$_this->__lang][$_this->category][$singular]) || ($plurals) && ($trans = $_this->__domains[$domain][$_this->__lang][$_this->category][$plural])) { + if (!empty($_this->_domains[$domain][$_this->_lang][$_this->category][$singular])) { + if (($trans = $_this->_domains[$domain][$_this->_lang][$_this->category][$singular]) || ($plurals) && ($trans = $_this->_domains[$domain][$_this->_lang][$_this->category][$plural])) { if (is_array($trans)) { if (isset($trans[$plurals])) { $trans = $trans[$plurals]; @@ -198,7 +198,7 @@ class I18n { */ public static function clear() { $self = I18n::getInstance(); - $self->__domains = array(); + $self->_domains = array(); } /** @@ -208,17 +208,17 @@ class I18n { */ public static function domains() { $self = I18n::getInstance(); - return $self->__domains; + return $self->_domains; } /** * Attempts to find the plural form of a string. * * @param string $header Type - * @param integrer $n Number + * @param integer $n Number * @return integer plural match */ - private function __pluralGuess($header, $n) { + protected function _pluralGuess($header, $n) { if (!is_string($header) || $header === "nplurals=1;plural=0;" || !isset($header[0])) { return 0; } @@ -266,8 +266,8 @@ class I18n { * @param string $domain Domain to bind * @return string Domain binded */ - private function __bindTextDomain($domain) { - $this->__noLocale = true; + protected function _bindTextDomain($domain) { + $this->_noLocale = true; $core = true; $merge = array(); $searchPaths = App::path('locales'); @@ -295,69 +295,70 @@ class I18n { $app = $directory . $lang . DS . $this->category . DS . 'core'; if (file_exists($fn = "$app.mo")) { - $this->__loadMo($fn, $domain); - $this->__noLocale = false; - $merge[$domain][$this->__lang][$this->category] = $this->__domains[$domain][$this->__lang][$this->category]; + $this->_loadMo($fn, $domain); + $this->_noLocale = false; + $merge[$domain][$this->_lang][$this->category] = $this->_domains[$domain][$this->_lang][$this->category]; $core = null; } elseif (file_exists($fn = "$app.po") && ($f = fopen($fn, "r"))) { - $this->__loadPo($f, $domain); - $this->__noLocale = false; - $merge[$domain][$this->__lang][$this->category] = $this->__domains[$domain][$this->__lang][$this->category]; + $this->_loadPo($f, $domain); + $this->_noLocale = false; + $merge[$domain][$this->_lang][$this->category] = $this->_domains[$domain][$this->_lang][$this->category]; $core = null; } } if (file_exists($fn = "$file.mo")) { - $this->__loadMo($fn, $domain); - $this->__noLocale = false; + $this->_loadMo($fn, $domain); + $this->_noLocale = false; break 2; } elseif (file_exists($fn = "$file.po") && ($f = fopen($fn, "r"))) { - $this->__loadPo($f, $domain); - $this->__noLocale = false; + $this->_loadPo($f, $domain); + $this->_noLocale = false; break 2; } elseif (is_file($localeDef) && ($f = fopen($localeDef, "r"))) { - $this->__loadLocaleDefinition($f, $domain); - $this->__noLocale = false; + $this->_loadLocaleDefinition($f, $domain); + $this->_noLocale = false; return $domain; } } } - if (empty($this->__domains[$domain][$this->__lang][$this->category])) { - $this->__domains[$domain][$this->__lang][$this->category] = array(); + if (empty($this->_domains[$domain][$this->_lang][$this->category])) { + $this->_domains[$domain][$this->_lang][$this->category] = array(); return $domain; } - if (isset($this->__domains[$domain][$this->__lang][$this->category][""])) { - $head = $this->__domains[$domain][$this->__lang][$this->category][""]; + if (isset($this->_domains[$domain][$this->_lang][$this->category][""])) { + $head = $this->_domains[$domain][$this->_lang][$this->category][""]; foreach (explode("\n", $head) as $line) { $header = strtok($line,":"); $line = trim(strtok("\n")); - $this->__domains[$domain][$this->__lang][$this->category]["%po-header"][strtolower($header)] = $line; + $this->_domains[$domain][$this->_lang][$this->category]["%po-header"][strtolower($header)] = $line; } - if (isset($this->__domains[$domain][$this->__lang][$this->category]["%po-header"]["plural-forms"])) { - $switch = preg_replace("/(?:[() {}\\[\\]^\\s*\\]]+)/", "", $this->__domains[$domain][$this->__lang][$this->category]["%po-header"]["plural-forms"]); - $this->__domains[$domain][$this->__lang][$this->category]["%plural-c"] = $switch; - unset($this->__domains[$domain][$this->__lang][$this->category]["%po-header"]); + if (isset($this->_domains[$domain][$this->_lang][$this->category]["%po-header"]["plural-forms"])) { + $switch = preg_replace("/(?:[() {}\\[\\]^\\s*\\]]+)/", "", $this->_domains[$domain][$this->_lang][$this->category]["%po-header"]["plural-forms"]); + $this->_domains[$domain][$this->_lang][$this->category]["%plural-c"] = $switch; + unset($this->_domains[$domain][$this->_lang][$this->category]["%po-header"]); } - $this->__domains = Set::pushDiff($this->__domains, $merge); + $this->_domains = Set::pushDiff($this->_domains, $merge); - if (isset($this->__domains[$domain][$this->__lang][$this->category][null])) { - unset($this->__domains[$domain][$this->__lang][$this->category][null]); + if (isset($this->_domains[$domain][$this->_lang][$this->category][null])) { + unset($this->_domains[$domain][$this->_lang][$this->category][null]); } } return $domain; } /** - * Loads the binary .mo file for translation and sets the values for this translation in the var I18n::__domains + * Loads the binary .mo file for translation and sets the values for this translation in the var I18n::_domains * * @param resource $file Binary .mo file to load * @param string $domain Domain where to load file in + * @return void */ - private function __loadMo($file, $domain) { + protected function _loadMo($file, $domain) { $data = file_get_contents($file); if ($data) { @@ -380,10 +381,10 @@ class I18n { if (strpos($msgstr, "\000")) { $msgstr = explode("\000", $msgstr); } - $this->__domains[$domain][$this->__lang][$this->category][$msgid] = $msgstr; + $this->_domains[$domain][$this->_lang][$this->category][$msgid] = $msgstr; if (isset($msgid_plural)) { - $this->__domains[$domain][$this->__lang][$this->category][$msgid_plural] =& $this->__domains[$domain][$this->__lang][$this->category][$msgid]; + $this->_domains[$domain][$this->_lang][$this->category][$msgid_plural] =& $this->_domains[$domain][$this->_lang][$this->category][$msgid]; } } } @@ -391,13 +392,13 @@ class I18n { } /** - * Loads the text .po file for translation and sets the values for this translation in the var I18n::__domains + * Loads the text .po file for translation and sets the values for this translation in the var I18n::_domains * * @param resource $file Text .po file to load * @param string $domain Domain to load file in * @return array Binded domain elements */ - private function __loadPo($file, $domain) { + protected function _loadPo($file, $domain) { $type = 0; $translations = array(); $translationKey = ""; @@ -457,7 +458,7 @@ class I18n { } while (!feof($file)); fclose($file); $merge[""] = $header; - return $this->__domains[$domain][$this->__lang][$this->category] = array_merge($merge ,$translations); + return $this->_domains[$domain][$this->_lang][$this->category] = array_merge($merge ,$translations); } /** @@ -467,7 +468,7 @@ class I18n { * @param string $domain Domain where locale definitions will be stored * @return void */ - private function __loadLocaleDefinition($file, $domain = null) { + protected function _loadLocaleDefinition($file, $domain = null) { $comment = '#'; $escape = '\\'; $currentToken = false; @@ -509,14 +510,14 @@ class I18n { $this->__escape = $escape; foreach ($value as $i => $val) { $val = trim($val, '"'); - $val = preg_replace_callback('/(?:<)?(.[^>]*)(?:>)?/', array(&$this, '__parseLiteralValue'), $val); + $val = preg_replace_callback('/(?:<)?(.[^>]*)(?:>)?/', array(&$this, '_parseLiteralValue'), $val); $val = str_replace($replacements, $mustEscape, $val); $value[$i] = $val; } if (count($value) == 1) { - $this->__domains[$domain][$this->__lang][$this->category][$currentToken] = array_pop($value); + $this->_domains[$domain][$this->_lang][$this->category][$currentToken] = array_pop($value); } else { - $this->__domains[$domain][$this->__lang][$this->category][$currentToken] = $value; + $this->_domains[$domain][$this->_lang][$this->category][$currentToken] = $value; } } } @@ -527,7 +528,7 @@ class I18n { * @param string $string Symbol to be parsed * @return string parsed symbol */ - private function __parseLiteralValue($string) { + protected function _parseLiteralValue($string) { $string = $string[1]; if (substr($string, 0, 2) === $this->__escape . 'x') { $delimiter = $this->__escape . 'x'; @@ -558,9 +559,9 @@ class I18n { * @param string $domain Domain where format is stored * @return mixed translated format string if only value or array of translated strings for corresponding format. */ - private function __translateTime($format, $domain) { - if (!empty($this->__domains[$domain][$this->__lang]['LC_TIME'][$format])) { - if (($trans = $this->__domains[$domain][$this->__lang][$this->category][$format])) { + protected function _translateTime($format, $domain) { + if (!empty($this->_domains[$domain][$this->_lang]['LC_TIME'][$format])) { + if (($trans = $this->_domains[$domain][$this->_lang][$this->category][$format])) { return $trans; } } diff --git a/lib/Cake/I18n/L10n.php b/lib/Cake/I18n/L10n.php index 64555f7d9..ba803ab2d 100644 --- a/lib/Cake/I18n/L10n.php +++ b/lib/Cake/I18n/L10n.php @@ -29,7 +29,6 @@ class L10n { * The language for current locale * * @var string - * @access public */ public $language = 'English (United States)'; @@ -37,7 +36,6 @@ class L10n { * Locale search paths * * @var array - * @access public */ public $languagePath = array('eng'); @@ -45,7 +43,6 @@ class L10n { * ISO 639-3 for current locale * * @var string - * @access public */ public $lang = 'eng'; @@ -53,7 +50,6 @@ class L10n { * Locale * * @var string - * @access public */ public $locale = 'en_us'; @@ -63,7 +59,6 @@ class L10n { * DEFAULT_LANGUAGE is defined in an application this will be set as a fall back * * @var string - * @access public */ public $default = null; @@ -71,7 +66,6 @@ class L10n { * Encoding used for current locale * * @var string - * @access public */ public $charset = 'utf-8'; @@ -79,7 +73,6 @@ class L10n { * Text direction for current locale * * @var string - * @access public */ public $direction = 'ltr'; @@ -87,17 +80,15 @@ class L10n { * Set to true if a locale is found * * @var string - * @access public */ public $found = false; /** - * Maps ISO 639-3 to I10n::__l10nCatalog + * Maps ISO 639-3 to I10n::_l10nCatalog * * @var array - * @access private */ - private $__l10nMap = array(/* Afrikaans */ 'afr' => 'af', + protected $_l10nMap = array(/* Afrikaans */ 'afr' => 'af', /* Albanian */ 'alb' => 'sq', /* Arabic */ 'ara' => 'ar', /* Armenian - Armenia */ 'hye' => 'hy', @@ -182,9 +173,8 @@ class L10n { * holds all information related to a language * * @var array - * @access private */ - private $__l10nCatalog = array('af' => array('language' => 'Afrikaans', 'locale' => 'afr', 'localeFallback' => 'afr', 'charset' => 'utf-8', 'direction' => 'ltr'), + protected $_l10nCatalog = array('af' => array('language' => 'Afrikaans', 'locale' => 'afr', 'localeFallback' => 'afr', 'charset' => 'utf-8', 'direction' => 'ltr'), 'ar' => array('language' => 'Arabic', 'locale' => 'ara', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), 'ar-ae' => array('language' => 'Arabic (U.A.E.)', 'locale' => 'ar_ae', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), 'ar-bh' => array('language' => 'Arabic (Bahrain)', 'locale' => 'ar_bh', 'localeFallback' => 'ara', 'charset' => 'utf-8', 'direction' => 'rtl'), @@ -336,16 +326,17 @@ class L10n { /** * Gets the settings for $language. - * If $language is null it attempt to get settings from L10n::__autoLanguage(); if this fails - * the method will get the settings from L10n::__setLanguage(); + * If $language is null it attempt to get settings from L10n::_autoLanguage(); if this fails + * the method will get the settings from L10n::_setLanguage(); * * @param string $language Language (if null will use DEFAULT_LANGUAGE if defined) + * @return mixed */ public function get($language = null) { if ($language !== null) { - return $this->__setLanguage($language); - } elseif ($this->__autoLanguage() === false) { - return $this->__setLanguage(); + return $this->_setLanguage($language); + } elseif ($this->_autoLanguage() === false) { + return $this->_setLanguage(); } } @@ -354,38 +345,38 @@ class L10n { * If $language is null it will use the DEFAULT_LANGUAGE if defined * * @param string $language Language (if null will use DEFAULT_LANGUAGE if defined) - * @access private + * @return mixed */ - private function __setLanguage($language = null) { + protected function _setLanguage($language = null) { $langKey = null; - if ($language !== null && isset($this->__l10nMap[$language]) && isset($this->__l10nCatalog[$this->__l10nMap[$language]])) { - $langKey = $this->__l10nMap[$language]; - } else if ($language !== null && isset($this->__l10nCatalog[$language])) { + if ($language !== null && isset($this->_l10nMap[$language]) && isset($this->_l10nCatalog[$this->_l10nMap[$language]])) { + $langKey = $this->_l10nMap[$language]; + } else if ($language !== null && isset($this->_l10nCatalog[$language])) { $langKey = $language; } else if (defined('DEFAULT_LANGUAGE')) { $langKey = $language = DEFAULT_LANGUAGE; } - if ($langKey !== null && isset($this->__l10nCatalog[$langKey])) { - $this->language = $this->__l10nCatalog[$langKey]['language']; + if ($langKey !== null && isset($this->_l10nCatalog[$langKey])) { + $this->language = $this->_l10nCatalog[$langKey]['language']; $this->languagePath = array( - $this->__l10nCatalog[$langKey]['locale'], - $this->__l10nCatalog[$langKey]['localeFallback'] + $this->_l10nCatalog[$langKey]['locale'], + $this->_l10nCatalog[$langKey]['localeFallback'] ); $this->lang = $language; - $this->locale = $this->__l10nCatalog[$langKey]['locale']; - $this->charset = $this->__l10nCatalog[$langKey]['charset']; - $this->direction = $this->__l10nCatalog[$langKey]['direction']; + $this->locale = $this->_l10nCatalog[$langKey]['locale']; + $this->charset = $this->_l10nCatalog[$langKey]['charset']; + $this->direction = $this->_l10nCatalog[$langKey]['direction']; } else { $this->lang = $language; $this->languagePath = array($language); } if ($this->default) { - if (isset($this->__l10nMap[$this->default]) && isset($this->__l10nCatalog[$this->__l10nMap[$this->default]])) { - $this->languagePath[] = $this->__l10nCatalog[$this->__l10nMap[$this->default]]['localeFallback']; - } else if (isset($this->__l10nCatalog[$this->default])) { - $this->languagePath[] = $this->__l10nCatalog[$this->default]['localeFallback']; + if (isset($this->_l10nMap[$this->default]) && isset($this->_l10nCatalog[$this->_l10nMap[$this->default]])) { + $this->languagePath[] = $this->_l10nCatalog[$this->_l10nMap[$this->default]]['localeFallback']; + } else if (isset($this->_l10nCatalog[$this->default])) { + $this->languagePath[] = $this->_l10nCatalog[$this->default]['localeFallback']; } } $this->found = true; @@ -403,18 +394,17 @@ class L10n { * Attempts to find the locale settings based on the HTTP_ACCEPT_LANGUAGE variable * * @return boolean Success - * @access private */ - private function __autoLanguage() { + protected function _autoLanguage() { $_detectableLanguages = CakeRequest::acceptLanguage(); foreach ($_detectableLanguages as $key => $langKey) { - if (isset($this->__l10nCatalog[$langKey])) { - $this->__setLanguage($langKey); + if (isset($this->_l10nCatalog[$langKey])) { + $this->_setLanguage($langKey); return true; } else if (strpos($langKey, '-') !== false) { $langKey = substr($langKey, 0, 2); - if (isset($this->__l10nCatalog[$langKey])) { - $this->__setLanguage($langKey); + if (isset($this->_l10nCatalog[$langKey])) { + $this->_setLanguage($langKey); return true; } } @@ -439,14 +429,14 @@ class L10n { } return $result; } else if (is_string($mixed)) { - if (strlen($mixed) === 2 && in_array($mixed, $this->__l10nMap)) { - return array_search($mixed, $this->__l10nMap); - } else if (isset($this->__l10nMap[$mixed])) { - return $this->__l10nMap[$mixed]; + if (strlen($mixed) === 2 && in_array($mixed, $this->_l10nMap)) { + return array_search($mixed, $this->_l10nMap); + } else if (isset($this->_l10nMap[$mixed])) { + return $this->_l10nMap[$mixed]; } return false; } - return $this->__l10nMap; + return $this->_l10nMap; } /** @@ -466,13 +456,13 @@ class L10n { } return $result; } else if (is_string($language)) { - if (isset($this->__l10nCatalog[$language])) { - return $this->__l10nCatalog[$language]; - } else if (isset($this->__l10nMap[$language]) && isset($this->__l10nCatalog[$this->__l10nMap[$language]])) { - return $this->__l10nCatalog[$this->__l10nMap[$language]]; + if (isset($this->_l10nCatalog[$language])) { + return $this->_l10nCatalog[$language]; + } else if (isset($this->_l10nMap[$language]) && isset($this->_l10nCatalog[$this->_l10nMap[$language]])) { + return $this->_l10nCatalog[$this->_l10nMap[$language]]; } return false; } - return $this->__l10nCatalog; + return $this->_l10nCatalog; } } diff --git a/lib/Cake/I18n/Multibyte.php b/lib/Cake/I18n/Multibyte.php index 8f7195f14..bc581b506 100644 --- a/lib/Cake/I18n/Multibyte.php +++ b/lib/Cake/I18n/Multibyte.php @@ -258,27 +258,27 @@ class Multibyte { * * @var array */ - private static $__caseFold = array(); + protected static $_caseFold = array(); /** * Holds an array of Unicode code point ranges * * @var array */ - private static $__codeRange = array(); + protected static $_codeRange = array(); /** * Holds the current code point range * * @var string */ - private static $__table = null; + protected static $_table = null; /** * Converts a multibyte character string * to the decimal value of the character * - * @param multibyte string $string + * @param string $string * @return array */ public static function utf8($string) { @@ -341,8 +341,8 @@ class Multibyte { /** * Find position of first occurrence of a case-insensitive string. * - * @param multi-byte string $haystack The string from which to get the position of the first occurrence of $needle. - * @param multi-byte string $needle The string to find in $haystack. + * @param string $haystack The string from which to get the position of the first occurrence of $needle. + * @param string $needle The string to find in $haystack. * @param integer $offset The position in $haystack to start searching. * @return integer|boolean The numeric position of the first occurrence of $needle in the $haystack string, * or false if $needle is not found. @@ -365,7 +365,7 @@ class Multibyte { * If set to true, it returns all of $haystack from the beginning to the first occurrence of $needle. * If set to false, it returns all of $haystack from the first occurrence of $needle to the end, * Default value is false. - * @return int|boolean The portion of $haystack, or false if $needle is not found. + * @return integer|boolean The portion of $haystack, or false if $needle is not found. */ public static function stristr($haystack, $needle, $part = false) { $php = (PHP_VERSION < 5.3); @@ -780,7 +780,7 @@ class Multibyte { $matched = true; } else { $matched = false; - $keys = self::__find($char, 'upper'); + $keys = self::_find($char, 'upper'); if (!empty($keys)) { foreach ($keys as $key => $value) { @@ -803,10 +803,7 @@ class Multibyte { * Make a string uppercase * * @param string $string The string being uppercased. - * @param string $encoding Character encoding name to use. If it is omitted, internal character encoding is used. * @return string with all alphabetic characters converted to uppercase. - * @access public - * @static */ public static function strtoupper($string) { $utf8Map = Multibyte::utf8($string); @@ -829,7 +826,7 @@ class Multibyte { } else { $matched = false; - $keys = self::__find($char); + $keys = self::_find($char); $keyCount = count($keys); if (!empty($keys)) { @@ -1006,10 +1003,10 @@ class Multibyte { /** * Return the Code points range for Unicode characters * - * @param interger $decimal + * @param integer $decimal * @return string */ - private static function __codepoint($decimal) { + protected static function _codepoint($decimal) { if ($decimal > 128 && $decimal < 256) { $return = '0080_00ff'; // Latin-1 Supplement } elseif ($decimal < 384) { @@ -1047,7 +1044,7 @@ class Multibyte { } else { $return = false; } - self::$__codeRange[$decimal] = $return; + self::$_codeRange[$decimal] = $return; return $return; } @@ -1058,10 +1055,10 @@ class Multibyte { * @param string $type * @return array */ - private static function __find($char, $type = 'lower') { + protected static function _find($char, $type = 'lower') { $found = array(); - if (!isset(self::$__codeRange[$char])) { - $range = self::__codepoint($char); + if (!isset(self::$_codeRange[$char])) { + $range = self::_codepoint($char); if ($range === false) { return null; } @@ -1070,21 +1067,21 @@ class Multibyte { Configure::config('_cake_core_', new PhpReader(CAKE . 'Config' . DS)); } Configure::load('unicode' . DS . 'casefolding' . DS . $range, '_cake_core_'); - self::$__caseFold[$range] = Configure::read($range); + self::$_caseFold[$range] = Configure::read($range); Configure::delete($range); } - if (!self::$__codeRange[$char]) { + if (!self::$_codeRange[$char]) { return null; } - self::$__table = self::$__codeRange[$char]; - $count = count(self::$__caseFold[self::$__table]); + self::$_table = self::$_codeRange[$char]; + $count = count(self::$_caseFold[self::$_table]); for ($i = 0; $i < $count; $i++) { - if ($type === 'lower' && self::$__caseFold[self::$__table][$i][$type][0] === $char) { - $found[] = self::$__caseFold[self::$__table][$i]; - } elseif ($type === 'upper' && self::$__caseFold[self::$__table][$i][$type] === $char) { - $found[] = self::$__caseFold[self::$__table][$i]; + if ($type === 'lower' && self::$_caseFold[self::$_table][$i][$type][0] === $char) { + $found[] = self::$_caseFold[self::$_table][$i]; + } elseif ($type === 'upper' && self::$_caseFold[self::$_table][$i][$type] === $char) { + $found[] = self::$_caseFold[self::$_table][$i]; } } return $found; diff --git a/lib/Cake/Log/CakeLog.php b/lib/Cake/Log/CakeLog.php index 120247ca1..042f05d2b 100644 --- a/lib/Cake/Log/CakeLog.php +++ b/lib/Cake/Log/CakeLog.php @@ -112,6 +112,7 @@ class CakeLog { * * @param string $loggerName the plugin.className of the logger class you want to build. * @return mixed boolean false on any failures, string of classname to use if search was successful. + * @throws CakeLogException */ protected static function _getLogger($loggerName) { list($plugin, $loggerName) = pluginSplit($loggerName, true); @@ -136,7 +137,7 @@ class CakeLog { * Removes a stream from the active streams. Once a stream has been removed * it will no longer have messages sent to it. * - * @param string $keyname Key name of a configured stream to remove. + * @param string $streamName Key name of a configured stream to remove. * @return void */ public static function drop($streamName) { @@ -170,7 +171,7 @@ class CakeLog { * ### Usage: * * Write a message to the 'warning' log: - * + * * `CakeLog::write('warning', 'Stuff is broken here');` * * @param string $type Type of message being written diff --git a/lib/Cake/Log/CakeLogInterface.php b/lib/Cake/Log/CakeLogInterface.php index ad20df1c0..9f6f29cd9 100644 --- a/lib/Cake/Log/CakeLogInterface.php +++ b/lib/Cake/Log/CakeLogInterface.php @@ -1,4 +1,21 @@ LOGS); $this->_path = $options['path']; } diff --git a/lib/Cake/Model/AclNode.php b/lib/Cake/Model/AclNode.php index d36283be2..742dd2505 100644 --- a/lib/Cake/Model/AclNode.php +++ b/lib/Cake/Model/AclNode.php @@ -33,7 +33,6 @@ class AclNode extends AppModel { * Explicitly disable in-memory query caching for ACL models * * @var boolean - * @access public */ public $cacheQueries = false; @@ -41,7 +40,6 @@ class AclNode extends AppModel { * ACL models use the Tree behavior * * @var array - * @access public */ public $actsAs = array('Tree' => array('nested')); diff --git a/lib/Cake/Model/Aco.php b/lib/Cake/Model/Aco.php index baa30216b..488f3045d 100644 --- a/lib/Cake/Model/Aco.php +++ b/lib/Cake/Model/Aco.php @@ -34,7 +34,6 @@ class Aco extends AclNode { * Model name * * @var string - * @access public */ public $name = 'Aco'; @@ -42,7 +41,6 @@ class Aco extends AclNode { * Binds to ARO nodes through permissions settings * * @var array - * @access public */ public $hasAndBelongsToMany = array('Aro' => array('with' => 'Permission')); } \ No newline at end of file diff --git a/lib/Cake/Model/AcoAction.php b/lib/Cake/Model/AcoAction.php index 2133d248d..83357475e 100644 --- a/lib/Cake/Model/AcoAction.php +++ b/lib/Cake/Model/AcoAction.php @@ -34,7 +34,6 @@ class AcoAction extends AppModel { * Model name * * @var string - * @access public */ public $name = 'AcoAction'; @@ -42,7 +41,6 @@ class AcoAction extends AppModel { * ACO Actions belong to ACOs * * @var array - * @access public */ public $belongsTo = array('Aco'); } \ No newline at end of file diff --git a/lib/Cake/Model/Aro.php b/lib/Cake/Model/Aro.php index 06c23a57d..334be42d3 100644 --- a/lib/Cake/Model/Aro.php +++ b/lib/Cake/Model/Aro.php @@ -32,7 +32,6 @@ class Aro extends AclNode { * Model name * * @var string - * @access public */ public $name = 'Aro'; @@ -40,7 +39,6 @@ class Aro extends AclNode { * AROs are linked to ACOs by means of Permission * * @var array - * @access public */ public $hasAndBelongsToMany = array('Aco' => array('with' => 'Permission')); } diff --git a/lib/Cake/Model/Behavior/AclBehavior.php b/lib/Cake/Model/Behavior/AclBehavior.php index 72624fb7e..d6c8446ce 100644 --- a/lib/Cake/Model/Behavior/AclBehavior.php +++ b/lib/Cake/Model/Behavior/AclBehavior.php @@ -12,7 +12,7 @@ * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP Project * @package Cake.Model.Behavior * @since CakePHP v 1.2.0.4487 @@ -33,12 +33,13 @@ class AclBehavior extends ModelBehavior { * * @var array */ - private $__typeMaps = array('requester' => 'Aro', 'controlled' => 'Aco', 'both' => array('Aro', 'Aco')); + protected $_typeMaps = array('requester' => 'Aro', 'controlled' => 'Aco', 'both' => array('Aro', 'Aco')); /** * Sets up the configuation for the model, and loads ACL models if they haven't been already * - * @param mixed $config + * @param Model $model + * @param array $config * @return void */ public function setup($model, $config = array()) { @@ -48,7 +49,7 @@ class AclBehavior extends ModelBehavior { $this->settings[$model->name] = array_merge(array('type' => 'controlled'), (array)$config); $this->settings[$model->name]['type'] = strtolower($this->settings[$model->name]['type']); - $types = $this->__typeMaps[$this->settings[$model->name]['type']]; + $types = $this->_typeMaps[$this->settings[$model->name]['type']]; if (!is_array($types)) { $types = array($types); @@ -64,6 +65,7 @@ class AclBehavior extends ModelBehavior { /** * Retrieves the Aro/Aco node for this model * + * @param Model $model * @param mixed $ref * @param string $type Only needed when Acl is set up as 'both', specify 'Aro' or 'Aco' to get the correct node * @return array @@ -71,7 +73,7 @@ class AclBehavior extends ModelBehavior { */ public function node($model, $ref = null, $type = null) { if (empty($type)) { - $type = $this->__typeMaps[$this->settings[$model->name]['type']]; + $type = $this->_typeMaps[$this->settings[$model->name]['type']]; if (is_array($type)) { trigger_error(__d('cake_dev', 'AclBehavior is setup with more then one type, please specify type parameter for node()'), E_USER_WARNING); return null; @@ -86,11 +88,12 @@ class AclBehavior extends ModelBehavior { /** * Creates a new ARO/ACO node bound to this record * + * @param Model $model * @param boolean $created True if this is a new record * @return void */ public function afterSave($model, $created) { - $types = $this->__typeMaps[$this->settings[$model->name]['type']]; + $types = $this->_typeMaps[$this->settings[$model->name]['type']]; if (!is_array($types)) { $types = array($types); } @@ -116,10 +119,11 @@ class AclBehavior extends ModelBehavior { /** * Destroys the ARO/ACO node bound to the deleted record * + * @param Model $model * @return void */ public function afterDelete($model) { - $types = $this->__typeMaps[$this->settings[$model->name]['type']]; + $types = $this->_typeMaps[$this->settings[$model->name]['type']]; if (!is_array($types)) { $types = array($types); } diff --git a/lib/Cake/Model/Behavior/ContainableBehavior.php b/lib/Cake/Model/Behavior/ContainableBehavior.php index 4892a7d93..54bb54756 100644 --- a/lib/Cake/Model/Behavior/ContainableBehavior.php +++ b/lib/Cake/Model/Behavior/ContainableBehavior.php @@ -32,7 +32,6 @@ class ContainableBehavior extends ModelBehavior { * Types of relationships available for models * * @var array - * @access private */ public $types = array('belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany'); @@ -40,7 +39,6 @@ class ContainableBehavior extends ModelBehavior { * Runtime configuration for this behavior * * @var array - * @access private */ public $runtime = array(); @@ -58,8 +56,9 @@ class ContainableBehavior extends ModelBehavior { * - autoFields: (boolean, optional) auto-add needed fields to fetch requested * bindings. DEFAULTS TO: true * - * @param object $Model Model using the behavior + * @param Model $Model Model using the behavior * @param array $settings Settings to override for model. + * @return void */ public function setup($Model, $settings = array()) { if (!isset($this->settings[$Model->alias])) { @@ -88,7 +87,7 @@ class ContainableBehavior extends ModelBehavior { * ))); * }}} * - * @param object $Model Model using the behavior + * @param Model $Model Model using the behavior * @param array $query Query parameters as set by cake * @return array */ @@ -107,7 +106,7 @@ class ContainableBehavior extends ModelBehavior { $contain = array_merge($contain, (array)$query['contain']); } if ( - $noContain || !$contain || in_array($contain, array(null, false), true) || + $noContain || !$contain || in_array($contain, array(null, false), true) || (isset($contain[0]) && $contain[0] === null) ) { if ($noContain) { @@ -226,9 +225,10 @@ class ContainableBehavior extends ModelBehavior { * Resets original associations on models that may have receive multiple, * subsequent unbindings. * - * @param object $Model Model on which we are resetting + * @param Model $Model Model on which we are resetting * @param array $results Results of the find operation - * @param bool $primary true if this is the primary model that issued the find operation, false otherwise + * @param boolean $primary true if this is the primary model that issued the find operation, false otherwise + * @return void */ public function afterFind($Model, $results, $primary) { if (!empty($Model->__backContainableAssociation)) { @@ -243,7 +243,7 @@ class ContainableBehavior extends ModelBehavior { * Unbinds all relations from a model except the specified ones. Calling this function without * parameters unbinds all related models. * - * @param object $Model Model on which binding restriction is being applied + * @param Model $Model Model on which binding restriction is being applied * @return void * @link http://book.cakephp.org/view/1323/Containable#Using-Containable-1324 */ @@ -258,7 +258,7 @@ class ContainableBehavior extends ModelBehavior { * for restoring the bindings after using 'reset' => false as part of the * contain call. * - * @param object $Model Model on which to reset bindings + * @param Model $Model Model on which to reset bindings * @return void */ public function resetBindings($Model) { @@ -279,10 +279,10 @@ class ContainableBehavior extends ModelBehavior { /** * Process containments for model. * - * @param object $Model Model on which binding restriction is being applied + * @param Model $Model Model on which binding restriction is being applied * @param array $contain Parameters to use for restricting this model * @param array $containments Current set of containments - * @param bool $throwErrors Wether unexisting bindings show throw errors + * @param boolean $throwErrors Wether unexisting bindings show throw errors * @return array Containments */ public function containments($Model, $contain, $containments = array(), $throwErrors = null) { @@ -383,7 +383,7 @@ class ContainableBehavior extends ModelBehavior { /** * Calculate needed fields to fetch the required bindings for the given model. * - * @param object $Model Model + * @param Model $Model Model * @param array $map Map of relations for given model * @param mixed $fields If array, fields to initially load, if false use $Model as primary model * @return array Fields diff --git a/lib/Cake/Model/Behavior/TranslateBehavior.php b/lib/Cake/Model/Behavior/TranslateBehavior.php index e5eb703c3..b7193cf4b 100644 --- a/lib/Cake/Model/Behavior/TranslateBehavior.php +++ b/lib/Cake/Model/Behavior/TranslateBehavior.php @@ -352,7 +352,7 @@ class TranslateBehavior extends ModelBehavior { * name to find/use. If no translateModel property is found 'I18nModel' will be used. * * @param Model $model Model to get a translatemodel for. - * @return object + * @return Model */ public function translateModel($model) { if (!isset($this->runtime[$model->alias]['model'])) { @@ -376,10 +376,10 @@ class TranslateBehavior extends ModelBehavior { * Bind translation for fields, optionally with hasMany association for * fake field * - * @param object instance of model - * @param mixed string with field or array(field1, field2=>AssocName, field3) + * @param Model $model instance of model + * @param string|array $fields string with field or array(field1, field2=>AssocName, field3) * @param boolean $reset - * @return bool + * @return boolean */ public function bindTranslation($model, $fields, $reset = true) { if (is_string($fields)) { @@ -449,10 +449,10 @@ class TranslateBehavior extends ModelBehavior { * Unbind translation for fields, optionally unbinds hasMany association for * fake field * - * @param object $model instance of model + * @param Model $model instance of model * @param mixed $fields string with field, or array(field1, field2=>AssocName, field3), or null for * unbind all original translations - * @return bool + * @return boolean */ public function unbindTranslation($model, $fields = null) { if (empty($fields) && empty($this->settings[$model->alias])) { @@ -505,7 +505,26 @@ class TranslateBehavior extends ModelBehavior { * @package Cake.Model.Behavior */ class I18nModel extends AppModel { + +/** + * Model name + * + * @var string + */ public $name = 'I18nModel'; + +/** + * Table name + * + * @var string + */ public $useTable = 'i18n'; + +/** + * Display field + * + * @var string + */ public $displayField = 'field'; + } diff --git a/lib/Cake/Model/Behavior/TreeBehavior.php b/lib/Cake/Model/Behavior/TreeBehavior.php index e467389c7..6e0875458 100644 --- a/lib/Cake/Model/Behavior/TreeBehavior.php +++ b/lib/Cake/Model/Behavior/TreeBehavior.php @@ -12,7 +12,7 @@ * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. + * @copyright Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP Project * @package Cake.Model.Behavior * @since CakePHP v 1.2.0.4487 @@ -41,7 +41,6 @@ class TreeBehavior extends ModelBehavior { * Defaults * * @var array - * @access protected */ protected $_defaults = array( 'parent' => 'parent_id', 'left' => 'lft', 'right' => 'rght', @@ -51,7 +50,7 @@ class TreeBehavior extends ModelBehavior { /** * Initiate Tree behavior * - * @param object $Model instance of model + * @param Model $Model instance of model * @param array $config array of configuration settings. * @return void */ @@ -76,7 +75,7 @@ class TreeBehavior extends ModelBehavior { * Overriden to transparently manage setting the lft and rght fields if and only if the parent field is included in the * parameters to be saved. * - * @param AppModel $Model Model instance. + * @param Model $Model Model instance. * @param boolean $created indicates whether the node just saved was created or updated * @return boolean true on success, false on failure */ @@ -97,7 +96,8 @@ class TreeBehavior extends ModelBehavior { * * Will delete the current node and all children using the deleteAll method and sync the table * - * @param AppModel $Model Model instance + * @param Model $Model Model instance + * @param boolean $cascade * @return boolean true to continue, false to abort the delete */ public function beforeDelete($Model, $cascade = true) { @@ -117,7 +117,7 @@ class TreeBehavior extends ModelBehavior { $scope[]["{$Model->alias}.{$left} BETWEEN ? AND ?"] = array($data[$left] + 1, $data[$right] - 1); $Model->deleteAll($scope); } - $this->__sync($Model, $diff, '-', '> ' . $data[$right]); + $this->_sync($Model, $diff, '-', '> ' . $data[$right]); return true; } @@ -129,7 +129,7 @@ class TreeBehavior extends ModelBehavior { * this method bypassing the setParent logic. * * @since 1.2 - * @param AppModel $Model Model instance + * @param Model $Model Model instance * @return boolean true to continue, false to abort the save */ public function beforeSave($Model) { @@ -149,7 +149,7 @@ class TreeBehavior extends ModelBehavior { $Model->data[$Model->alias][$left] = 0; //$parentNode[$right]; $Model->data[$Model->alias][$right] = 0; //$parentNode[$right] + 1; } else { - $edge = $this->__getMax($Model, $scope, $right, $recursive); + $edge = $this->_getMax($Model, $scope, $right, $recursive); $Model->data[$Model->alias][$left] = $edge + 1; $Model->data[$Model->alias][$right] = $edge + 2; } @@ -196,7 +196,7 @@ class TreeBehavior extends ModelBehavior { * If the direct parameter is set to true, only the direct children are counted (based upon the parent_id field) * If false is passed for the id parameter, all top level nodes are counted, or all nodes are counted. * - * @param AppModel $Model Model instance + * @param Model $Model Model instance * @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 * @return integer number of child nodes @@ -237,7 +237,7 @@ class TreeBehavior extends ModelBehavior { * If the direct parameter is set to true, only the direct children are returned (based upon the parent_id field) * If false is passed for the id parameter, top level, or all (depending on direct parameter appropriate) are counted. * - * @param AppModel $Model Model instance + * @param Model $Model Model instance * @param mixed $id The ID of the record to read * @param boolean $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 @@ -296,7 +296,7 @@ class TreeBehavior extends ModelBehavior { /** * A convenience method for returning a hierarchical array used for HTML select boxes * - * @param AppModel $Model Model instance + * @param Model $Model Model instance * @param mixed $conditions SQL conditions as a string or as an array('field' =>'value',...) * @param string $keyPath A string path to the key, i.e. "{n}.Post.id" * @param string $valuePath A string path to the value, i.e. "{n}.Post.title" @@ -354,10 +354,11 @@ class TreeBehavior extends ModelBehavior { * * reads the parent id and returns this node * - * @param AppModel $Model Model instance + * @param Model $Model Model instance * @param mixed $id The ID of the record to read + * @param string|array $fields * @param integer $recursive The number of levels deep to fetch associated records - * @return array Array of data for the parent node + * @return array|boolean Array of data for the parent node * @link http://book.cakephp.org/view/1349/getparentnode */ public function getParentNode($Model, $id = null, $fields = null, $recursive = null) { @@ -386,7 +387,7 @@ class TreeBehavior extends ModelBehavior { /** * Get the path to the given node * - * @param AppModel $Model Model instance + * @param Model $Model Model instance * @param mixed $id The ID of the record to read * @param mixed $fields Either a single string of a field name, or an array of field names * @param integer $recursive The number of levels deep to fetch associated records @@ -424,9 +425,9 @@ class TreeBehavior extends ModelBehavior { * * If the node is the last child, or is a top level node with no subsequent node this method will return false * - * @param AppModel $Model Model instance + * @param Model $Model Model instance * @param mixed $id The ID of the record to move - * @param int|bool $number how many places to move the node or true to move to last position + * @param integer|boolean $number how many places to move the node or true to move to last position * @return boolean true on success, false on failure * @link http://book.cakephp.org/view/1352/moveDown */ @@ -463,10 +464,10 @@ class TreeBehavior extends ModelBehavior { } else { return false; } - $edge = $this->__getMax($Model, $scope, $right, $recursive); - $this->__sync($Model, $edge - $node[$left] + 1, '+', 'BETWEEN ' . $node[$left] . ' AND ' . $node[$right]); - $this->__sync($Model, $nextNode[$left] - $node[$left], '-', 'BETWEEN ' . $nextNode[$left] . ' AND ' . $nextNode[$right]); - $this->__sync($Model, $edge - $node[$left] - ($nextNode[$right] - $nextNode[$left]), '-', '> ' . $edge); + $edge = $this->_getMax($Model, $scope, $right, $recursive); + $this->_sync($Model, $edge - $node[$left] + 1, '+', 'BETWEEN ' . $node[$left] . ' AND ' . $node[$right]); + $this->_sync($Model, $nextNode[$left] - $node[$left], '-', 'BETWEEN ' . $nextNode[$left] . ' AND ' . $nextNode[$right]); + $this->_sync($Model, $edge - $node[$left] - ($nextNode[$right] - $nextNode[$left]), '-', '> ' . $edge); if (is_int($number)) { $number--; @@ -482,9 +483,9 @@ class TreeBehavior extends ModelBehavior { * * If the node is the first child, or is a top level node with no previous node this method will return false * - * @param AppModel $Model Model instance + * @param Model $Model Model instance * @param mixed $id The ID of the record to move - * @param int|bool $number how many places to move the node, or true to move to first position + * @param integer|boolean $number how many places to move the node, or true to move to first position * @return boolean true on success, false on failure * @link http://book.cakephp.org/view/1353/moveUp */ @@ -523,10 +524,10 @@ class TreeBehavior extends ModelBehavior { } else { return false; } - $edge = $this->__getMax($Model, $scope, $right, $recursive); - $this->__sync($Model, $edge - $previousNode[$left] +1, '+', 'BETWEEN ' . $previousNode[$left] . ' AND ' . $previousNode[$right]); - $this->__sync($Model, $node[$left] - $previousNode[$left], '-', 'BETWEEN ' .$node[$left] . ' AND ' . $node[$right]); - $this->__sync($Model, $edge - $previousNode[$left] - ($node[$right] - $node[$left]), '-', '> ' . $edge); + $edge = $this->_getMax($Model, $scope, $right, $recursive); + $this->_sync($Model, $edge - $previousNode[$left] +1, '+', 'BETWEEN ' . $previousNode[$left] . ' AND ' . $previousNode[$right]); + $this->_sync($Model, $node[$left] - $previousNode[$left], '-', 'BETWEEN ' .$node[$left] . ' AND ' . $node[$right]); + $this->_sync($Model, $edge - $previousNode[$left] - ($node[$right] - $node[$left]), '-', '> ' . $edge); if (is_int($number)) { $number--; } @@ -545,7 +546,7 @@ class TreeBehavior extends ModelBehavior { * parameter only applies to "parent" mode and determines what to do if the parent field contains an id that is not present. * * @todo Could be written to be faster, *maybe*. Ideally using a subquery and putting all the logic burden on the DB. - * @param AppModel $Model Model instance + * @param Model $Model Model instance * @param string $mode parent or tree * @param mixed $missingParentAction 'return' to do nothing and return, 'delete' to * delete, or the id of the parent to set as the parent_id @@ -626,7 +627,7 @@ class TreeBehavior extends ModelBehavior { * - 'order' Direction to order either DESC or ASC (defaults to ASC) * - 'verify' Whether or not to verify the tree before reorder. defaults to true. * - * @param AppModel $Model Model instance + * @param Model $Model Model instance * @param array $options array of options to use in reordering. * @return boolean true on success, false on failure * @link http://book.cakephp.org/view/1355/reorder @@ -665,7 +666,7 @@ class TreeBehavior extends ModelBehavior { * If the parameter delete is false, the node will become a new top level node. Otherwise the node will be deleted * after the children are reparented. * - * @param AppModel $Model Model instance + * @param Model $Model Model instance * @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 @@ -705,8 +706,8 @@ class TreeBehavior extends ModelBehavior { array($parent => $db->value($node[$parent], $parent)), array($Model->escapeField($parent) => $node[$Model->primaryKey]) ); - $this->__sync($Model, 1, '-', 'BETWEEN ' . ($node[$left] + 1) . ' AND ' . ($node[$right] - 1)); - $this->__sync($Model, 2, '-', '> ' . ($node[$right])); + $this->_sync($Model, 1, '-', 'BETWEEN ' . ($node[$left] + 1) . ' AND ' . ($node[$right] - 1)); + $this->_sync($Model, 2, '-', '> ' . ($node[$right])); $Model->id = $id; if ($delete) { @@ -720,7 +721,7 @@ class TreeBehavior extends ModelBehavior { ); return $Model->delete($id); } else { - $edge = $this->__getMax($Model, $scope, $right, $recursive); + $edge = $this->_getMax($Model, $scope, $right, $recursive); if ($node[$right] == $edge) { $edge = $edge - 2; } @@ -737,7 +738,7 @@ class TreeBehavior extends ModelBehavior { * * Returns true if the tree is valid otherwise an array of (type, incorrect left/right index, message) * - * @param AppModel $Model Model instance + * @param Model $Model Model instance * @return mixed true if the tree is valid or empty, otherwise an array of (error type [index, node], * [incorrect left/right index,node id], message) * @link http://book.cakephp.org/view/1630/Verify @@ -747,8 +748,8 @@ class TreeBehavior extends ModelBehavior { if (!$Model->find('count', array('conditions' => $scope))) { return true; } - $min = $this->__getMin($Model, $scope, $left, $recursive); - $edge = $this->__getMax($Model, $scope, $right, $recursive); + $min = $this->_getMin($Model, $scope, $left, $recursive); + $edge = $this->_getMax($Model, $scope, $right, $recursive); $errors = array(); for ($i = $min; $i <= $edge; $i++) { @@ -809,8 +810,9 @@ class TreeBehavior extends ModelBehavior { * of recovering a corrupted table, or creating new nodes. Otherwise it should always be false. In reality this * method could be private, since calling save with parent_id set also calls setParent * - * @param AppModel $Model Model instance + * @param Model $Model Model instance * @param mixed $parentId + * @param boolean $created * @return boolean true on success, false on failure */ protected function _setParent($Model, $parentId = null, $created = false) { @@ -820,11 +822,11 @@ class TreeBehavior extends ModelBehavior { 'fields' => array($Model->primaryKey, $parent, $left, $right), 'recursive' => $recursive ))); - $edge = $this->__getMax($Model, $scope, $right, $recursive, $created); + $edge = $this->_getMax($Model, $scope, $right, $recursive, $created); if (empty ($parentId)) { - $this->__sync($Model, $edge - $node[$left] + 1, '+', 'BETWEEN ' . $node[$left] . ' AND ' . $node[$right], $created); - $this->__sync($Model, $node[$right] - $node[$left] + 1, '-', '> ' . $node[$left], $created); + $this->_sync($Model, $edge - $node[$left] + 1, '+', 'BETWEEN ' . $node[$left] . ' AND ' . $node[$right], $created); + $this->_sync($Model, $node[$right] - $node[$left] + 1, '-', '> ' . $node[$left], $created); } else { $values = $Model->find('first', array( 'conditions' => array($scope, $Model->escapeField() => $parentId), @@ -849,27 +851,27 @@ class TreeBehavior extends ModelBehavior { return false; } if (empty ($node[$left]) && empty ($node[$right])) { - $this->__sync($Model, 2, '+', '>= ' . $parentNode[$right], $created); + $this->_sync($Model, 2, '+', '>= ' . $parentNode[$right], $created); $result = $Model->save( array($left => $parentNode[$right], $right => $parentNode[$right] + 1, $parent => $parentId), array('validate' => false, 'callbacks' => false) ); $Model->data = $result; } else { - $this->__sync($Model, $edge - $node[$left] +1, '+', 'BETWEEN ' . $node[$left] . ' AND ' . $node[$right], $created); + $this->_sync($Model, $edge - $node[$left] +1, '+', 'BETWEEN ' . $node[$left] . ' AND ' . $node[$right], $created); $diff = $node[$right] - $node[$left] + 1; if ($node[$left] > $parentNode[$left]) { if ($node[$right] < $parentNode[$right]) { - $this->__sync($Model, $diff, '-', 'BETWEEN ' . $node[$right] . ' AND ' . ($parentNode[$right] - 1), $created); - $this->__sync($Model, $edge - $parentNode[$right] + $diff + 1, '-', '> ' . $edge, $created); + $this->_sync($Model, $diff, '-', 'BETWEEN ' . $node[$right] . ' AND ' . ($parentNode[$right] - 1), $created); + $this->_sync($Model, $edge - $parentNode[$right] + $diff + 1, '-', '> ' . $edge, $created); } else { - $this->__sync($Model, $diff, '+', 'BETWEEN ' . $parentNode[$right] . ' AND ' . $node[$right], $created); - $this->__sync($Model, $edge - $parentNode[$right] + 1, '-', '> ' . $edge, $created); + $this->_sync($Model, $diff, '+', 'BETWEEN ' . $parentNode[$right] . ' AND ' . $node[$right], $created); + $this->_sync($Model, $edge - $parentNode[$right] + 1, '-', '> ' . $edge, $created); } } else { - $this->__sync($Model, $diff, '-', 'BETWEEN ' . $node[$right] . ' AND ' . ($parentNode[$right] - 1), $created); - $this->__sync($Model, $edge - $parentNode[$right] + $diff + 1, '-', '> ' . $edge, $created); + $this->_sync($Model, $diff, '-', 'BETWEEN ' . $node[$right] . ' AND ' . ($parentNode[$right] - 1), $created); + $this->_sync($Model, $edge - $parentNode[$right] + $diff + 1, '-', '> ' . $edge, $created); } } } @@ -879,13 +881,14 @@ class TreeBehavior extends ModelBehavior { /** * get the maximum index value in the table. * - * @param AppModel $Model + * @param Model $Model * @param string $scope * @param string $right - * @return int - * @access private + * @param integer $recursive + * @param boolean $created + * @return integer */ - private function __getMax($Model, $scope, $right, $recursive = -1, $created = false) { + protected function _getMax($Model, $scope, $right, $recursive = -1, $created = false) { $db = ConnectionManager::getDataSource($Model->useDbConfig); if ($created) { if (is_string($scope)) { @@ -907,13 +910,13 @@ class TreeBehavior extends ModelBehavior { /** * get the minimum index value in the table. * - * @param AppModel $Model + * @param Model $Model * @param string $scope - * @param string $right - * @return int - * @access private + * @param string $left + * @param integer $recursive + * @return integer */ - private function __getMin($Model, $scope, $left, $recursive = -1) { + protected function _getMin($Model, $scope, $left, $recursive = -1) { $db = ConnectionManager::getDataSource($Model->useDbConfig); $name = $Model->alias . '.' . $left; list($edge) = array_values($Model->find('first', array( @@ -929,20 +932,21 @@ class TreeBehavior extends ModelBehavior { * * Handles table sync operations, Taking account of the behavior scope. * - * @param AppModel $Model + * @param Model $Model * @param integer $shift - * @param string $direction + * @param string $dir * @param array $conditions + * @param boolean $created * @param string $field - * @access private + * @return void */ - private function __sync($Model, $shift, $dir = '+', $conditions = array(), $created = false, $field = 'both') { + protected function _sync($Model, $shift, $dir = '+', $conditions = array(), $created = false, $field = 'both') { $ModelRecursive = $Model->recursive; extract($this->settings[$Model->alias]); $Model->recursive = $recursive; if ($field == 'both') { - $this->__sync($Model, $shift, $dir, $conditions, $created, $left); + $this->_sync($Model, $shift, $dir, $conditions, $created, $left); $field = $right; } if (is_string($conditions)) { diff --git a/lib/Cake/Model/BehaviorCollection.php b/lib/Cake/Model/BehaviorCollection.php index f051fee04..086fba3d7 100644 --- a/lib/Cake/Model/BehaviorCollection.php +++ b/lib/Cake/Model/BehaviorCollection.php @@ -34,7 +34,6 @@ class BehaviorCollection extends ObjectCollection { * Stores a reference to the attached name * * @var string - * @access public */ public $modelName = null; @@ -56,7 +55,8 @@ class BehaviorCollection extends ObjectCollection { * Attaches a model object and loads a list of behaviors * * @todo Make this method a constructor instead.. - * @access public + * @param string $modelName + * @param array $behaviors * @return void */ public function init($modelName, $behaviors = array()) { @@ -72,6 +72,8 @@ class BehaviorCollection extends ObjectCollection { /** * Backwards compatible alias for load() * + * @param string $behavior + * @param array $config * @return void * @deprecated Replaced with load() */ diff --git a/lib/Cake/Model/CakeSchema.php b/lib/Cake/Model/CakeSchema.php index 0a2b7978d..4ede14683 100644 --- a/lib/Cake/Model/CakeSchema.php +++ b/lib/Cake/Model/CakeSchema.php @@ -31,7 +31,6 @@ class CakeSchema extends Object { * Name of the schema * * @var string - * @access public */ public $name = null; @@ -39,7 +38,6 @@ class CakeSchema extends Object { * Path to write location * * @var string - * @access public */ public $path = null; @@ -47,7 +45,6 @@ class CakeSchema extends Object { * File to write * * @var string - * @access public */ public $file = 'schema.php'; @@ -55,7 +52,6 @@ class CakeSchema extends Object { * Connection used for read * * @var string - * @access public */ public $connection = 'default'; @@ -70,7 +66,6 @@ class CakeSchema extends Object { * Set of tables * * @var array - * @access public */ public $tables = array(); @@ -135,7 +130,7 @@ class CakeSchema extends Object { /** * Before callback to be implemented in subclasses * - * @param array $events schema object properties + * @param array $event schema object properties * @return boolean Should process continue */ public function before($event = array()) { @@ -145,7 +140,8 @@ class CakeSchema extends Object { /** * After callback to be implemented in subclasses * - * @param array $events schema object properties + * @param array $event schema object properties + * @return void */ public function after($event = array()) { } @@ -263,7 +259,7 @@ class CakeSchema extends Object { if (in_array($fulltable, $currentTables)) { $key = array_search($fulltable, $currentTables); if (empty($tables[$table])) { - $tables[$table] = $this->__columns($Object); + $tables[$table] = $this->_columns($Object); $tables[$table]['indexes'] = $db->index($Object); $tables[$table]['tableParameters'] = $db->readTableParameters($fulltable); unset($currentTables[$key]); @@ -281,8 +277,8 @@ class CakeSchema extends Object { if (in_array($withTable, $currentTables)) { $key = array_search($withTable, $currentTables); $noPrefixWith = $this->_noPrefixTable($prefix, $withTable); - - $tables[$noPrefixWith] = $this->__columns($Object->$class); + + $tables[$noPrefixWith] = $this->_columns($Object->$class); $tables[$noPrefixWith]['indexes'] = $db->index($Object->$class); $tables[$noPrefixWith]['tableParameters'] = $db->readTableParameters($withTable); unset($currentTables[$key]); @@ -311,15 +307,15 @@ class CakeSchema extends Object { 'aros', 'acos', 'aros_acos', Configure::read('Session.table'), 'i18n' ); if (in_array($table, $systemTables)) { - $tables[$Object->table] = $this->__columns($Object); + $tables[$Object->table] = $this->_columns($Object); $tables[$Object->table]['indexes'] = $db->index($Object); $tables[$Object->table]['tableParameters'] = $db->readTableParameters($table); } elseif ($models === false) { - $tables[$table] = $this->__columns($Object); + $tables[$table] = $this->_columns($Object); $tables[$table]['indexes'] = $db->index($Object); $tables[$table]['tableParameters'] = $db->readTableParameters($table); } else { - $tables['missing'][$table] = $this->__columns($Object); + $tables['missing'][$table] = $this->_columns($Object); $tables['missing'][$table]['indexes'] = $db->index($Object); $tables['missing'][$table]['tableParameters'] = $db->readTableParameters($table); } @@ -407,12 +403,12 @@ class CakeSchema extends Object { } $col = "\t\t'{$field}' => array('type' => '" . $value['type'] . "', "; unset($value['type']); - $col .= join(', ', $this->__values($value)); + $col .= join(', ', $this->_values($value)); } elseif ($field == 'indexes') { $col = "\t\t'indexes' => array("; $props = array(); foreach ((array)$value as $key => $index) { - $props[] = "'{$key}' => array(" . join(', ', $this->__values($index)) . ")"; + $props[] = "'{$key}' => array(" . join(', ', $this->_values($index)) . ")"; } $col .= join(', ', $props); } elseif ($field == 'tableParameters') { @@ -531,7 +527,6 @@ class CakeSchema extends Object { * @param array $array2 Corresponding array checked for equality * @return array Difference as array with array(keys => values) from input array * where match was not found. - * @access protected */ protected function _arrayDiffAssoc($array1, $array2) { $difference = array(); @@ -565,7 +560,7 @@ class CakeSchema extends Object { * @param array $values options keys(type, null, default, key, length, extra) * @return array Formatted values */ - public function __values($values) { + protected function _values($values) { $vals = array(); if (is_array($values)) { foreach ($values as $key => $val) { @@ -586,7 +581,7 @@ class CakeSchema extends Object { * @param array $Obj model object * @return array Formatted columns */ - public function __columns(&$Obj) { + protected function _columns(&$Obj) { $db = $Obj->getDataSource(); $fields = $Obj->schema(true); @@ -696,7 +691,7 @@ class CakeSchema extends Object { * @param string $table Full table name * @return string Prefix-less table name */ - function _noPrefixTable($prefix, $table) { + protected function _noPrefixTable($prefix, $table) { return preg_replace('/^' . preg_quote($prefix) . '/', '', $table); } } diff --git a/lib/Cake/Model/ConnectionManager.php b/lib/Cake/Model/ConnectionManager.php index 0cd6eb1f3..8e5ef8d70 100644 --- a/lib/Cake/Model/ConnectionManager.php +++ b/lib/Cake/Model/ConnectionManager.php @@ -32,7 +32,6 @@ class ConnectionManager { * Holds a loaded instance of the Connections object * * @var DATABASE_CONFIG - * @access public */ public static $config = null; @@ -40,7 +39,6 @@ class ConnectionManager { * Holds instances DataSource objects * * @var array - * @access protected */ protected static $_dataSources = array(); @@ -48,7 +46,6 @@ class ConnectionManager { * Contains a list of all file and class names used in Connection settings * * @var array - * @access protected */ protected static $_connectionsEnum = array(); @@ -57,13 +54,14 @@ class ConnectionManager { * * @var boolean */ - private static $_init = false; + protected static $_init = false; /** * Loads connections configuration. * + * @return void */ - private static function init() { + protected static function _init() { include_once APP . 'Config' . DS . 'database.php'; if (class_exists('DATABASE_CONFIG')) { self::$config = new DATABASE_CONFIG(); @@ -76,13 +74,13 @@ class ConnectionManager { * Gets a reference to a DataSource object * * @param string $name The name of the DataSource, as defined in app/Config/database.php - * @return object Instance + * @return DataSource Instance * @throws MissingDatasourceConfigException * @throws MissingDatasourceFileException */ public static function getDataSource($name) { if (empty(self::$_init)) { - self::init(); + self::_init(); } if (!empty(self::$_dataSources[$name])) { @@ -113,7 +111,7 @@ class ConnectionManager { */ public static function sourceList() { if (empty(self::$_init)) { - self::init(); + self::_init(); } return array_keys(self::$_dataSources); } @@ -121,13 +119,13 @@ class ConnectionManager { /** * Gets a DataSource name from an object reference. * - * @param object $source DataSource object + * @param DataSource $source DataSource object * @return string Datasource name, or null if source is not present * in the ConnectionManager. */ public static function getSourceName($source) { if (empty(self::$_init)) { - self::init(); + self::_init(); } foreach (self::$_dataSources as $name => $ds) { if ($ds === $source) { @@ -148,7 +146,7 @@ class ConnectionManager { */ public static function loadDataSource($connName) { if (empty(self::$_init)) { - self::init(); + self::_init(); } if (is_array($connName)) { @@ -184,7 +182,7 @@ class ConnectionManager { */ public static function enumConnectionObjects() { if (empty(self::$_init)) { - self::init(); + self::_init(); } return (array) self::$config; } @@ -194,11 +192,11 @@ class ConnectionManager { * * @param string $name The DataSource name * @param array $config The DataSource configuration settings - * @return object A reference to the DataSource object, or null if creation failed + * @return DataSource A reference to the DataSource object, or null if creation failed */ public static function create($name = '', $config = array()) { if (empty(self::$_init)) { - self::init(); + self::_init(); } if (empty($name) || empty($config) || array_key_exists($name, self::$_connectionsEnum)) { @@ -218,7 +216,7 @@ class ConnectionManager { */ public static function drop($name) { if (empty(self::$_init)) { - self::init(); + self::_init(); } if (!isset(self::$config->{$name})) { @@ -231,7 +229,9 @@ class ConnectionManager { /** * Gets a list of class and file names associated with the user-defined DataSource connections * + * @param string $name Connection name * @return void + * @throws MissingDatasourceConfigException */ protected static function _getConnectionObject($name) { if (!empty(self::$config->{$name})) { @@ -244,9 +244,10 @@ class ConnectionManager { /** * Returns the file, class name, and parent for the given driver. * + * @param array $config Array with connection configuration. Key 'datasource' is required * @return array An indexed array with: filename, classname, plugin and parent */ - private static function _connectionData($config) { + protected static function _connectionData($config) { $package = $classname = $plugin = null; list($plugin, $classname) = pluginSplit($config['datasource']); @@ -260,6 +261,7 @@ class ConnectionManager { /** * Destructor. * + * @return void */ public static function shutdown() { if (Configure::read('Session.defaults') == 'database' && function_exists('session_write_close')) { diff --git a/lib/Cake/Model/Datasource/CakeSession.php b/lib/Cake/Model/Datasource/CakeSession.php index 5807e4a41..b8641c335 100644 --- a/lib/Cake/Model/Datasource/CakeSession.php +++ b/lib/Cake/Model/Datasource/CakeSession.php @@ -133,6 +133,7 @@ class CakeSession { * * @param string $base The base path for the Session * @param boolean $start Should session be started right now + * @return void */ public static function init($base = null, $start = true) { self::$time = time(); @@ -229,7 +230,7 @@ class CakeSession { /** * Returns the Session id * - * @param id $name string + * @param string $id * @return string Session id */ public static function id($id = null) { @@ -251,10 +252,10 @@ class CakeSession { */ public static function delete($name) { if (self::check($name)) { - self::__overwrite($_SESSION, Set::remove($_SESSION, $name)); + self::_overwrite($_SESSION, Set::remove($_SESSION, $name)); return (self::check($name) == false); } - self::__setError(2, __d('cake_dev', "%s doesn't exist", $name)); + self::_setError(2, __d('cake_dev', "%s doesn't exist", $name)); return false; } @@ -263,9 +264,9 @@ class CakeSession { * * @param array $old Set of old variables => values * @param array $new New set of variable => value - * @access private + * @return void */ - private static function __overwrite(&$old, $new) { + protected static function _overwrite(&$old, $new) { if (!empty($old)) { foreach ($old as $key => $var) { if (!isset($new[$key])) { @@ -283,9 +284,8 @@ class CakeSession { * * @param integer $errorNumber Error to set * @return string Error as string - * @access private */ - private static function __error($errorNumber) { + protected static function _error($errorNumber) { if (!is_array(self::$error) || !array_key_exists($errorNumber, self::$error)) { return false; } else { @@ -300,7 +300,7 @@ class CakeSession { */ public static function error() { if (self::$lastError) { - return self::__error(self::$lastError); + return self::_error(self::$lastError); } return false; } @@ -316,7 +316,7 @@ class CakeSession { self::$valid = true; } else { self::$valid = false; - self::__setError(1, 'Session Highjacking Attempted !!!'); + self::_setError(1, 'Session Highjacking Attempted !!!'); } } return self::$valid; @@ -325,7 +325,7 @@ class CakeSession { /** * Tests that the user agent is valid and that the session hasn't 'timed out'. * Since timeouts are implemented in CakeSession it checks the current self::$time - * against the time the session is set to expire. The User agent is only checked + * against the time the session is set to expire. The User agent is only checked * if Session.checkAgent == true. * * @return boolean @@ -363,7 +363,7 @@ class CakeSession { return false; } if (is_null($name)) { - return self::__returnSessionVars(); + return self::_returnSessionVars(); } if (empty($name)) { return false; @@ -373,7 +373,7 @@ class CakeSession { if (!is_null($result)) { return $result; } - self::__setError(2, "$name doesn't exist"); + self::_setError(2, "$name doesn't exist"); return null; } @@ -382,11 +382,11 @@ class CakeSession { * * @return mixed Full $_SESSION array, or false on error. */ - private static function __returnSessionVars() { + protected static function _returnSessionVars() { if (!empty($_SESSION)) { return $_SESSION; } - self::__setError(2, 'No Session vars set'); + self::_setError(2, 'No Session vars set'); return false; } @@ -409,7 +409,7 @@ class CakeSession { $write = array($name => $value); } foreach ($write as $key => $val) { - self::__overwrite($_SESSION, Set::insert($_SESSION, $key, $val)); + self::_overwrite($_SESSION, Set::insert($_SESSION, $key, $val)); if (Set::classicExtract($_SESSION, $key) !== $val) { return false; } @@ -508,7 +508,9 @@ class CakeSession { /** * Find the handler class and make sure it implements the correct interface. * + * @param string $handler * @return void + * @throws CakeSessionException */ protected static function _getHandler($handler) { list($plugin, $class) = pluginSplit($handler, true); @@ -526,7 +528,8 @@ class CakeSession { /** * Get one of the prebaked default session configurations. * - * @return void + * @param string $name + * @return boolean|array */ protected static function _defaultConfig($name) { $defaults = array( @@ -647,7 +650,7 @@ class CakeSession { } else { self::destroy(); self::$valid = false; - self::__setError(1, 'Session Highjacking Attempted !!!'); + self::_setError(1, 'Session Highjacking Attempted !!!'); } } else { self::write('Config.userAgent', self::$_userAgent); @@ -677,9 +680,8 @@ class CakeSession { * @param integer $errorNumber Number of the error * @param string $errorMessage Description of the error * @return void - * @access private */ - private static function __setError($errorNumber, $errorMessage) { + protected static function _setError($errorNumber, $errorMessage) { if (self::$error === false) { self::$error = array(); } diff --git a/lib/Cake/Model/Datasource/DataSource.php b/lib/Cake/Model/Datasource/DataSource.php index c0f797a2d..074ec5d3a 100644 --- a/lib/Cake/Model/Datasource/DataSource.php +++ b/lib/Cake/Model/Datasource/DataSource.php @@ -28,7 +28,6 @@ class DataSource extends Object { * Are we connected to the DataSource? * * @var boolean - * @access public */ public $connected = false; @@ -36,7 +35,6 @@ class DataSource extends Object { * The default configuration of a specific DataSource * * @var array - * @access protected */ protected $_baseConfig = array(); @@ -44,15 +42,13 @@ class DataSource extends Object { * Holds references to descriptions loaded by the DataSource * * @var array - * @access private */ - private $__descriptions = array(); + protected $_descriptions = array(); /** * Holds a list of sources (tables) contained in the DataSource * * @var array - * @access protected */ protected $_sources = null; @@ -60,7 +56,6 @@ class DataSource extends Object { * The DataSource configuration * * @var array - * @access public */ public $config = array(); @@ -68,7 +63,6 @@ class DataSource extends Object { * Whether or not this DataSource is in the middle of a transaction * * @var boolean - * @access protected */ protected $_transactionStarted = false; @@ -77,7 +71,6 @@ class DataSource extends Object { * should be cached * * @var boolean - * @access public */ public $cacheSources = true; @@ -85,7 +78,6 @@ class DataSource extends Object { * Constructor. * * @param array $config Array of configuration information for the datasource. - * @return void. */ public function __construct($config = array()) { parent::__construct(); @@ -131,13 +123,13 @@ class DataSource extends Object { } $table = $model->tablePrefix . $model->table; - if (isset($this->__descriptions[$table])) { - return $this->__descriptions[$table]; + if (isset($this->_descriptions[$table])) { + return $this->_descriptions[$table]; } - $cache = $this->__cacheDescription($table); + $cache = $this->_cacheDescription($table); if ($cache !== null) { - $this->__descriptions[$table] =& $cache; + $this->_descriptions[$table] =& $cache; return $cache; } return null; @@ -228,6 +220,7 @@ class DataSource extends Object { * * @param Model $model The model class having record(s) deleted * @param mixed $id Primary key of the model + * @return void */ public function delete(Model $model, $id = null) { if ($id == null) { @@ -238,7 +231,7 @@ class DataSource extends Object { /** * Returns the ID generated from the previous INSERT operation. * - * @param unknown_type $source + * @param mixed $source * @return mixed Last ID key generated in previous INSERT */ public function lastInsertId($source = null) { @@ -248,7 +241,7 @@ class DataSource extends Object { /** * Returns the number of rows returned by last operation. * - * @param unknown_type $source + * @param mixed $source * @return integer Number of rows returned by last operation */ public function lastNumRows($source = null) { @@ -258,7 +251,7 @@ class DataSource extends Object { /** * Returns the number of rows affected by last query. * - * @param unknown_type $source + * @param mixed $source * @return integer Number of rows affected by last query. */ public function lastAffected($source = null) { @@ -293,15 +286,14 @@ 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 mixed - * @access private */ - function __cacheDescription($object, $data = null) { + protected function _cacheDescription($object, $data = null) { if ($this->cacheSources === false) { return null; } if ($data !== null) { - $this->__descriptions[$object] =& $data; + $this->_descriptions[$object] =& $data; } $key = ConnectionManager::getSourceName($this) . '_' . $object; @@ -321,12 +313,11 @@ class DataSource extends Object { * @param string $query Query string needing replacements done. * @param array $data Array of data with values that will be inserted in placeholders. * @param string $association Name of association model being replaced - * @param unknown_type $assocData + * @param array $assocData * @param Model $model Instance of the model to replace $__cakeID__$ * @param Model $linkModel Instance of model to replace $__cakeForeignKey__$ * @param array $stack * @return string String of query data with placeholders replaced. - * @access public * @todo Remove and refactor $assocData, ensure uses of the method have the param removed too. */ public function insertQueryData($query, $data, $association, $assocData, Model $model, Model $linkModel, $stack) { @@ -416,7 +407,6 @@ class DataSource extends Object { /** * Closes the current datasource. * - * @return void */ public function __destruct() { if ($this->_transactionStarted) { diff --git a/lib/Cake/Model/Datasource/Database/Mysql.php b/lib/Cake/Model/Datasource/Database/Mysql.php index 87325a504..03c9cd066 100644 --- a/lib/Cake/Model/Datasource/Database/Mysql.php +++ b/lib/Cake/Model/Datasource/Database/Mysql.php @@ -74,7 +74,6 @@ class Mysql extends DboSource { * use alias for update and delete. Set to true if version >= 4.1 * * @var boolean - * @access protected */ protected $_useAlias = true; @@ -82,7 +81,6 @@ class Mysql extends DboSource { * Index of basic SQL commands * * @var array - * @access protected */ protected $_commands = array( 'begin' => 'START TRANSACTION', @@ -94,7 +92,6 @@ class Mysql extends DboSource { * List of engine specific additional field parameters used on table creating * * @var array - * @access public */ public $fieldParameters = array( 'charset' => array('value' => 'CHARACTER SET', 'quote' => false, 'join' => ' ', 'column' => false, 'position' => 'beforeDefault'), @@ -106,7 +103,6 @@ class Mysql extends DboSource { * List of table engine specific parameters used on table creating * * @var array - * @access public */ public $tableParameters = array( 'charset' => array('value' => 'DEFAULT CHARSET', 'quote' => false, 'join' => '=', 'column' => 'charset'), @@ -137,6 +133,7 @@ class Mysql extends DboSource { * Connects to the database using options in the given configuration array. * * @return boolean True if the database could be connected, else false + * @throws MissingConnectionException */ public function connect() { $config = $this->config; @@ -177,6 +174,7 @@ class Mysql extends DboSource { /** * Returns an array of sources (tables) in the database. * + * @param mixed $data * @return array Array of tablenames in the database */ public function listSources($data = null) { @@ -206,6 +204,7 @@ class Mysql extends DboSource { * Builds a map of the columns contained in a result * * @param PDOStatement $results + * @return void */ public function resultSet($results) { $this->map = array(); @@ -287,10 +286,11 @@ class Mysql extends DboSource { /** * Returns an array of the fields in given table name. * - * @param mixed $tableName Name of database table to inspect or model instance + * @param Model $model Name of database table to inspect or model instance * @return array Fields in table. Keys are name and type + * @throws CakeException */ - public function describe($model) { + public function describe(Model $model) { $cache = parent::describe($model); if ($cache != null) { return $cache; @@ -323,7 +323,7 @@ class Mysql extends DboSource { } } } - $this->__cacheDescription($this->fullTableName($model, false), $fields); + $this->_cacheDescription($this->fullTableName($model, false), $fields); $cols->closeCursor(); return $fields; } @@ -337,7 +337,7 @@ class Mysql extends DboSource { * @param mixed $conditions * @return array */ - public function update($model, $fields = array(), $values = null, $conditions = null) { + public function update(Model $model, $fields = array(), $values = null, $conditions = null) { if (!$this->_useAlias) { return parent::update($model, $fields, $values, $conditions); } @@ -379,7 +379,7 @@ class Mysql extends DboSource { * @param mixed $conditions * @return boolean Success */ - public function delete($model, $conditions = null) { + public function delete(Model $model, $conditions = null) { if (!$this->_useAlias) { return parent::delete($model, $conditions); } @@ -416,6 +416,7 @@ class Mysql extends DboSource { * Sets the database encoding * * @param string $enc Database encoding + * @return boolean */ public function setEncoding($enc) { return $this->_execute('SET NAMES ' . $enc) !== false; @@ -458,6 +459,7 @@ class Mysql extends DboSource { * Generate a MySQL Alter Table syntax for the given Schema comparison * * @param array $compare Result of a CakeSchema::compare() + * @param string $table * @return array Array of alter statements to make. */ public function alterSchema($compare, $table = null) { @@ -551,7 +553,7 @@ class Mysql extends DboSource { * Generate MySQL index alteration statements for a table. * * @param string $table Table to alter indexes for - * @param array $new Indexes to add and drop + * @param array $indexes Indexes to add and drop * @return array Index alteration statements */ protected function _alterIndexes($table, $indexes) { diff --git a/lib/Cake/Model/Datasource/Database/Oracle.php b/lib/Cake/Model/Datasource/Database/Oracle.php index c07bbbdb9..2cd43ff1f 100644 --- a/lib/Cake/Model/Datasource/Database/Oracle.php +++ b/lib/Cake/Model/Datasource/Database/Oracle.php @@ -30,7 +30,6 @@ class DboOracle extends DboSource { * Configuration options * * @var array - * @access public */ public $config = array(); @@ -43,6 +42,8 @@ class DboOracle extends DboSource { /** * Sequence names as introspected from the database + * + * @var array */ protected $_sequences = array(); @@ -51,13 +52,12 @@ class DboOracle extends DboSource { * * @var boolean */ - private $__transactionStarted = false; + protected $_transactionStarted = false; /** * Column definitions * * @var array - * @access public */ public $columns = array( 'primary_key' => array('name' => ''), @@ -78,31 +78,27 @@ class DboOracle extends DboSource { * Connection object * * @var mixed - * @access protected */ public $connection; /** * Query limit * - * @var int - * @access protected + * @var integer */ protected $_limit = -1; /** * Query offset * - * @var int - * @access protected + * @var integer */ protected $_offset = 0; /** - * Enter description here... + * Map * - * @var unknown_type - * @access protected + * @var array */ protected $_map; @@ -110,15 +106,13 @@ class DboOracle extends DboSource { * Current Row * * @var mixed - * @access protected */ protected $_currentRow; /** * Number of rows * - * @var int - * @access protected + * @var integer */ protected $_numRows; @@ -126,14 +120,13 @@ class DboOracle extends DboSource { * Query results * * @var mixed - * @access protected */ protected $_results; /** * Last error issued by oci extension * - * @var unknown_type + * @var string */ protected $_error; @@ -155,7 +148,7 @@ class DboOracle extends DboSource { /** * Table-sequence map * - * @var unknown_type + * @var array */ protected $_sequenceMap = array(); @@ -196,6 +189,9 @@ class DboOracle extends DboSource { /** * Keeps track of the most recent Oracle error * + * @param mixed $source + * @param boolean $clear + * @return void */ protected function _setError($source = null, $clear = false) { if ($source) { @@ -213,7 +209,7 @@ class DboOracle extends DboSource { * Sets the encoding language of the session * * @param string $lang language constant - * @return bool + * @return boolean */ public function setEncoding($lang) { if (!$this->execute('ALTER SESSION SET NLS_LANGUAGE='.$lang)) { @@ -256,7 +252,7 @@ class DboOracle extends DboSource { * experimental method that creates the association maps since Oracle will not tell us. * * @param string $sql - * @return false if sql is nor a SELECT + * @return void */ protected function _scrapeSQL($sql) { $sql = str_replace("\"", '', $sql); @@ -305,7 +301,7 @@ class DboOracle extends DboSource { * * @param integer $limit Maximum number of rows to return * @param integer $offset Row to begin returning - * @return modified SQL Query + * @return void */ public function limit($limit = -1, $offset = 0) { $this->_limit = (int) $limit; @@ -316,9 +312,10 @@ class DboOracle extends DboSource { * Returns number of rows in previous resultset. If no previous resultset exists, * this returns false. * + * @param mixed $source * @return integer Number of rows in resultset */ - public function lastNumRows() { + public function lastNumRows($source = null) { return $this->_numRows; } @@ -326,16 +323,18 @@ class DboOracle extends DboSource { * Executes given SQL statement. This is an overloaded method. * * @param string $sql SQL statement + * @param array $params list of params to be bound to query + * @param array $prepareOptions Options to be used in the prepare statement * @return resource Result resource identifier or null */ - protected function _execute($sql) { + protected function _execute($sql, $params = array(), $prepareOptions = array()) { $this->_statementId = @ociparse($this->connection, $sql); if (!$this->_statementId) { $this->_setError($this->connection); return false; } - if ($this->__transactionStarted) { + if ($this->_transactionStarted) { $mode = OCI_DEFAULT; } else { $mode = OCI_COMMIT_ON_SUCCESS; @@ -372,10 +371,10 @@ class DboOracle extends DboSource { /** * Fetch result row * + * @param string $sql * @return array - * @access public */ - public function fetchRow() { + public function fetchRow($sql = null) { if ($this->_currentRow >= $this->_numRows) { ocifreestatement($this->_statementId); $this->_map = null; @@ -402,7 +401,7 @@ class DboOracle extends DboSource { /** * Fetches the next row from the current result set * - * @return unknown + * @return array */ public function fetchResult() { return $this->fetchRow(); @@ -412,7 +411,7 @@ class DboOracle extends DboSource { * Checks to see if a named sequence exists * * @param string $sequence - * @return bool + * @return boolean|array */ public function sequenceExists($sequence) { $sql = "SELECT SEQUENCE_NAME FROM USER_SEQUENCES WHERE SEQUENCE_NAME = '$sequence'"; @@ -426,7 +425,7 @@ class DboOracle extends DboSource { * Creates a database sequence * * @param string $sequence - * @return bool + * @return boolean */ public function createSequence($sequence) { $sql = "CREATE SEQUENCE $sequence"; @@ -438,7 +437,6 @@ class DboOracle extends DboSource { * * @param string $table * @return mixed - * @access public */ public function createTrigger($table) { $sql = "CREATE OR REPLACE TRIGGER pk_$table" . "_trigger BEFORE INSERT ON $table FOR EACH ROW BEGIN SELECT pk_$table.NEXTVAL INTO :NEW.ID FROM DUAL; END;"; @@ -449,9 +447,10 @@ class DboOracle extends DboSource { * Returns an array of tables in the database. If there are no tables, an error is * raised and the application exits. * + * @param mixed $source * @return array tablenames in the database */ - public function listSources() { + public function listSources($source = null) { $cache = parent::listSources(); if ($cache != null) { return $cache; @@ -473,10 +472,10 @@ class DboOracle extends DboSource { /** * Returns an array of the fields in given table name. * - * @param object instance of a model to inspect + * @param Model $model instance of a model to inspect * @return array Fields in table. Keys are name and type */ - public function describe($model) { + public function describe(Model $model) { $table = $this->fullTableName($model, false); if (!empty($model->sequence)) { @@ -506,7 +505,7 @@ class DboOracle extends DboSource { 'length'=> $row[0]['DATA_LENGTH'] ); } - $this->__cacheDescription($this->fullTableName($model, false), $fields); + $this->_cacheDescription($this->fullTableName($model, false), $fields); return $fields; } @@ -519,7 +518,6 @@ class DboOracle extends DboSource { * @param integer $reset If -1, sequences are dropped, if 0 (default), sequences are reset, * and if 1, sequences are not modified * @return boolean SQL TRUNCATE TABLE statement, false if not applicable. - * @access public * */ public function truncate($table, $reset = 0) { @@ -680,8 +678,9 @@ class DboOracle extends DboSource { /** * Generate a Oracle Alter Table syntax for the given Schema comparison * - * @param unknown_type $schema - * @return unknown + * @param mixed $compare + * @param mixed $table + * @return boolean|string */ public function alterSchema($compare, $table = null) { if (!is_array($compare)) { @@ -730,8 +729,8 @@ class DboOracle extends DboSource { * This method should quote Oracle identifiers. Well it doesn't. * It would break all scaffolding and all of Cake's default assumptions. * - * @param unknown_type $var - * @return unknown + * @param string $name + * @return string */ public function name($name) { if (strpos($name, '.') !== false && strpos($name, '"') === false) { @@ -750,19 +749,17 @@ class DboOracle extends DboSource { /** * Begin a transaction * - * @param unknown_type $model * @return boolean True on success, false on fail * (i.e. if the database/model does not support transactions). */ public function begin() { - $this->__transactionStarted = true; + $this->_transactionStarted = true; return true; } /** * Rollback a transaction * - * @param unknown_type $model * @return boolean True on success, false on fail * (i.e. if the database/model does not support transactions, * or a transaction has not started). @@ -774,13 +771,12 @@ class DboOracle extends DboSource { /** * Commit a transaction * - * @param unknown_type $model * @return boolean True on success, false on fail * (i.e. if the database/model does not support transactions, * or a transaction has not started). */ public function commit() { - $this->__transactionStarted = false; + $this->_transactionStarted = false; return ocicommit($this->connection); } @@ -838,6 +834,7 @@ class DboOracle extends DboSource { * Returns a quoted and escaped string of $data for use in an SQL statement. * * @param string $data String to be prepared for use in an SQL statement + * @param string $column * @return string Quoted and escaped */ public function value($data, $column = null) { @@ -877,10 +874,10 @@ class DboOracle extends DboSource { /** * Returns the ID generated from the previous INSERT operation. * - * @param string - * @return integer + * @param string $source + * @return integer|boolean */ - public function lastInsertId($source) { + public function lastInsertId($source = null) { $sequence = $this->_sequenceMap[$source]; $sql = "SELECT $sequence.currval FROM dual"; @@ -897,18 +894,20 @@ class DboOracle extends DboSource { /** * Returns a formatted error message from previous database operation. * + * @param PDOStatement $query the query to extract the error from if any * @return string Error message with error number */ - public function lastError() { + public function lastError(PDOStatement $query = null) { return $this->_error; } /** * Returns number of affected rows in previous database operation. If no previous operation exists, this returns false. * - * @return int Number of affected rows + * @param mixed $source + * @return integer Number of affected rows */ - public function lastAffected() { + public function lastAffected($source = null) { return $this->_statementId ? ocirowcount($this->_statementId): false; } @@ -959,18 +958,19 @@ class DboOracle extends DboSource { } /** - * Enter description here... + * queryAssociation method * * @param Model $model - * @param unknown_type $linkModel + * @param Model $linkModel * @param string $type Association type - * @param unknown_type $association - * @param unknown_type $assocData - * @param unknown_type $queryData - * @param unknown_type $external - * @param unknown_type $resultSet + * @param string $association + * @param array $assocData + * @param array $queryData + * @param boolean $external + * @param array $resultSet * @param integer $recursive Number of levels of association * @param array $stack + * @return void */ public function queryAssociation($model, &$linkModel, $type, $association, $assocData, &$queryData, $external = false, &$resultSet, $recursive, $stack) { if ($query = $this->generateAssociationQuery($model, $linkModel, $type, $association, $assocData, $queryData, $external, $resultSet)) { @@ -1101,16 +1101,16 @@ class DboOracle extends DboSource { if (empty($merge) && !isset($row[$association])) { $row[$association] = $merge; } else { - $this->__mergeAssociation($resultSet[$i], $merge, $association, $type); + $this->_mergeAssociation($resultSet[$i], $merge, $association, $type); } } else { - $this->__mergeAssociation($resultSet[$i], $fetch, $association, $type); + $this->_mergeAssociation($resultSet[$i], $fetch, $association, $type); } $resultSet[$i][$association] = $linkModel->afterfind($resultSet[$i][$association]); } else { $tempArray[0][$association] = false; - $this->__mergeAssociation($resultSet[$i], $tempArray, $association, $type); + $this->_mergeAssociation($resultSet[$i], $tempArray, $association, $type); } } } diff --git a/lib/Cake/Model/Datasource/Database/Postgres.php b/lib/Cake/Model/Datasource/Database/Postgres.php index 9f36122d1..e25b5b675 100644 --- a/lib/Cake/Model/Datasource/Database/Postgres.php +++ b/lib/Cake/Model/Datasource/Database/Postgres.php @@ -32,7 +32,6 @@ class Postgres extends DboSource { * Driver description * * @var string - * @access public */ public $description = "PostgreSQL DBO Driver"; @@ -40,7 +39,6 @@ class Postgres extends DboSource { * Index of basic SQL commands * * @var array - * @access protected */ protected $_commands = array( 'begin' => 'BEGIN', @@ -52,7 +50,6 @@ class Postgres extends DboSource { * Base driver configuration settings. Merged with user settings. * * @var array - * @access protected */ protected $_baseConfig = array( 'persistent' => true, @@ -65,6 +62,11 @@ class Postgres extends DboSource { 'encoding' => '' ); +/** + * Columns + * + * @var array + */ public $columns = array( 'primary_key' => array('name' => 'serial NOT NULL'), 'string' => array('name' => 'varchar', 'limit' => '255'), @@ -85,7 +87,6 @@ class Postgres extends DboSource { * Starting Quote * * @var string - * @access public */ public $startQuote = '"'; @@ -93,7 +94,6 @@ class Postgres extends DboSource { * Ending Quote * * @var string - * @access public */ public $endQuote = '"'; @@ -108,7 +108,8 @@ class Postgres extends DboSource { /** * Connects to the database using options in the given configuration array. * - * @return True if successfully connected. + * @return boolean True if successfully connected. + * @throws MissingConnectionException */ public function connect() { $config = $this->config; @@ -150,6 +151,7 @@ class Postgres extends DboSource { /** * Returns an array of tables in the database. If there are no tables, an error is raised and the application exits. * + * @param mixed $data * @return array Array of tablenames in the database */ public function listSources($data = null) { @@ -181,10 +183,10 @@ class Postgres extends DboSource { /** * Returns an array of the fields in given table name. * - * @param string $tableName Name of database table to inspect + * @param Model $model Name of database table to inspect * @return array Fields in table. Keys are name and type */ - public function describe($model) { + public function describe(Model $model) { $fields = parent::describe($model); $table = $this->fullTableName($model, false); $this->_sequenceMap[$table] = array(); @@ -247,7 +249,7 @@ class Postgres extends DboSource { $fields[$c->name]['default'] = constant($fields[$c->name]['default']); } } - $this->__cacheDescription($table, $fields); + $this->_cacheDescription($table, $fields); } if (isset($model->sequence)) { $this->_sequenceMap[$table][$model->primaryKey] = $model->sequence; @@ -266,7 +268,7 @@ class Postgres extends DboSource { * @param string $field Name of the ID database field. Defaults to "id" * @return integer */ - public function lastInsertId($source, $field = 'id') { + public function lastInsertId($source = null, $field = 'id') { $seq = $this->getSequence($source, $field); return $this->_connection->lastInsertId($seq); } @@ -336,6 +338,7 @@ class Postgres extends DboSource { * @param Model $model * @param string $alias Alias tablename * @param mixed $fields + * @param boolean $quote * @return array */ public function fields($model, $alias = null, $fields = array(), $quote = true) { @@ -379,7 +382,7 @@ class Postgres extends DboSource { $fields[$i] = $prepend . $this->name($build[0]) . '.' . $this->name($build[1]) . ' AS ' . $this->name($build[0] . '__' . $build[1]); } } else { - $fields[$i] = preg_replace_callback('/\(([\s\.\w]+)\)/', array(&$this, '__quoteFunctionField'), $fields[$i]); + $fields[$i] = preg_replace_callback('/\(([\s\.\w]+)\)/', array(&$this, '_quoteFunctionField'), $fields[$i]); } $result[] = $fields[$i]; } @@ -391,11 +394,10 @@ class Postgres extends DboSource { /** * Auxiliary function to quote matched `(Model.fields)` from a preg_replace_callback call * - * @param string matched string + * @param string $match matched string * @return string quoted strig - * @access private */ - private function __quoteFunctionField($match) { + protected function _quoteFunctionField($match) { $prepend = ''; if (strpos($match[1], 'DISTINCT') !== false) { $prepend = 'DISTINCT '; @@ -456,7 +458,6 @@ class Postgres extends DboSource { * * @param array $compare Results of CakeSchema::compare() * @param string $table name of the table - * @access public * @return array */ public function alterSchema($compare, $table = null) { @@ -544,7 +545,7 @@ class Postgres extends DboSource { * Generate PostgreSQL index alteration statements for a table. * * @param string $table Table to alter indexes for - * @param array $new Indexes to add and drop + * @param array $indexes Indexes to add and drop * @return array Index alteration statements */ protected function _alterIndexes($table, $indexes) { @@ -659,7 +660,7 @@ class Postgres extends DboSource { * Gets the length of a database-native column description, or null if no length * * @param string $real Real database-layer column type (i.e. "varchar(255)") - * @return int An integer representing the length of the column + * @return integer An integer representing the length of the column */ public function length($real) { $col = str_replace(array(')', 'unsigned'), '', $real); @@ -678,9 +679,10 @@ class Postgres extends DboSource { } /** - * Enter description here... + * resultSet method * - * @param unknown_type $results + * @param array $results + * @return void */ public function resultSet(&$results) { $this->map = array(); @@ -703,7 +705,7 @@ class Postgres extends DboSource { /** * Fetches the next row from the current result set * - * @return unknown + * @return array */ public function fetchResult() { if ($row = $this->_result->fetch()) { diff --git a/lib/Cake/Model/Datasource/Database/Sqlite.php b/lib/Cake/Model/Datasource/Database/Sqlite.php index 0abb2dc83..579931059 100644 --- a/lib/Cake/Model/Datasource/Database/Sqlite.php +++ b/lib/Cake/Model/Datasource/Database/Sqlite.php @@ -32,33 +32,29 @@ class Sqlite extends DboSource { * Datasource Description * * @var string - * @access public */ - var $description = "SQLite DBO Driver"; + public $description = "SQLite DBO Driver"; /** * Quote Start * * @var string - * @access public */ - var $startQuote = '"'; + public $startQuote = '"'; /** * Quote End * * @var string - * @access public */ - var $endQuote = '"'; + public $endQuote = '"'; /** * Base configuration settings for SQLite3 driver * * @var array - * @access public */ - var $_baseConfig = array( + protected $_baseConfig = array( 'persistent' => false, 'database' => null ); @@ -67,9 +63,8 @@ class Sqlite extends DboSource { * SQLite3 column definition * * @var array - * @access public */ - var $columns = array( + public $columns = array( 'primary_key' => array('name' => 'integer primary key autoincrement'), 'string' => array('name' => 'varchar', 'limit' => '255'), 'text' => array('name' => 'text'), @@ -87,9 +82,8 @@ class Sqlite extends DboSource { * List of engine specific additional field parameters used on table creating * * @var array - * @access public */ - var $fieldParameters = array( + public $fieldParameters = array( 'collate' => array( 'value' => 'COLLATE', 'quote' => false, @@ -105,9 +99,8 @@ class Sqlite extends DboSource { /** * Connects to the database using config['database'] as a filename. * - * @param array $config Configuration array for connecting - * @return mixed - * @access public + * @return boolean + * @throws MissingConnectionException */ public function connect() { $config = $this->config; @@ -134,8 +127,8 @@ class Sqlite extends DboSource { /** * Returns an array of tables in the database. If there are no tables, an error is raised and the application exits. * + * @param mixed $data * @return array Array of tablenames in the database - * @access public */ public function listSources($data = null) { $cache = parent::listSources(); @@ -161,11 +154,10 @@ class Sqlite extends DboSource { /** * Returns an array of the fields in given table name. * - * @param string $tableName Name of database table to inspect + * @param Model $model * @return array Fields in table. Keys are name and type - * @access public */ - public function describe($model) { + public function describe(Model $model) { $cache = parent::describe($model); if ($cache != null) { return $cache; @@ -193,7 +185,7 @@ class Sqlite extends DboSource { } $result->closeCursor(); - $this->__cacheDescription($model->tablePrefix . $model->table, $fields); + $this->_cacheDescription($model->tablePrefix . $model->table, $fields); return $fields; } @@ -205,9 +197,8 @@ class Sqlite extends DboSource { * @param array $values * @param mixed $conditions * @return array - * @access public */ - public function update($model, $fields = array(), $values = null, $conditions = null) { + public function update(Model $model, $fields = array(), $values = null, $conditions = null) { if (empty($values) && !empty($fields)) { foreach ($fields as $field => $value) { if (strpos($field, $model->alias . '.') !== false) { @@ -227,7 +218,6 @@ class Sqlite extends DboSource { * * @param mixed $table A string or model class representing the table to be truncated * @return boolean SQL TRUNCATE TABLE statement, false if not applicable. - * @access public */ public function truncate($table) { $this->_execute('DELETE FROM sqlite_sequence where name=' . $this->fullTableName($table)); @@ -239,7 +229,6 @@ class Sqlite extends DboSource { * * @param string $real Real database-layer column type (i.e. "varchar(255)") * @return string Abstract column type (i.e. "string") - * @access public */ public function column($real) { if (is_array($real)) { @@ -273,7 +262,7 @@ class Sqlite extends DboSource { * Generate ResultSet * * @param mixed $results - * @access public + * @return void */ public function resultSet($results) { $this->results = $results; @@ -356,7 +345,6 @@ class Sqlite extends DboSource { * @param integer $limit Limit of results returned * @param integer $offset Offset from which to start results * @return string SQL limit/offset statement - * @access public */ public function limit($limit, $offset = null) { if ($limit) { @@ -379,7 +367,6 @@ class Sqlite extends DboSource { * @param array $column An array structured like the following: array('name'=>'value', 'type'=>'value'[, options]), * where options can be 'default', 'length', or 'key'. * @return string - * @access public */ public function buildColumn($column) { $name = $type = null; @@ -408,7 +395,7 @@ class Sqlite extends DboSource { * Sets the database encoding * * @param string $enc Database encoding - * @access public + * @return boolean */ public function setEncoding($enc) { if (!in_array($enc, array("UTF-8", "UTF-16", "UTF-16le", "UTF-16be"))) { @@ -421,7 +408,6 @@ class Sqlite extends DboSource { * Gets the database encoding * * @return string The database encoding - * @access public */ public function getEncoding() { return $this->fetchRow('PRAGMA encoding'); @@ -433,7 +419,6 @@ class Sqlite extends DboSource { * @param array $indexes * @param string $table * @return string - * @access public */ public function buildIndex($indexes, $table = null) { $join = array(); @@ -466,7 +451,6 @@ class Sqlite extends DboSource { * * @param string $model Name of model to inspect * @return array Fields in table. Keys are column and unique - * @access public */ public function index($model) { $index = array(); @@ -507,7 +491,6 @@ class Sqlite extends DboSource { * @param string $type * @param array $data * @return string - * @access public */ public function renderStatement($type, $data) { switch (strtolower($type)) { @@ -531,7 +514,6 @@ class Sqlite extends DboSource { * PDO deals in objects, not resources, so overload accordingly. * * @return boolean - * @access public */ public function hasResult() { return is_object($this->_result); @@ -540,7 +522,7 @@ class Sqlite extends DboSource { /** * Generate a "drop table" statement for the given Schema object * - * @param object $schema An instance of a subclass of CakeSchema + * @param CakeSchema $schema An instance of a subclass of CakeSchema * @param string $table Optional. If specified only the table name given will be generated. * Otherwise, all tables defined in the schema are generated. * @return string diff --git a/lib/Cake/Model/Datasource/Database/Sqlserver.php b/lib/Cake/Model/Datasource/Database/Sqlserver.php index 3d163dff9..7814e3989 100644 --- a/lib/Cake/Model/Datasource/Database/Sqlserver.php +++ b/lib/Cake/Model/Datasource/Database/Sqlserver.php @@ -108,13 +108,6 @@ class Sqlserver extends DboSource { 'rollback' => 'ROLLBACK' ); -/** - * Define if the last query had error - * - * @var string - */ - private $__lastQueryHadError = false; - /** * Magic column name used to provide pagination support for SQLServer 2008 * which lacks proper limit/offset support. @@ -133,6 +126,7 @@ class Sqlserver extends DboSource { * Connects to the database using options in the given configuration array. * * @return boolean True if the database could be connected, else false + * @throws MissingConnectionException */ public function connect() { $config = $this->config; @@ -169,9 +163,10 @@ class Sqlserver extends DboSource { /** * Returns an array of sources (tables) in the database. * + * @param mixed $data * @return array Array of tablenames in the database */ - public function listSources() { + public function listSources($data = null) { $cache = parent::listSources(); if ($cache !== null) { return $cache; @@ -199,8 +194,9 @@ class Sqlserver extends DboSource { * * @param Model $model Model object to describe * @return array Fields in table. Keys are name and type + * @throws CakeException */ - public function describe($model) { + public function describe(Model $model) { $cache = parent::describe($model); if ($cache != null) { return $cache; @@ -208,15 +204,15 @@ class Sqlserver extends DboSource { $fields = array(); $table = $this->fullTableName($model, false); $cols = $this->_execute( - "SELECT + "SELECT COLUMN_NAME as Field, - DATA_TYPE as Type, - COL_LENGTH('" . $table . "', COLUMN_NAME) as Length, - IS_NULLABLE As [Null], - COLUMN_DEFAULT as [Default], + DATA_TYPE as Type, + COL_LENGTH('" . $table . "', COLUMN_NAME) as Length, + IS_NULLABLE As [Null], + COLUMN_DEFAULT as [Default], COLUMNPROPERTY(OBJECT_ID('" . $table . "'), COLUMN_NAME, 'IsIdentity') as [Key], - NUMERIC_SCALE as Size - FROM INFORMATION_SCHEMA.COLUMNS + NUMERIC_SCALE as Size + FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = '" . $table . "'" ); if (!$cols) { @@ -251,7 +247,7 @@ class Sqlserver extends DboSource { $fields[$field]['length'] = $fields[$field]['length'] . ',' . $column->Size; } } - $this->__cacheDescription($table, $fields); + $this->_cacheDescription($table, $fields); $cols->closeCursor(); return $fields; } @@ -262,7 +258,8 @@ class Sqlserver extends DboSource { * * @param Model $model * @param string $alias Alias tablename - * @param mixed $fields + * @param array $fields + * @param boolean $quote * @return array */ public function fields($model, $alias = null, $fields = array(), $quote = true) { @@ -327,10 +324,9 @@ class Sqlserver extends DboSource { * @param Model $model * @param array $fields * @param array $values - * @param mixed $conditions * @return array */ - public function create($model, $fields = null, $values = null) { + public function create(Model $model, $fields = null, $values = null) { if (!empty($values)) { $fields = array_combine($fields, $values); } @@ -360,7 +356,7 @@ class Sqlserver extends DboSource { * @param mixed $conditions * @return array */ - public function update($model, $fields = array(), $values = null, $conditions = null) { + public function update(Model $model, $fields = array(), $values = null, $conditions = null) { if (!empty($values)) { $fields = array_combine($fields, $values); } @@ -464,6 +460,7 @@ class Sqlserver extends DboSource { * Builds a map of the columns contained in a result * * @param PDOStatement $results + * @return void */ public function resultSet($results) { $this->map = array(); @@ -589,11 +586,12 @@ class Sqlserver extends DboSource { * Returns an array of all result rows for a given SQL query. * Returns false if no rows matched. * - * @param string $sql SQL statement - * @param boolean $cache Enables returning/storing cached query results + * @param Model $model + * @param array $queryData + * @param integer $recursive * @return array Array of resultset rows, or false if no rows matched */ - public function read($model, $queryData = array(), $recursive = null) { + public function read(Model $model, $queryData = array(), $recursive = null) { $results = parent::read($model, $queryData, $recursive); $this->_fieldMappings = array(); return $results; @@ -630,6 +628,7 @@ class Sqlserver extends DboSource { * @param string $table * @param string $fields * @param array $values + * @return void */ public function insertMulti($table, $fields, $values) { $primaryKey = $this->_getPrimaryKey($table); @@ -730,9 +729,10 @@ class Sqlserver extends DboSource { * Returns number of affected rows in previous database operation. If no previous operation exists, * this returns false. * + * @param mixed $source * @return integer Number of affected rows */ - public function lastAffected() { + public function lastAffected($source = null) { $affected = parent::lastAffected(); if ($affected === null && $this->_lastAffected !== false) { return $this->_lastAffected; diff --git a/lib/Cake/Model/Datasource/DboSource.php b/lib/Cake/Model/Datasource/DboSource.php index e838c04c5..3e3c30f4c 100644 --- a/lib/Cake/Model/Datasource/DboSource.php +++ b/lib/Cake/Model/Datasource/DboSource.php @@ -34,7 +34,6 @@ class DboSource extends DataSource { * Description string for this Database Data Source. * * @var string - * @access public */ public $description = "Database Data Source"; @@ -49,7 +48,6 @@ class DboSource extends DataSource { * Database keyword used to assign aliases to identifiers. * * @var string - * @access public */ public $alias = 'AS '; @@ -60,7 +58,6 @@ class DboSource extends DataSource { * with collisions, set DboSource::$cacheMethods to false. * * @var array - * @access public */ public static $methodCache = array(); @@ -69,7 +66,6 @@ class DboSource extends DataSource { * into the memory cache. Set to false to disable the use of the memory cache. * * @var boolean. - * @access public */ public $cacheMethods = true; @@ -77,15 +73,13 @@ class DboSource extends DataSource { * Print full query debug info? * * @var boolean - * @access public */ public $fullDebug = false; /** * Error description of last query * - * @var unknown_type - * @access public + * @var string */ public $error = null; @@ -93,23 +87,20 @@ class DboSource extends DataSource { * String to hold how many rows were affected by the last SQL operation. * * @var string - * @access public */ public $affected = null; /** * Number of rows in current resultset * - * @var int - * @access public + * @var integer */ public $numRows = null; /** * Time the last query took * - * @var int - * @access public + * @var integer */ public $took = null; @@ -117,31 +108,27 @@ class DboSource extends DataSource { * Result * * @var array - * @access protected */ protected $_result = null; /** * Queries count. * - * @var int - * @access protected + * @var integer */ protected $_queriesCnt = 0; /** * Total duration of all queries. * - * @var unknown_type - * @access protected + * @var integer */ protected $_queriesTime = null; /** * Log of queries executed by this DataSource * - * @var unknown_type - * @access protected + * @var array */ protected $_queriesLog = array(); @@ -150,8 +137,7 @@ class DboSource extends DataSource { * * This is to prevent query log taking over too much memory. * - * @var int Maximum number of queries in the queries log. - * @access protected + * @var integer Maximum number of queries in the queries log. */ protected $_queriesLogMax = 200; @@ -159,7 +145,6 @@ class DboSource extends DataSource { * Caches serialzed results of executed queries * * @var array Maximum number of queries in the queries log. - * @access protected */ protected $_queryCache = array(); @@ -167,7 +152,6 @@ class DboSource extends DataSource { * A reference to the physical connection of this DataSource * * @var array - * @access public */ public $connection = null; @@ -175,7 +159,6 @@ class DboSource extends DataSource { * The DataSource configuration key name * * @var string - * @access public */ public $configKeyName = null; @@ -183,7 +166,6 @@ class DboSource extends DataSource { * The starting character that this DataSource uses for quoted identifiers. * * @var string - * @access public */ public $startQuote = null; @@ -191,7 +173,6 @@ class DboSource extends DataSource { * The ending character that this DataSource uses for quoted identifiers. * * @var string - * @access public */ public $endQuote = null; @@ -199,15 +180,13 @@ class DboSource extends DataSource { * The set of valid SQL operations usable in a WHERE statement * * @var array - * @access private */ - private $__sqlOps = array('like', 'ilike', 'or', 'not', 'in', 'between', 'regexp', 'similar to'); + protected $_sqlOps = array('like', 'ilike', 'or', 'not', 'in', 'between', 'regexp', 'similar to'); /** * Indicates the level of nested transactions * * @var integer - * @access protected */ protected $_transactionNesting = 0; @@ -215,7 +194,6 @@ class DboSource extends DataSource { * Index of basic SQL commands * * @var array - * @access protected */ protected $_commands = array( 'begin' => 'BEGIN', @@ -234,7 +212,6 @@ class DboSource extends DataSource { * List of table engine specific parameters used on table creating * * @var array - * @access public */ public $tableParameters = array(); @@ -242,7 +219,6 @@ class DboSource extends DataSource { * List of engine specific additional field parameters used on table creating * * @var array - * @access public */ public $fieldParameters = array(); @@ -376,7 +352,7 @@ class DboSource extends DataSource { * are not sanitized or esacped. * * @param string $identifier A SQL expression to be used as an identifier - * @return object An object representing a database identifier to be used in a query + * @return stdClass An object representing a database identifier to be used in a query */ public function identifier($identifier) { $obj = new stdClass(); @@ -390,7 +366,7 @@ class DboSource extends DataSource { * are not sanitized or esacped. * * @param string $expression An arbitrary SQL expression to be inserted into a query. - * @return object An object representing a database expression to be used in a query + * @return stdClass An object representing a database expression to be used in a query */ public function expression($expression) { $obj = new stdClass(); @@ -503,9 +479,10 @@ class DboSource extends DataSource { * Returns number of affected rows in previous database operation. If no previous operation exists, * this returns false. * + * @param mixed $source * @return integer Number of affected rows */ - public function lastAffected() { + public function lastAffected($source = null) { if ($this->hasResult()) { return $this->_result->rowCount(); } @@ -516,9 +493,10 @@ class DboSource extends DataSource { * Returns number of rows in previous resultset. If no previous resultset exists, * this returns false. * + * @param mixed $source Not used * @return integer Number of rows in resultset */ - public function lastNumRows() { + public function lastNumRows($source = null) { return $this->lastAffected(); } @@ -705,7 +683,7 @@ class DboSource extends DataSource { /** * Modifies $result array to place virtual fields in model entry where they belongs to * - * @param array $resut Reference to the fetched row + * @param array $result Reference to the fetched row * @return void */ public function fetchVirtualField(&$result) { @@ -913,6 +891,7 @@ class DboSource extends DataSource { * Log given SQL query. * * @param string $sql SQL statement + * @return void|boolean * @todo: Add hook to log errors instead of returning false */ public function logQuery($sql) { @@ -938,6 +917,7 @@ class DboSource extends DataSource { * and execution time in microseconds. If the query fails, an error is output instead. * * @param string $sql Query to show information on. + * @return void */ public function showQuery($sql) { $error = $this->error; @@ -988,7 +968,7 @@ class DboSource extends DataSource { * be used to generate values. * @return boolean Success */ - public function create($model, $fields = null, $values = null) { + public function create(Model $model, $fields = null, $values = null) { $id = null; if ($fields == null) { @@ -1035,8 +1015,8 @@ class DboSource extends DataSource { * @param integer $recursive Number of levels of association * @return mixed boolean false on error/failure. An array of results on success. */ - public function read($model, $queryData = array(), $recursive = null) { - $queryData = $this->__scrubQueryData($queryData); + public function read(Model $model, $queryData = array(), $recursive = null) { + $queryData = $this->_scrubQueryData($queryData); $null = null; $array = array(); @@ -1133,7 +1113,7 @@ class DboSource extends DataSource { * Passes association results thru afterFind filters of corresponding model * * @param array $results Reference of resultset to be filtered - * @param object $model Instance of model to operate against + * @param Model $model Instance of model to operate against * @param array $filtered List of classes already filtered, to be skipped * @return array Array of results that have been filtered through $model->afterFind */ @@ -1166,13 +1146,14 @@ class DboSource extends DataSource { * @param Model $model Primary Model object * @param Model $linkModel Linked model that * @param string $type Association type, one of the model association types ie. hasMany - * @param unknown_type $association - * @param unknown_type $assocData + * @param string $association + * @param array $assocData * @param array $queryData * @param boolean $external Whether or not the association query is on an external datasource. * @param array $resultSet Existing results * @param integer $recursive Number of levels of association * @param array $stack + * @return mixed */ public function queryAssociation($model, &$linkModel, $type, $association, $assocData, &$queryData, $external = false, &$resultSet, $recursive, $stack) { if ($query = $this->generateAssociationQuery($model, $linkModel, $type, $association, $assocData, $queryData, $external, $resultSet)) { @@ -1219,7 +1200,7 @@ class DboSource extends DataSource { } } $this->_filterResults($fetch, $model); - return $this->__mergeHasMany($resultSet, $fetch, $association, $model, $linkModel); + return $this->_mergeHasMany($resultSet, $fetch, $association, $model, $linkModel); } elseif ($type === 'hasAndBelongsToMany') { $ins = $fetch = array(); foreach ($resultSet as &$result) { @@ -1298,17 +1279,17 @@ class DboSource extends DataSource { if (empty($merge) && !isset($row[$association])) { $row[$association] = $merge; } else { - $this->__mergeAssociation($row, $merge, $association, $type); + $this->_mergeAssociation($row, $merge, $association, $type); } } else { - $this->__mergeAssociation($row, $fetch, $association, $type, $selfJoin); + $this->_mergeAssociation($row, $fetch, $association, $type, $selfJoin); } if (isset($row[$association])) { $row[$association] = $linkModel->afterFind($row[$association], false); } } else { $tempArray[0][$association] = false; - $this->__mergeAssociation($row, $tempArray, $association, $type, $selfJoin); + $this->_mergeAssociation($row, $tempArray, $association, $type, $selfJoin); } } } @@ -1317,7 +1298,7 @@ class DboSource extends DataSource { /** * A more efficient way to fetch associations. Woohoo! * - * @param model $model Primary model object + * @param Model $model Primary model object * @param string $query Association query * @param array $ids Array of IDs of associated records * @return array Association results @@ -1337,11 +1318,11 @@ class DboSource extends DataSource { * @param array $resultSet Data to merge into * @param array $merge Data to merge * @param string $association Name of Model being Merged - * @param object $model Model being merged onto - * @param object $linkModel Model being merged + * @param Model $model Model being merged onto + * @param Model $linkModel Model being merged * @return void */ - private function __mergeHasMany(&$resultSet, $merge, $association, $model, $linkModel) { + protected function _mergeHasMany(&$resultSet, $merge, $association, $model, $linkModel) { $modelAlias = $model->alias; $modelPK = $model->primaryKey; $modelFK = $model->hasMany[$association]['foreignKey']; @@ -1372,16 +1353,16 @@ class DboSource extends DataSource { } /** - * Enter description here... + * Merge association of merge into data * - * @param unknown_type $data - * @param unknown_type $merge - * @param unknown_type $association - * @param unknown_type $type + * @param array $data + * @param array $merge + * @param string $association + * @param string $type * @param boolean $selfJoin - * @access private + * @return void */ - function __mergeAssociation(&$data, &$merge, $association, $type, $selfJoin = false) { + protected function _mergeAssociation(&$data, &$merge, $association, $type, $selfJoin = false) { if (isset($merge[0]) && !isset($merge[0][$association])) { $association = Inflector::pluralize($association); } @@ -1465,8 +1446,8 @@ class DboSource extends DataSource { * @return mixed */ public function generateAssociationQuery($model, $linkModel, $type, $association = null, $assocData = array(), &$queryData, $external = false, &$resultSet) { - $queryData = $this->__scrubQueryData($queryData); - $assocData = $this->__scrubQueryData($assocData); + $queryData = $this->_scrubQueryData($queryData); + $assocData = $this->_scrubQueryData($assocData); $modelAlias = $model->alias; if (empty($queryData['fields'])) { @@ -1520,7 +1501,7 @@ class DboSource extends DataSource { switch ($type) { case 'hasOne': case 'belongsTo': - $conditions = $this->__mergeConditions( + $conditions = $this->_mergeConditions( $assocData['conditions'], $this->getConstraint($type, $model, $linkModel, $association, array_merge($assocData, compact('external', 'self'))) ); @@ -1566,7 +1547,7 @@ class DboSource extends DataSource { $assocData['fields'] = array_merge($assocData['fields'], $this->fields($linkModel, $association, array("{$association}.{$assocData['foreignKey']}"))); } $query = array( - 'conditions' => $this->__mergeConditions($this->getConstraint('hasMany', $model, $linkModel, $association, $assocData), $assocData['conditions']), + 'conditions' => $this->_mergeConditions($this->getConstraint('hasMany', $model, $linkModel, $association, $assocData), $assocData['conditions']), 'fields' => array_unique($assocData['fields']), 'table' => $this->fullTableName($linkModel), 'alias' => $association, @@ -1622,8 +1603,11 @@ class DboSource extends DataSource { * Returns a conditions array for the constraint between two models * * @param string $type Association type - * @param object $model Model object - * @param array $association Association array + * @param Model $model Model object + * @param string $linkModel + * @param string $alias + * @param array $assoc + * @param string $alias2 * @return array Conditions array defining the constraint between $model and $association */ public function getConstraint($type, $model, $linkModel, $alias, $assoc, $alias2 = null) { @@ -1658,7 +1642,6 @@ class DboSource extends DataSource { * * @param array $join An array defining a JOIN statement in a query * @return string An SQL JOIN statement to be used in a query - * @access public * @see DboSource::renderJoinStatement() * @see DboSource::buildStatement() */ @@ -1683,9 +1666,8 @@ class DboSource extends DataSource { * Builds and generates an SQL statement from an array. Handles final clean-up before conversion. * * @param array $query An array defining an SQL query - * @param object $model The model object which initiated the query + * @param Model $model The model object which initiated the query * @return string An executable SQL statement - * @access public * @see DboSource::renderStatement() */ public function buildStatement($query, $model) { @@ -1771,7 +1753,7 @@ class DboSource extends DataSource { * @param mixed $assoc * @return array */ - private function __mergeConditions($query, $assoc) { + protected function _mergeConditions($query, $assoc) { if (empty($assoc)) { return $query; } @@ -1803,7 +1785,7 @@ class DboSource extends DataSource { * @param mixed $conditions * @return boolean Success */ - public function update($model, $fields = array(), $values = null, $conditions = null) { + public function update(Model $model, $fields = array(), $values = null, $conditions = null) { if ($values == null) { $combined = $fields; } else { @@ -1880,7 +1862,7 @@ class DboSource extends DataSource { * @param mixed $conditions * @return boolean Success */ - public function delete($model, $conditions = null) { + public function delete(Model $model, $conditions = null) { $alias = $joins = null; $table = $this->fullTableName($model); $conditions = $this->_matchRecords($model, $conditions); @@ -1948,7 +1930,7 @@ class DboSource extends DataSource { /** * Returns an array of SQL JOIN fragments from a model's associations * - * @param object $model + * @param Model $model * @return array */ protected function _getJoins($model) { @@ -1963,7 +1945,7 @@ class DboSource extends DataSource { 'alias' => $assoc, 'type' => isset($assocData['type']) ? $assocData['type'] : 'LEFT', 'conditions' => trim($this->conditions( - $this->__mergeConditions($assocData['conditions'], $this->getConstraint($assocData['association'], $model, $model->{$assoc}, $assoc, $assocData)), + $this->_mergeConditions($assocData['conditions'], $this->getConstraint($assocData['association'], $model, $model->{$assoc}, $assoc, $assocData)), true, false, $model )) )); @@ -1975,7 +1957,7 @@ class DboSource extends DataSource { /** * Returns an SQL calculation, i.e. COUNT() or MAX() * - * @param model $model + * @param Model $model * @param string $func Lowercase name of SQL function, i.e. 'count' or 'max' * @param array $params Function parameters (any values must be quoted manually) * @return string An SQL calculation function @@ -1992,7 +1974,7 @@ class DboSource extends DataSource { $params[1] = 'count'; } if (is_object($model) && $model->isVirtualField($params[0])){ - $arg = $this->__quoteFields($model->getVirtualField($params[0])); + $arg = $this->_quoteFields($model->getVirtualField($params[0])); } else { $arg = $this->name($params[0]); } @@ -2003,7 +1985,7 @@ class DboSource extends DataSource { $params[1] = $params[0]; } if (is_object($model) && $model->isVirtualField($params[0])) { - $arg = $this->__quoteFields($model->getVirtualField($params[0])); + $arg = $this->_quoteFields($model->getVirtualField($params[0])); } else { $arg = $this->name($params[0]); } @@ -2078,8 +2060,8 @@ class DboSource extends DataSource { /** * Returns the ID generated from the previous INSERT operation. * - * @param unknown_type $source - * @return in + * @param mixed $source + * @return mixed */ public function lastInsertId($source = null) { return $this->_connection->lastInsertId(); @@ -2090,7 +2072,7 @@ class DboSource extends DataSource { * If conditions are supplied then they will be returned. If a model doesn't exist and no conditions * were provided either null or false will be returned based on what was input. * - * @param object $model + * @param Model $model * @param mixed $conditions Array of conditions, conditions string, null or false. If an array of conditions, * or string conditions those conditions will be returned. With other values the model's existance will be checked. * If the model doesn't exist a null or false will be returned depending on the input value. @@ -2120,12 +2102,12 @@ class DboSource extends DataSource { /** * Returns a key formatted like a string Model.fieldname(i.e. Post.title, or Country.name) * - * @param unknown_type $model - * @param unknown_type $key - * @param unknown_type $assoc + * @param Model $model + * @param string $key + * @param string $assoc * @return string */ - public function resolveKey($model, $key, $assoc = null) { + public function resolveKey(Model $model, $key, $assoc = null) { if (empty($assoc)) { $assoc = $model->alias; } @@ -2141,7 +2123,7 @@ class DboSource extends DataSource { * @param array $data * @return array */ - function __scrubQueryData($data) { + protected function _scrubQueryData($data) { static $base = null; if ($base === null) { $base = array_fill_keys(array('conditions', 'fields', 'joins', 'order', 'limit', 'offset', 'group'), array()); @@ -2161,7 +2143,7 @@ class DboSource extends DataSource { $virtual = array(); foreach ($fields as $field) { $virtualField = $this->name($alias . $this->virtualFieldSeparator . $field); - $expression = $this->__quoteFields($model->getVirtualField($field)); + $expression = $this->_quoteFields($model->getVirtualField($field)); $virtual[] = '(' . $expression . ") {$this->alias} {$virtualField}"; } return $virtual; @@ -2324,7 +2306,7 @@ class DboSource extends DataSource { if (preg_match($clauses, $conditions, $match)) { $clause = ''; } - $conditions = $this->__quoteFields($conditions); + $conditions = $this->_quoteFields($conditions); return $clause . $conditions; } @@ -2355,7 +2337,7 @@ class DboSource extends DataSource { if (is_numeric($key) && empty($value)) { continue; } elseif (is_numeric($key) && is_string($value)) { - $out[] = $not . $this->__quoteFields($value); + $out[] = $not . $this->_quoteFields($value); } elseif ((is_numeric($key) && is_array($value)) || in_array(strtolower(trim($key)), $bool)) { if (in_array(strtolower(trim($key)), $bool)) { $join = ' ' . strtoupper($key) . ' '; @@ -2396,9 +2378,9 @@ class DboSource extends DataSource { if ($keys === array_values($keys)) { $count = count($value); if ($count === 1) { - $data = $this->__quoteFields($key) . ' = ('; + $data = $this->_quoteFields($key) . ' = ('; } else { - $data = $this->__quoteFields($key) . ' IN ('; + $data = $this->_quoteFields($key) . ' IN ('; } if ($quoteValues) { if (is_object($model)) { @@ -2416,9 +2398,9 @@ class DboSource extends DataSource { } } } elseif (is_numeric($key) && !empty($value)) { - $data = $this->__quoteFields($value); + $data = $this->_quoteFields($value); } else { - $data = $this->__parseKey($model, trim($key), $value); + $data = $this->_parseKey($model, trim($key), $value); } if ($data != null) { @@ -2438,10 +2420,9 @@ class DboSource extends DataSource { * @param string $key An SQL key snippet containing a field and optional SQL operator * @param mixed $value The value(s) to be inserted in the string * @return string - * @access private */ - private function __parseKey($model, $key, $value) { - $operatorMatch = '/^((' . implode(')|(', $this->__sqlOps); + protected function _parseKey($model, $key, $value) { + $operatorMatch = '/^((' . implode(')|(', $this->_sqlOps); $operatorMatch .= '\\x20)|<[>=]?(?![^>]+>)\\x20?|[>=!]{1,3}(?!<)\\x20?)/is'; $bound = (strpos($key, '?') !== false || (is_array($value) && strpos($key, ':') !== false)); @@ -2460,7 +2441,7 @@ class DboSource extends DataSource { $virtual = false; if (is_object($model) && $model->isVirtualField($key)) { - $key = $this->__quoteFields($model->getVirtualField($key)); + $key = $this->_quoteFields($model->getVirtualField($key)); $virtual = true; } @@ -2478,7 +2459,7 @@ class DboSource extends DataSource { if (!$virtual && $key !== '?') { $isKey = (strpos($key, '(') !== false || strpos($key, ')') !== false); - $key = $isKey ? $this->__quoteFields($key) : $this->name($key); + $key = $isKey ? $this->_quoteFields($key) : $this->name($key); } if ($bound) { @@ -2525,9 +2506,8 @@ class DboSource extends DataSource { * * @param string $conditions * @return string or false if no match - * @access private */ - private function __quoteFields($conditions) { + protected function _quoteFields($conditions) { $start = $end = null; $original = $conditions; @@ -2538,7 +2518,7 @@ class DboSource extends DataSource { $end = preg_quote($this->endQuote); } $conditions = str_replace(array($start, $end), '', $conditions); - $conditions = preg_replace_callback('/(?:[\'\"][^\'\"\\\]*(?:\\\.[^\'\"\\\]*)*[\'\"])|([a-z0-9_' . $start . $end . ']*\\.[a-z0-9_' . $start . $end . ']*)/i', array(&$this, '__quoteMatchedField'), $conditions); + $conditions = preg_replace_callback('/(?:[\'\"][^\'\"\\\]*(?:\\\.[^\'\"\\\]*)*[\'\"])|([a-z0-9_' . $start . $end . ']*\\.[a-z0-9_' . $start . $end . ']*)/i', array(&$this, '_quoteMatchedField'), $conditions); if ($conditions !== null) { return $conditions; @@ -2549,11 +2529,10 @@ class DboSource extends DataSource { /** * Auxiliary function to quote matches `Model.fields` from a preg_replace_callback call * - * @param string matched string + * @param string $match matched string * @return string quoted strig - * @access private */ - private function __quoteMatchedField($match) { + protected function _quoteMatchedField($match) { if (is_numeric($match[0])) { return $match[0]; } @@ -2587,9 +2566,9 @@ class DboSource extends DataSource { /** * Returns an ORDER BY clause as a string. * - * @param string $key Field reference, as a key (i.e. Post.title) + * @param array|string $keys Field reference, as a key (i.e. Post.title) * @param string $direction Direction (ASC or DESC) - * @param object $model model reference (used to look for virtual field) + * @param Model $model model reference (used to look for virtual field) * @return string ORDER BY clause */ public function order($keys, $direction = 'ASC', $model = null) { @@ -2634,11 +2613,11 @@ class DboSource extends DataSource { $key = trim($key); if (is_object($model) && $model->isVirtualField($key)) { - $key = '(' . $this->__quoteFields($model->getVirtualField($key)) . ')'; + $key = '(' . $this->_quoteFields($model->getVirtualField($key)) . ')'; } if (strpos($key, '.')) { - $key = preg_replace_callback('/([a-zA-Z0-9_-]{1,})\\.([a-zA-Z0-9_-]{1,})/', array(&$this, '__quoteMatchedField'), $key); + $key = preg_replace_callback('/([a-zA-Z0-9_-]{1,})\\.([a-zA-Z0-9_-]{1,})/', array(&$this, '_quoteMatchedField'), $key); } if (!preg_match('/\s/', $key) && strpos($key, '.') === false) { $key = $this->name($key); @@ -2656,7 +2635,8 @@ class DboSource extends DataSource { * Create a GROUP BY SQL clause * * @param string $group Group By Condition - * @return mixed string condition or null + * @param Model $model + * @return string string condition or null */ public function group($group, $model = null) { if ($group) { @@ -2669,7 +2649,7 @@ class DboSource extends DataSource { } } $group = implode(', ', $group); - return ' GROUP BY ' . $this->__quoteFields($group); + return ' GROUP BY ' . $this->_quoteFields($group); } return null; } @@ -2686,7 +2666,7 @@ class DboSource extends DataSource { /** * Checks if the specified table contains any record matching specified SQL * - * @param Model $model Model to search + * @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 */ @@ -2769,7 +2749,8 @@ class DboSource extends DataSource { * Translates between PHP boolean values and Database (faked) boolean values * * @param mixed $data Value to be translated - * @return int Converted boolean value + * @param boolean $quote + * @return string|boolean Converted boolean value */ public function boolean($data, $quote = false) { if ($quote) { @@ -2784,6 +2765,7 @@ class DboSource extends DataSource { * @param string $table * @param string $fields * @param array $values + * @return boolean */ public function insertMulti($table, $fields, $values) { $table = $this->fullTableName($table); @@ -2814,7 +2796,7 @@ class DboSource extends DataSource { /** * Generate a database-native schema for the given Schema object * - * @param object $schema An instance of a subclass of CakeSchema + * @param Model $schema An instance of a subclass of CakeSchema * @param string $tableName Optional. If specified only the table name given will be generated. * Otherwise, all tables defined in the schema are generated. * @return string @@ -2863,9 +2845,10 @@ class DboSource extends DataSource { } /** - * Generate a alter syntax from CakeSchema::compare() + * Generate a alter syntax from CakeSchema::compare() * - * @param unknown_type $schema + * @param mixed $compare + * @param string $table * @return boolean */ public function alterSchema($compare, $table = null) { @@ -3011,8 +2994,7 @@ class DboSource extends DataSource { /** * Read additional table parameters * - * @param array $parameters - * @param string $table + * @param string $name * @return array */ public function readTableParameters($name) { @@ -3137,7 +3119,6 @@ class DboSource extends DataSource { /** * Used for storing in cache the results of the in-memory methodCache * - * @return void */ public function __destruct() { if ($this->_methodCacheChange) { diff --git a/lib/Cake/Model/Datasource/Session/CacheSession.php b/lib/Cake/Model/Datasource/Session/CacheSession.php index c9b96beee..6ef8b2a46 100644 --- a/lib/Cake/Model/Datasource/Session/CacheSession.php +++ b/lib/Cake/Model/Datasource/Session/CacheSession.php @@ -30,7 +30,6 @@ class CacheSession implements CakeSessionHandlerInterface { * Method called on open of a database session. * * @return boolean Success - * @access private */ public function open() { return true; @@ -40,7 +39,6 @@ class CacheSession implements CakeSessionHandlerInterface { * Method called on close of a database session. * * @return boolean Success - * @access private */ public function close() { $probability = mt_rand(1, 150); @@ -55,7 +53,6 @@ class CacheSession implements CakeSessionHandlerInterface { * * @param mixed $id The key of the value to read * @return mixed The value of the key or false if it does not exist - * @access private */ public function read($id) { return Cache::read($id, Configure::read('Session.handler.config')); @@ -67,7 +64,6 @@ class CacheSession implements CakeSessionHandlerInterface { * @param integer $id ID that uniquely identifies session in database * @param mixed $data The value of the data to be saved. * @return boolean True for successful write, false otherwise. - * @access private */ public function write($id, $data) { return Cache::write($id, $data, Configure::read('Session.handler.config')); @@ -78,7 +74,6 @@ class CacheSession implements CakeSessionHandlerInterface { * * @param integer $id ID that uniquely identifies session in database * @return boolean True for successful delete, false otherwise. - * @access private */ public function destroy($id) { return Cache::delete($id, Configure::read('Session.handler.config')); @@ -89,7 +84,6 @@ class CacheSession implements CakeSessionHandlerInterface { * * @param integer $expires Timestamp (defaults to current time) * @return boolean Success - * @access private */ public function gc($expires = null) { return Cache::gc(); diff --git a/lib/Cake/Model/Datasource/Session/DatabaseSession.php b/lib/Cake/Model/Datasource/Session/DatabaseSession.php index 1f1e750ec..e4045936b 100644 --- a/lib/Cake/Model/Datasource/Session/DatabaseSession.php +++ b/lib/Cake/Model/Datasource/Session/DatabaseSession.php @@ -27,11 +27,10 @@ class DatabaseSession implements CakeSessionHandlerInterface { * Constructor. Looks at Session configuration information and * sets up the session model. * - * @return void */ public function __construct() { $modelName = Configure::read('Session.handler.model'); - + if (empty($modelName)) { $settings = array( 'class' =>'Session', @@ -51,7 +50,6 @@ class DatabaseSession implements CakeSessionHandlerInterface { * Method called on open of a database session. * * @return boolean Success - * @access private */ public function open() { return true; @@ -61,7 +59,6 @@ class DatabaseSession implements CakeSessionHandlerInterface { * Method called on close of a database session. * * @return boolean Success - * @access private */ public function close() { $probability = mt_rand(1, 150); @@ -76,7 +73,6 @@ class DatabaseSession implements CakeSessionHandlerInterface { * * @param mixed $id The key of the value to read * @return mixed The value of the key or false if it does not exist - * @access private */ public function read($id) { $model = ClassRegistry::getObject('Session'); @@ -98,7 +94,6 @@ class DatabaseSession implements CakeSessionHandlerInterface { * @param integer $id ID that uniquely identifies session in database * @param mixed $data The value of the data to be saved. * @return boolean True for successful write, false otherwise. - * @access private */ public function write($id, $data) { if (!$id) { @@ -116,7 +111,6 @@ class DatabaseSession implements CakeSessionHandlerInterface { * * @param integer $id ID that uniquely identifies session in database * @return boolean True for successful delete, false otherwise. - * @access private */ public function destroy($id) { return ClassRegistry::getObject('Session')->delete($id); @@ -127,7 +121,6 @@ class DatabaseSession implements CakeSessionHandlerInterface { * * @param integer $expires Timestamp (defaults to current time) * @return boolean Success - * @access private */ public function gc($expires = null) { if (!$expires) { diff --git a/lib/Cake/Model/Model.php b/lib/Cake/Model/Model.php index 12a37d846..63e8f6c81 100644 --- a/lib/Cake/Model/Model.php +++ b/lib/Cake/Model/Model.php @@ -46,8 +46,10 @@ class Model extends Object { /** * The name of the DataSource connection that this Model uses * + * The value must be an attribute name that you defined in `app/Config/database.php` + * or created using `ConnectionManager::create()`. + * * @var string - * @access public * @link http://book.cakephp.org/view/1057/Model-Attributes#useDbConfig-1058 */ public $useDbConfig = 'default'; @@ -56,7 +58,6 @@ class Model extends Object { * Custom database table name, or null/false if no table association is desired. * * @var string - * @access public * @link http://book.cakephp.org/view/1057/Model-Attributes#useTable-1059 */ public $useTable = null; @@ -64,8 +65,9 @@ class Model extends Object { /** * Custom display field name. Display fields are used by Scaffold, in SELECT boxes' OPTION elements. * + * This field is also used in `find('list')` when called with no extra parameters in the fields list + * * @var string - * @access public * @link http://book.cakephp.org/view/1057/Model-Attributes#displayField-1062 */ public $displayField = null; @@ -75,7 +77,6 @@ class Model extends Object { * Automatically set after database insertions. * * @var mixed - * @access public */ public $id = false; @@ -83,7 +84,6 @@ class Model extends Object { * Container for the data that this model gets from persistent storage (usually, a database). * * @var array - * @access public * @link http://book.cakephp.org/view/1057/Model-Attributes#data-1065 */ public $data = array(); @@ -92,7 +92,6 @@ class Model extends Object { * Table name for this Model. * * @var string - * @access public */ public $table = false; @@ -100,7 +99,6 @@ class Model extends Object { * The name of the primary key field for this model. * * @var string - * @access public * @link http://book.cakephp.org/view/1057/Model-Attributes#primaryKey-1061 */ public $primaryKey = null; @@ -109,17 +107,98 @@ class Model extends Object { * Field-by-field table metadata. * * @var array - * @access protected * @link http://book.cakephp.org/view/1057/Model-Attributes#_schema-1066 */ protected $_schema = null; /** - * List of validation rules. Append entries for validation as ('field_name' => '/^perl_compat_regexp$/') - * that have to match with preg_match(). Use these rules with Model::validate() + * List of validation rules. It must be an array with the field name as key and using + * as value one of the following possibilities + * + * ### Validating using regular expressions + * + * {{{ + * public $validate = array( + * 'name' => '/^[a-z].+$/i' + * ); + * }}} + * + * ### Validating using methods (no parameters) + * + * {{{ + * public $validate = array( + * 'name' => 'notEmpty' + * ); + * }}} + * + * ### Validating using methods (with parameters) + * + * {{{ + * public $validate = array( + * 'age' => array( + * 'rule' => array('between', 5, 25) + * ) + * ); + * }}} + * + * ### Validating using custom method + * + * {{{ + * public $validate = array( + * 'password' => array( + * 'rule' => array('customValidation') + * ) + * ); + * public function customValidation($data) { + * // $data will contain array('password' => 'value') + * if (isset($this->data[$this->alias]['password2'])) { + * return $this->data[$this->alias]['password2'] === current($data); + * } + * return true; + * } + * }}} + * + * ### Validations with messages + * + * The messages will be used in Model::$validationErrors and can be used in the FormHelper + * + * {{{ + * public $validate = array( + * 'age' => array( + * 'rule' => array('between', 5, 25), + * 'message' => array('The age must be between %d and %d.') + * ) + * ); + * }}} + * + * ### Multiple validations to the same field + * + * {{{ + * public $validate = array( + * 'login' => array( + * array( + * 'role' => 'alphaNumeric', + * 'message' => 'Only alphabets and numbers allowed', + * 'last' => true + * ), + * array( + * 'role' => array('minLength', 8), + * 'message' => array('Minimum length of %d characters') + * ) + * ) + * ); + * }}} + * + * ### Valid keys in validations + * + * - `role`: String with method name, regular expression (started by slash) or array with method and parameters + * - `message`: String with the message or array if have multiple parameters. See http://php.net/sprintf + * - `last`: Boolean value to indicate if continue validating the others rules if the current fail [Default: true] + * - `required`: Boolean value to indicate if the field must be present on save + * - `allowEmpty`: Boolean value to indicate if the field can be empty + * - `on`: Possible values: `update`, `create`. Indicate to apply this rule only on update or create * * @var array - * @access public * @link http://book.cakephp.org/view/1057/Model-Attributes#validate-1067 * @link http://book.cakephp.org/view/1143/Data-Validation */ @@ -129,7 +208,6 @@ class Model extends Object { * List of validation errors. * * @var array - * @access public * @link http://book.cakephp.org/view/1182/Validating-Data-from-the-Controller */ public $validationErrors = array(); @@ -139,7 +217,6 @@ class Model extends Object { * Name of the validation string domain to use when translating validation errors. * * @var string - * @access public */ public $validationDomain = null; @@ -147,7 +224,6 @@ class Model extends Object { * Database table prefix for tables in model. * * @var string - * @access public * @link http://book.cakephp.org/view/1057/Model-Attributes#tablePrefix-1060 */ public $tablePrefix = null; @@ -156,7 +232,6 @@ class Model extends Object { * Name of the model. * * @var string - * @access public * @link http://book.cakephp.org/view/1057/Model-Attributes#name-1068 */ public $name = null; @@ -165,7 +240,6 @@ class Model extends Object { * Alias name for model. * * @var string - * @access public */ public $alias = null; @@ -173,7 +247,6 @@ class Model extends Object { * List of table names included in the model description. Used for associations. * * @var array - * @access public */ public $tableToModel = array(); @@ -182,7 +255,6 @@ class Model extends Object { * caching only, the results are not stored beyond the current request. * * @var boolean - * @access public * @link http://book.cakephp.org/view/1057/Model-Attributes#cacheQueries-1069 */ public $cacheQueries = false; @@ -190,8 +262,46 @@ class Model extends Object { /** * Detailed list of belongsTo associations. * + * ### Basic usage + * + * `public $belongsTo = array('Group', 'Department');` + * + * ### Detailed configuration + * + * {{{ + * public $belongsTo = array( + * 'Group', + * 'Department' => array( + * 'className' => 'Department', + * 'foreignKey' => 'department_id' + * ) + * ); + * }}} + * + * ### Possible keys in association + * + * - `className`: the classname of the model being associated to the current model. + * If you’re defining a ‘Profile belongsTo User’ relationship, the className key should equal ‘User.’ + * - `foreignKey`: the name of the foreign key found in the current model. This is + * especially handy if you need to define multiple belongsTo relationships. The default + * value for this key is the underscored, singular name of the other model, suffixed with ‘_id’. + * - `conditions`: An SQL fragment used to filter related model records. It’s good + * practice to use model names in SQL fragments: “User.active = 1” is always + * better than just “active = 1.” + * - `type`: the type of the join to use in the SQL query, default is LEFT which + * may not fit your needs in all situations, INNER may be helpful when you want + * everything from your main and associated models or nothing at all!(effective + * when used with some conditions of course). (NB: type value is in lower case - i.e. left, inner) + * - `fields`: A list of fields to be retrieved when the associated model data is + * fetched. Returns all fields by default. + * - `order`: An SQL fragment that defines the sorting order for the returned associated rows. + * - `counterCache`: If set to true the associated Model will automatically increase or + * decrease the “[singular_model_name]_count” field in the foreign table whenever you do + * a save() or delete(). If its a string then its the field name to use. The value in the + * counter field represents the number of related rows. + * - `counterScope`: Optional conditions array to use for updating counter cache field. + * * @var array - * @access public * @link http://book.cakephp.org/view/1042/belongsTo */ public $belongsTo = array(); @@ -199,8 +309,42 @@ class Model extends Object { /** * Detailed list of hasOne associations. * + * ### Basic usage + * + * `public $hasOne = array('Profile', 'Address');` + * + * ### Detailed configuration + * + * {{{ + * public $hasOne = array( + * 'Profile', + * 'Address' => array( + * 'className' => 'Address', + * 'foreignKey' => 'user_id' + * ) + * ); + * }}} + * + * ### Possible keys in association + * + * - `className`: the classname of the model being associated to the current model. + * If you’re defining a ‘User hasOne Profile’ relationship, the className key should equal ‘Profile.’ + * - `foreignKey`: the name of the foreign key found in the other model. This is + * especially handy if you need to define multiple hasOne relationships. + * The default value for this key is the underscored, singular name of the + * current model, suffixed with ‘_id’. In the example above it would default to 'user_id'. + * - `conditions`: An SQL fragment used to filter related model records. It’s good + * practice to use model names in SQL fragments: “Profile.approved = 1” is + * always better than just “approved = 1.” + * - `fields`: A list of fields to be retrieved when the associated model data is + * fetched. Returns all fields by default. + * - `order`: An SQL fragment that defines the sorting order for the returned associated rows. + * - `dependent`: When the dependent key is set to true, and the model’s delete() + * method is called with the cascade parameter set to true, associated model + * records are also deleted. In this case we set it true so that deleting a + * User will also delete her associated Profile. + * * @var array - * @access public * @link http://book.cakephp.org/view/1041/hasOne */ public $hasOne = array(); @@ -208,8 +352,48 @@ class Model extends Object { /** * Detailed list of hasMany associations. * + * ### Basic usage + * + * `public $hasMany = array('Comment', 'Task');` + * + * ### Detailed configuration + * + * {{{ + * public $hasMany = array( + * 'Comment', + * 'Task' => array( + * 'className' => 'Task', + * 'foreignKey' => 'user_id' + * ) + * ); + * }}} + * + * ### Possible keys in association + * + * - `className`: the classname of the model being associated to the current model. + * If you’re defining a ‘User hasMany Comment’ relationship, the className key should equal ‘Comment.’ + * - `foreignKey`: the name of the foreign key found in the other model. This is + * especially handy if you need to define multiple hasMany relationships. The default + * value for this key is the underscored, singular name of the actual model, suffixed with ‘_id’. + * - `conditions`: An SQL fragment used to filter related model records. It’s good + * practice to use model names in SQL fragments: “Comment.status = 1” is always + * better than just “status = 1.” + * - `fields`: A list of fields to be retrieved when the associated model data is + * fetched. Returns all fields by default. + * - `order`: An SQL fragment that defines the sorting order for the returned associated rows. + * - `limit`: The maximum number of associated rows you want returned. + * - `offset`: The number of associated rows to skip over (given the current + * conditions and order) before fetching and associating. + * - `dependent`: When dependent is set to true, recursive model deletion is + * possible. In this example, Comment records will be deleted when their + * associated User record has been deleted. + * - `exclusive`: When exclusive is set to true, recursive model deletion does + * the delete with a deleteAll() call, instead of deleting each entity separately. + * This greatly improves performance, but may not be ideal for all circumstances. + * - `finderQuery`: A complete SQL query CakePHP can use to fetch associated model + * records. This should be used in situations that require very custom results. + * * @var array - * @access public * @link http://book.cakephp.org/view/1043/hasMany */ public $hasMany = array(); @@ -217,8 +401,59 @@ class Model extends Object { /** * Detailed list of hasAndBelongsToMany associations. * + * ### Basic usage + * + * `public $hasAndBelongsToMany = array('Role', 'Address');` + * + * ### Detailed configuration + * + * {{{ + * public $hasAndBelongsToMany = array( + * 'Role', + * 'Address' => array( + * 'className' => 'Address', + * 'foreignKey' => 'user_id', + * 'associationForeignKey' => 'address_id', + * 'joinTable' => 'addresses_users' + * ) + * ); + * }}} + * + * ### Possible keys in association + * + * - `className`: the classname of the model being associated to the current model. + * If you're defining a ‘Recipe HABTM Tag' relationship, the className key should equal ‘Tag.' + * - `joinTable`: The name of the join table used in this association (if the + * current table doesn't adhere to the naming convention for HABTM join tables). + * - `with`: Defines the name of the model for the join table. By default CakePHP + * will auto-create a model for you. Using the example above it would be called + * RecipesTag. By using this key you can override this default name. The join + * table model can be used just like any "regular" model to access the join table directly. + * - `foreignKey`: the name of the foreign key found in the current model. + * This is especially handy if you need to define multiple HABTM relationships. + * The default value for this key is the underscored, singular name of the + * current model, suffixed with ‘_id'. + * - `associationForeignKey`: the name of the foreign key found in the other model. + * This is especially handy if you need to define multiple HABTM relationships. + * The default value for this key is the underscored, singular name of the other + * model, suffixed with ‘_id'. + * - `unique`: If true (default value) cake will first delete existing relationship + * records in the foreign keys table before inserting new ones, when updating a + * record. So existing associations need to be passed again when updating. + * - `conditions`: An SQL fragment used to filter related model records. It's good + * practice to use model names in SQL fragments: "Comment.status = 1" is always + * better than just "status = 1." + * - `fields`: A list of fields to be retrieved when the associated model data is + * fetched. Returns all fields by default. + * - `order`: An SQL fragment that defines the sorting order for the returned associated rows. + * - `limit`: The maximum number of associated rows you want returned. + * - `offset`: The number of associated rows to skip over (given the current + * conditions and order) before fetching and associating. + * - `finderQuery`, `deleteQuery`, `insertQuery`: A complete SQL query CakePHP + * can use to fetch, delete, or create new associated model records. This should + * be used in situations that require very custom results. + * * @var array - * @access public * @link http://book.cakephp.org/view/1044/hasAndBelongsToMany-HABTM */ public $hasAndBelongsToMany = array(); @@ -230,7 +465,6 @@ class Model extends Object { * public $actsAs = array('Translate', 'MyBehavior' => array('setting1' => 'value1')) * * @var array - * @access public * @link http://book.cakephp.org/view/1072/Using-Behaviors */ public $actsAs = null; @@ -239,7 +473,6 @@ class Model extends Object { * Holds the Behavior objects currently bound to this model. * * @var BehaviorCollection - * @access public */ public $Behaviors = null; @@ -247,7 +480,6 @@ class Model extends Object { * Whitelist of fields allowed to be saved. * * @var array - * @access public */ public $whitelist = array(); @@ -255,7 +487,6 @@ class Model extends Object { * Whether or not to cache sources for this model. * * @var boolean - * @access public */ public $cacheSources = true; @@ -263,7 +494,6 @@ class Model extends Object { * Type of find query currently executing. * * @var string - * @access public */ public $findQueryType = null; @@ -272,7 +502,6 @@ class Model extends Object { * the first level by default. * * @var integer - * @access public * @link http://book.cakephp.org/view/1057/Model-Attributes#recursive-1063 */ public $recursive = 1; @@ -284,7 +513,6 @@ class Model extends Object { * public $order = array("Post.view_count DESC", "Post.rating DESC"); * * @var string - * @access public * @link http://book.cakephp.org/view/1057/Model-Attributes#order-1064 */ public $order = null; @@ -299,7 +527,6 @@ class Model extends Object { * Is a simplistic example of how to set virtualFields * * @var array - * @access public */ public $virtualFields = array(); @@ -307,9 +534,8 @@ class Model extends Object { * Default list of association keys. * * @var array - * @access private */ - private $__associationKeys = array( + protected $_associationKeys = array( 'belongsTo' => array('className', 'foreignKey', 'conditions', 'fields', 'order', 'counterCache'), 'hasOne' => array('className', 'foreignKey','conditions', 'fields','order', 'dependent'), 'hasMany' => array('className', 'foreignKey', 'conditions', 'fields', 'order', 'limit', 'offset', 'dependent', 'exclusive', 'finderQuery', 'counterQuery'), @@ -320,31 +546,43 @@ class Model extends Object { * Holds provided/generated association key names and other data for all associations. * * @var array - * @access private */ - private $__associations = array('belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany'); + protected $_associations = array('belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany'); /** * Holds model associations temporarily to allow for dynamic (un)binding. * * @var array - * @access private */ public $__backAssociation = array(); +/** + * Back inner association + * + * @var array + */ public $__backInnerAssociation = array(); +/** + * Back original association + * + * @var array + */ public $__backOriginalAssociation = array(); +/** + * Back containable association + * + * @var array + */ public $__backContainableAssociation = array(); /** * The ID of the model record that was last inserted. * * @var integer - * @access private */ - private $__insertID = null; + protected $_insertID = null; /** * Has the datasource been configured. @@ -352,13 +590,12 @@ class Model extends Object { * @var boolean * @see Model::getDataSource */ - private $__sourceConfigured = false; + protected $_sourceConfigured = false; /** * List of valid finder method options, supplied as the first parameter to find(). * * @var array - * @access public */ public $findMethods = array( 'all' => true, 'first' => true, 'count' => true, @@ -464,7 +701,7 @@ class Model extends Object { } elseif ($this->table === false) { $this->table = Inflector::tableize($this->name); } - $this->__createLinks(); + $this->_createLinks(); $this->Behaviors->init($this->alias, $this->actsAs); } @@ -494,7 +731,7 @@ class Model extends Object { public function __isset($name) { $className = false; - foreach ($this->__associations as $type) { + foreach ($this->_associations as $type) { if (isset($name, $this->{$type}[$name])) { $className = empty($this->{$type}[$name]['className']) ? $name : $this->{$type}[$name]['className']; break; @@ -535,7 +772,7 @@ class Model extends Object { 'ds' => $this->useDbConfig )); } else { - $this->__constructLinkedModel($name, $className, $plugin); + $this->_constructLinkedModel($name, $className, $plugin); } if (!empty($assocKey)) { @@ -580,7 +817,6 @@ class Model extends Object { * @param array $params Set of bindings (indexed by binding type) * @param boolean $reset Set to false to make the binding permanent * @return boolean Success - * @access public * @link http://book.cakephp.org/view/1045/Creating-and-Destroying-Associations-on-the-Fly */ public function bindModel($params, $reset = true) { @@ -605,7 +841,7 @@ class Model extends Object { } } } - $this->__createLinks(); + $this->_createLinks(); return true; } @@ -625,7 +861,6 @@ class Model extends Object { * @param array $params Set of bindings to unbind (indexed by binding type) * @param boolean $reset Set to false to make the unbinding permanent * @return boolean Success - * @access public * @link http://book.cakephp.org/view/1045/Creating-and-Destroying-Associations-on-the-Fly */ public function unbindModel($params, $reset = true) { @@ -647,10 +882,9 @@ class Model extends Object { * Create a set of associations. * * @return void - * @access private */ - private function __createLinks() { - foreach ($this->__associations as $type) { + protected function _createLinks() { + foreach ($this->_associations as $type) { if (!is_array($this->{$type})) { $this->{$type} = explode(',', $this->{$type}); @@ -676,14 +910,14 @@ class Model extends Object { $this->{$type}[$assoc] = array('className' => $plugin. '.' . $assoc); } } - $this->__generateAssociation($type, $assoc); + $this->_generateAssociation($type, $assoc); } } } } /** - * Private helper method to create associated models of a given class. + * Protected helper method to create associated models of a given class. * * @param string $assoc Association name * @param string $className Class name @@ -694,9 +928,8 @@ class Model extends Object { * public $hasMany = array('ModelName'); * usage: $this->ModelName->modelMethods(); * @return void - * @access private */ - private function __constructLinkedModel($assoc, $className = null, $plugin = null) { + protected function _constructLinkedModel($assoc, $className = null, $plugin = null) { if (empty($className)) { $className = $assoc; } @@ -722,13 +955,12 @@ class Model extends Object { * @param string $type 'belongsTo', 'hasOne', 'hasMany', 'hasAndBelongsToMany' * @param string $assocKey * @return void - * @access private */ - private function __generateAssociation($type, $assocKey) { + protected function _generateAssociation($type, $assocKey) { $class = $assocKey; $dynamicWith = false; - foreach ($this->__associationKeys[$type] as $key) { + foreach ($this->_associationKeys[$type] as $key) { if (!isset($this->{$type}[$assocKey][$key]) || $this->{$type}[$assocKey][$key] === null) { $data = ''; @@ -814,7 +1046,6 @@ class Model extends Object { * @param mixed $one Array or string of data * @param string $two Value string for the alternative indata method * @return array Data with all of $one's keys and values - * @access public * @link http://book.cakephp.org/view/1031/Saving-Your-Data */ public function set($one, $two = null) { @@ -1082,7 +1313,7 @@ class Model extends Object { /** * Returns true if the supplied field is a model Virtual Field * - * @param mixed $name Name of field to look for + * @param string $field Name of field to look for * @return boolean indicating whether the field exists as a model virtual field. */ public function isVirtualField($field) { @@ -1104,7 +1335,7 @@ class Model extends Object { /** * Returns the expression for a model virtual field * - * @param mixed $name Name of field to look for + * @param string $field Name of field to look for * @return mixed If $field is string expression bound to virtual field $field * If $field is null, returns an array of all model virtual fields * or false if none $field exist. @@ -1131,7 +1362,6 @@ class Model extends Object { * schema data defaults are not merged. * @param boolean $filterKey If true, overwrites any primary key input with an empty value * @return array The current Model::data; after merging $data and/or defaults from database - * @access public * @link http://book.cakephp.org/view/1031/Saving-Your-Data */ public function create($data = array(), $filterKey = false) { @@ -1162,7 +1392,6 @@ class Model extends Object { * @param mixed $fields String of single fieldname, or an array of fieldnames. * @param mixed $id The ID of the record to read * @return array Array of database fields, or false if not found - * @access public * @link http://book.cakephp.org/view/1017/Retrieving-Your-Data#read-1029 */ public function read($fields = null, $id = null) { @@ -1197,7 +1426,6 @@ class Model extends Object { * @param array $conditions SQL conditions (defaults to NULL) * @param string $order SQL ORDER BY fragment * @return string field contents, or false if not found - * @access public * @link http://book.cakephp.org/view/1017/Retrieving-Your-Data#field-1028 */ public function field($name, $conditions = null, $order = null) { @@ -1237,7 +1465,6 @@ class Model extends Object { * @param mixed $value Value of the field * @param array $validate See $options param in Model::save(). Does not respect 'fieldList' key if passed * @return boolean See Model::save() - * @access public * @see Model::save() * @link http://book.cakephp.org/view/1031/Saving-Your-Data */ @@ -1263,7 +1490,6 @@ class Model extends Object { * If an array, allows control of validate, callbacks, and fieldList * @param array $fieldList List of fields to allow to be written * @return mixed On success Model::$data if its not empty or true, false on failure - * @access public * @link http://book.cakephp.org/view/1031/Saving-Your-Data */ public function save($data = null, $validate = true, $fieldList = array()) { @@ -1408,7 +1634,7 @@ class Model extends Object { } if (!empty($joined) && $success === true) { - $this->__saveMulti($joined, $this->id, $db); + $this->_saveMulti($joined, $this->id, $db); } if ($success && $count > 0) { @@ -1438,9 +1664,10 @@ class Model extends Object { * * @param array $joined Data to save * @param mixed $id ID of record in this model - * @access private + * @param DataSource $db + * @return void */ - private function __saveMulti($joined, $id, $db) { + protected function _saveMulti($joined, $id, $db) { foreach ($joined as $assoc => $data) { if (isset($this->hasAndBelongsToMany[$assoc])) { @@ -1638,7 +1865,6 @@ class Model extends Object { * @return mixed If atomic: True on success, or false on failure. * Otherwise: array similar to the $data array passed, but values are set to true/false * depending on whether each record saved successfully. - * @access public * @link http://book.cakephp.org/view/1032/Saving-Related-Model-Data-hasOne-hasMany-belongsTo * @link http://book.cakephp.org/view/1031/Saving-Your-Data */ @@ -1676,7 +1902,6 @@ class Model extends Object { * @return mixed If atomic: True on success, or false on failure. * Otherwise: array similar to the $data array passed, but values are set to true/false * depending on whether each record saved successfully. - * @access public */ public function saveMany($data = null, $options = array()) { if (empty($data)) { @@ -1744,7 +1969,6 @@ class Model extends Object { * @return mixed If atomic: True on success, or false on failure. * Otherwise: array similar to the $data array passed, but values are set to true/false * depending on whether each record validated successfully. - * @access public */ public function validateMany($data, $options = array()) { $options = array_merge(array('atomic' => true), $options); @@ -1782,7 +2006,6 @@ class Model extends Object { * @return mixed If atomic: True on success, or false on failure. * Otherwise: array similar to the $data array passed, but values are set to true/false * depending on whether each record saved successfully. - * @access public */ public function saveAssociated($data = null, $options = array()) { if (empty($data)) { @@ -1885,11 +2108,10 @@ class Model extends Object { * - fieldList: Equivalent to the $fieldList parameter in Model::save() * * @param array $data Record data to validate. This should be an array indexed by association name. - * @param array Options to use when validating record data (see above), See also $options of validates(). - * @return mixed If atomic: True on success, or false on failure. + * @param array $options Options to use when validating record data (see above), See also $options of validates(). + * @return array|boolean If atomic: True on success, or false on failure. * Otherwise: array similar to the $data array passed, but values are set to true/false * depending on whether each record validated successfully. - * @access public */ public function validateAssociated($data, $options = array()) { $options = array_merge(array('atomic' => true), $options); @@ -1937,7 +2159,6 @@ class Model extends Object { * Fields are treated as SQL snippets, to insert literal values manually escape your data. * @param mixed $conditions Conditions to match, true for all records * @return boolean True on success, false on failure - * @access public * @link http://book.cakephp.org/view/1031/Saving-Your-Data */ public function updateAll($fields, $conditions = true) { @@ -1950,7 +2171,6 @@ class Model extends Object { * @param mixed $id ID of record to delete * @param boolean $cascade Set to true to delete records that depend on this record * @return boolean True on success - * @access public * @link http://book.cakephp.org/view/1036/delete */ public function delete($id = null, $cascade = true) { @@ -1984,7 +2204,7 @@ class Model extends Object { } $keys = $this->find('first', array( - 'fields' => $this->__collectForeignKeys(), + 'fields' => $this->_collectForeignKeys(), 'conditions' => array($this->alias . '.' . $this->primaryKey => $id), 'recursive' => -1, 'callbacks' => false @@ -2077,7 +2297,6 @@ class Model extends Object { * @param boolean $cascade Set to true to delete records that depend on this record * @param boolean $callbacks Run callbacks * @return boolean True on success, false on failure - * @access public * @link http://book.cakephp.org/view/1038/deleteAll */ public function deleteAll($conditions, $cascade = true, $callbacks = false) { @@ -2125,10 +2344,10 @@ class Model extends Object { /** * Collects foreign keys from associations. * + * @param string $type * @return array - * @access private */ - private function __collectForeignKeys($type = 'belongsTo') { + protected function _collectForeignKeys($type = 'belongsTo') { $result = array(); foreach ($this->{$type} as $assoc => $data) { @@ -2308,7 +2527,7 @@ class Model extends Object { * * @param string $state Either "before" or "after" * @param array $query - * @param array $data + * @param array $results * @return array * @see Model::find() */ @@ -2329,8 +2548,8 @@ class Model extends Object { * * @param string $state Either "before" or "after" * @param array $query - * @param array $data - * @return int The number of records found, or false + * @param array $results + * @return integer The number of records found, or false * @see Model::find() */ protected function _findCount($state, $query, $results = array()) { @@ -2364,7 +2583,7 @@ class Model extends Object { * * @param string $state Either "before" or "after" * @param array $query - * @param array $data + * @param array $results * @return array Key/value pairs of primary keys/display field values of all records found * @see Model::find() */ @@ -2523,7 +2742,7 @@ class Model extends Object { /** * Passes query results through model and behavior afterFilter() methods. * - * @param array Results to filter + * @param array $results Results to filter * @param boolean $primary If this is the primary model results (results from model where the find operation was performed) * @return array Set of filtered results */ @@ -2548,7 +2767,7 @@ class Model extends Object { */ public function resetAssociations() { if (!empty($this->__backAssociation)) { - foreach ($this->__associations as $type) { + foreach ($this->_associations as $type) { if (isset($this->__backAssociation[$type])) { $this->{$type} = $this->__backAssociation[$type]; } @@ -2556,7 +2775,7 @@ class Model extends Object { $this->__backAssociation = array(); } - foreach ($this->__associations as $type) { + foreach ($this->_associations as $type) { foreach ($this->{$type} as $key => $name) { if (property_exists($this, $key) && !empty($this->{$key}->__backAssociation)) { $this->{$key}->resetAssociations(); @@ -2612,12 +2831,11 @@ class Model extends Object { /** * Returns a resultset for a given SQL statement. Custom SQL queries should be performed with this method. * - * @param string $sql SQL statement + * @param string $sql,... SQL statement * @return array Resultset - * @access public * @link http://book.cakephp.org/view/1027/query */ - public function query() { + public function query($sql) { $params = func_get_args(); $db = $this->getDataSource(); return call_user_func_array(array(&$db, 'query'), $params); @@ -2625,19 +2843,18 @@ class Model extends Object { /** * Returns true if all fields pass validation. Will validate hasAndBelongsToMany associations - * that use the 'with' key as well. Since __saveMulti is incapable of exiting a save operation. + * that use the 'with' key as well. Since _saveMulti is incapable of exiting a save operation. * * Will validate the currently set data. Use Model::set() or Model::create() to set the active data. * * @param string $options An optional array of custom options to be made available in the beforeValidate callback * @return boolean True if there are no errors - * @access public * @link http://book.cakephp.org/view/1182/Validating-Data-from-the-Controller */ public function validates($options = array()) { $errors = $this->invalidFields($options); if (empty($errors) && $errors !== false) { - $errors = $this->__validateWithModels($options); + $errors = $this->_validateWithModels($options); } if (is_array($errors)) { return count($errors) === 0; @@ -2651,7 +2868,6 @@ class Model extends Object { * @param string $options An optional array of custom options to be made available in the beforeValidate callback * @return array Array of invalid fields * @see Model::validates() - * @access public * @link http://book.cakephp.org/view/1182/Validating-Data-from-the-Controller */ public function invalidFields($options = array()) { @@ -2814,10 +3030,9 @@ class Model extends Object { * * @param array $options Array of options to use on Valdation of with models * @return boolean Failure of validation on with models. - * @access private * @see Model::validates() */ - private function __validateWithModels($options) { + protected function _validateWithModels($options) { $valid = true; foreach ($this->hasAndBelongsToMany as $assoc => $association) { if (empty($association['with']) || !isset($this->data[$assoc])) { @@ -2852,6 +3067,7 @@ class Model extends Object { * @param string $field The name of the field to invalidate * @param mixed $value Name of validation rule that was not failed, or validation message to * be returned. If no validation key is provided, defaults to true. + * @return void */ public function invalidate($field, $value = true) { if (!is_array($this->validationErrors)) { @@ -2945,22 +3161,23 @@ class Model extends Object { * @return mixed Last inserted ID */ public function getInsertID() { - return $this->__insertID; + return $this->_insertID; } /** * Sets the ID of the last record this model inserted * - * @param mixed Last inserted ID + * @param mixed $id Last inserted ID + * @return void */ public function setInsertID($id) { - $this->__insertID = $id; + $this->_insertID = $id; } /** * Returns the number of rows returned from the last query. * - * @return int Number of rows + * @return integer Number of rows */ public function getNumRows() { return $this->getDataSource()->lastNumRows(); @@ -2969,7 +3186,7 @@ class Model extends Object { /** * Returns the number of rows affected by the last query. * - * @return int Number of rows + * @return integer Number of rows */ public function getAffectedRows() { return $this->getDataSource()->lastAffected(); @@ -2980,6 +3197,7 @@ class Model extends Object { * * @param string $dataSource The name of the DataSource, as defined in app/Config/database.php * @return boolean True on success + * @throws MissingConnectionException */ public function setDataSource($dataSource = null) { $oldConfig = $this->useDbConfig; @@ -3006,11 +3224,11 @@ class Model extends Object { /** * Gets the DataSource to which this model is bound. * - * @return object A DataSource object + * @return DataSource A DataSource object */ public function getDataSource() { - if (!$this->__sourceConfigured && $this->useTable !== false) { - $this->__sourceConfigured = true; + if (!$this->_sourceConfigured && $this->useTable !== false) { + $this->_sourceConfigured = true; $this->setSource($this->useTable); } return ConnectionManager::getDataSource($this->useDbConfig); @@ -3022,7 +3240,7 @@ class Model extends Object { * @return array */ public function associations() { - return $this->__associations; + return $this->_associations; } /** @@ -3034,7 +3252,7 @@ class Model extends Object { public function getAssociated($type = null) { if ($type == null) { $associated = array(); - foreach ($this->__associations as $assoc) { + foreach ($this->_associations as $assoc) { if (!empty($this->{$assoc})) { $models = array_keys($this->{$assoc}); foreach ($models as $m) { @@ -3043,7 +3261,7 @@ class Model extends Object { } } return $associated; - } elseif (in_array($type, $this->__associations)) { + } elseif (in_array($type, $this->_associations)) { if (empty($this->{$type})) { return array(); } @@ -3056,7 +3274,7 @@ class Model extends Object { $this->hasAndBelongsToMany ); if (array_key_exists($type, $assoc)) { - foreach ($this->__associations as $a) { + foreach ($this->_associations as $a) { if (isset($this->{$a}[$type])) { $assoc[$type]['association'] = $a; break; @@ -3072,8 +3290,7 @@ class Model extends Object { * Gets the name and fields to be used by a join model. This allows specifying join fields * in the association definition. * - * @param object $model The model to be joined - * @param mixed $with The 'with' key of the model association + * @param string|array $assoc The model to be joined * @param array $keys Any join keys which must be merged with the keys queried * @return array */ @@ -3098,7 +3315,6 @@ class Model extends Object { * @param array $queryData Data used to execute this query, i.e. conditions, order, etc. * @return mixed true if the operation should continue, false if it should abort; or, modified * $queryData to continue with new $queryData - * @access public * @link http://book.cakephp.org/view/1048/Callback-Methods#beforeFind-1049 */ public function beforeFind($queryData) { @@ -3112,7 +3328,6 @@ class Model extends Object { * @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) * @return mixed Result of the find operation - * @access public * @link http://book.cakephp.org/view/1048/Callback-Methods#afterFind-1050 */ public function afterFind($results, $primary = false) { @@ -3123,8 +3338,8 @@ class Model extends Object { * Called before each save operation, after validation. Return a non-true result * to halt the save. * + * @param array $options * @return boolean True if the operation should continue, false if it should abort - * @access public * @link http://book.cakephp.org/view/1048/Callback-Methods#beforeSave-1052 */ public function beforeSave($options = array()) { @@ -3135,7 +3350,7 @@ class Model extends Object { * Called after each successful save operation. * * @param boolean $created True if this save created a new record - * @access public + * @return void * @link http://book.cakephp.org/view/1048/Callback-Methods#afterSave-1053 */ public function afterSave($created) { @@ -3146,7 +3361,6 @@ class Model extends Object { * * @param boolean $cascade If true records that depend on this record will also be deleted * @return boolean True if the operation should continue, false if it should abort - * @access public * @link http://book.cakephp.org/view/1048/Callback-Methods#beforeDelete-1054 */ public function beforeDelete($cascade = true) { @@ -3156,7 +3370,7 @@ class Model extends Object { /** * Called after every deletion operation. * - * @access public + * @return void * @link http://book.cakephp.org/view/1048/Callback-Methods#afterDelete-1055 */ public function afterDelete() { @@ -3166,9 +3380,8 @@ class Model extends Object { * Called during validation operations, before validation. Please note that custom * validation rules can be defined in $validate. * + * @param array $options Options passed from model::save(), see $options of model::save(). * @return boolean True if validate operation should continue, false to abort - * @param $options array Options passed from model::save(), see $options of model::save(). - * @access public * @link http://book.cakephp.org/view/1048/Callback-Methods#beforeValidate-1051 */ public function beforeValidate($options = array()) { @@ -3178,19 +3391,18 @@ class Model extends Object { /** * Called when a DataSource-level error occurs. * - * @access public + * @return void * @link http://book.cakephp.org/view/1048/Callback-Methods#onError-1056 */ public function onError() { } /** - * Private method. Clears cache for this model. + * Clears cache for this model. * * @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 - * @access protected * @todo */ protected function _clearCache($type = null) { @@ -3198,7 +3410,7 @@ class Model extends Object { if (Configure::read('Cache.check') === true) { $assoc[] = strtolower(Inflector::pluralize($this->alias)); $assoc[] = strtolower(Inflector::underscore(Inflector::pluralize($this->alias))); - foreach ($this->__associations as $key => $association) { + foreach ($this->_associations as $key => $association) { foreach ($this->$association as $key => $className) { $check = strtolower(Inflector::pluralize($className['className'])); if (!in_array($check, $assoc)) { diff --git a/lib/Cake/Model/ModelBehavior.php b/lib/Cake/Model/ModelBehavior.php index be0cc0f67..ffe52a33a 100644 --- a/lib/Cake/Model/ModelBehavior.php +++ b/lib/Cake/Model/ModelBehavior.php @@ -47,7 +47,7 @@ * than a normal behavior mixin method. * * {{{ - * var $mapMethods = array('/do(\w+)/' => 'doSomething'); + * public $mapMethods = array('/do(\w+)/' => 'doSomething'); * * function doSomething($model, $method, $arg1, $arg2) { * //do something @@ -88,8 +88,9 @@ class ModelBehavior extends Object { /** * Setup this behavior with the specified configuration settings. * - * @param object $model Model using this behavior + * @param Model $model Model using this behavior * @param array $config Configuration settings for $model + * @return void */ public function setup($model, $config = array()) { } @@ -97,7 +98,8 @@ class ModelBehavior extends Object { * Clean up any initialization this behavior has done on a model. Called when a behavior is dynamically * detached from a model using Model::detach(). * - * @param object $model Model using this behavior + * @param Model $model Model using this behavior + * @return void * @see BehaviorCollection::detach() */ public function cleanup($model) { @@ -111,9 +113,9 @@ class ModelBehavior extends Object { * By returning null/false you can abort a find. By returning an array you can modify/replace the query * that is going to be run. * - * @param object $model Model using this behavior - * @param array $queryData Data used to execute this query, i.e. conditions, order, etc. - * @return mixed False or null will abort the operation. You can return an array to replace the + * @param Model $model Model using this behavior + * @param array $query Data used to execute this query, i.e. conditions, order, etc. + * @return boolean|array False or null will abort the operation. You can return an array to replace the * $query that will be eventually run. */ public function beforeFind($model, $query) { @@ -123,7 +125,7 @@ class ModelBehavior extends Object { /** * After find callback. Can be used to modify any results returned by find. * - * @param object $model Model using this behavior + * @param Model $model Model using this behavior * @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) * @return mixed An array value will replace the value of $results - any other value will be ignored. @@ -135,9 +137,8 @@ class ModelBehavior extends Object { * add behavior validation rules into a models validate array. Returning false * will allow you to make the validation fail. * - * @param object $model Model using this behavior + * @param Model $model Model using this behavior * @return mixed False or null will abort the operation. Any other result will continue. - * @access public */ public function beforeValidate($model) { return true; @@ -147,7 +148,7 @@ class ModelBehavior extends Object { * beforeSave is called before a model is saved. Returning false from a beforeSave callback * will abort the save operation. * - * @param object $model Model using this behavior + * @param Model $model Model using this behavior * @return mixed False if the operation should abort. Any other result will continue. */ public function beforeSave($model) { @@ -157,8 +158,9 @@ class ModelBehavior extends Object { /** * afterSave is called after a model is saved. * - * @param object $model Model using this behavior + * @param Model $model Model using this behavior * @param boolean $created True if this save created a new record + * @return boolean */ public function afterSave($model, $created) { return true; @@ -168,10 +170,9 @@ class ModelBehavior extends Object { * Before delete is called before any delete occurs on the attached model, but after the model's * beforeDelete is called. Returning false from a beforeDelete will abort the delete. * - * @param object $model Model using this behavior + * @param Model $model Model using this behavior * @param boolean $cascade If true records that depend on this record will also be deleted * @return mixed False if the operation should abort. Any other result will continue. - * @access public */ public function beforeDelete($model, $cascade = true) { return true; @@ -180,15 +181,17 @@ class ModelBehavior extends Object { /** * After delete is called after any delete occurs on the attached model. * - * @param object $model Model using this behavior + * @param Model $model Model using this behavior + * @return void */ public function afterDelete($model) { } /** * DataSource error callback * - * @param object $model Model using this behavior + * @param Model $model Model using this behavior * @param string $error Error generated in DataSource + * @return void */ public function onError($model, $error) { } @@ -198,7 +201,7 @@ class ModelBehavior extends Object { * that it only modifies the whitelist for the current save operation. Also make sure * you explicitly set the value of the field which you are allowing. * - * @param object $model Model using this behavior + * @param Model $model Model using this behavior * @param string $field Field to be added to $model's whitelist * @return void */ diff --git a/lib/Cake/Model/Permission.php b/lib/Cake/Model/Permission.php index ab3e7f004..4ef5e93c0 100644 --- a/lib/Cake/Model/Permission.php +++ b/lib/Cake/Model/Permission.php @@ -34,7 +34,6 @@ class Permission extends AppModel { * Model name * * @var string - * @access public */ public $name = 'Permission'; @@ -42,7 +41,6 @@ class Permission extends AppModel { * Explicitly disable in-memory query caching * * @var boolean - * @access public */ public $cacheQueries = false; @@ -50,7 +48,6 @@ class Permission extends AppModel { * Override default table name * * @var string - * @access public */ public $useTable = 'aros_acos'; @@ -58,7 +55,6 @@ class Permission extends AppModel { * Permissions link AROs with ACOs * * @var array - * @access public */ public $belongsTo = array('Aro', 'Aco'); @@ -66,7 +62,6 @@ class Permission extends AppModel { * No behaviors for this model * * @var array - * @access public */ public $actsAs = null; diff --git a/lib/Cake/Network/CakeRequest.php b/lib/Cake/Network/CakeRequest.php index 9a784a628..bcad005f7 100644 --- a/lib/Cake/Network/CakeRequest.php +++ b/lib/Cake/Network/CakeRequest.php @@ -1,6 +1,6 @@ controller`. @@ -84,7 +84,7 @@ class CakeRequest implements ArrayAccess { /** * The built in detectors used with `is()` can be modified with `addDetector()`. * - * There are several ways to specify a detector, see CakeRequest::addDetector() for the + * There are several ways to specify a detector, see CakeRequest::addDetector() for the * various formats and ways to define detectors. * * @var array @@ -113,14 +113,13 @@ class CakeRequest implements ArrayAccess { * * @var string */ - private $__input = ''; + protected $_input = ''; /** - * Constructor + * Constructor * * @param string $url Trimmed url string to use. Should not contain the application base path. * @param boolean $parseEnvironment Set to false to not auto parse the environment. ie. GET, POST and FILES. - * @return void */ public function __construct($url = null, $parseEnvironment = true) { $this->_base(); @@ -384,7 +383,7 @@ class CakeRequest implements ArrayAccess { * @param string $name The method called * @param array $params Array of parameters for the method call * @return mixed - * @throws BadMethodCallException when an invalid method is called. + * @throws CakeException when an invalid method is called. */ public function __call($name, $params) { if (strpos($name, 'is') === 0) { @@ -411,7 +410,7 @@ class CakeRequest implements ArrayAccess { /** * Check whether or not a Request is a certain type. Uses the built in detection rules - * as well as additional rules defined with CakeRequest::addDetector(). Any detector can be called + * as well as additional rules defined with CakeRequest::addDetector(). Any detector can be called * as `is($type)` or `is$Type()`. * * @param string $type The type of request you want to check. @@ -455,7 +454,7 @@ class CakeRequest implements ArrayAccess { * ### Pattern value comparison * * Pattern value comparison allows you to compare a value fetched from `env()` to a regular expression. - * + * * e.g `addDetector('iphone', array('env' => 'HTTP_USER_AGENT', 'pattern' => '/iPhone/i'));` * * ### Option based comparison @@ -500,7 +499,7 @@ class CakeRequest implements ArrayAccess { * Provides an easy way to modify, here, webroot and base. * * @param array $paths Array of paths to merge in - * @return the current object, you can chain this method. + * @return CakeRequest the current object, you can chain this method. */ public function addPaths($paths) { foreach (array('webroot', 'here', 'base') as $element) { @@ -544,10 +543,10 @@ class CakeRequest implements ArrayAccess { /** * Get the HTTP method used for this request. - * There are a few ways to specify a method. + * There are a few ways to specify a method. * * - If your client supports it you can use native HTTP methods. - * - You can set the HTTP-X-Method-Override header. + * - You can set the HTTP-X-Method-Override header. * - You can submit an input with the name `_method` * * Any of these 3 approaches can be used to set the HTTP method used @@ -571,7 +570,7 @@ class CakeRequest implements ArrayAccess { /** * Get the domain name and include $tldLength segments of the tld. * - * @param int $tldLength Number of segments your tld contains. For example: `example.com` contains 1 tld. + * @param integer $tldLength Number of segments your tld contains. For example: `example.com` contains 1 tld. * While `example.co.uk` contains 2. * @return string Domain name without subdomains. */ @@ -584,7 +583,7 @@ class CakeRequest implements ArrayAccess { /** * Get the subdomains for a host. * - * @param int $tldLength Number of segments your tld contains. For example: `example.com` contains 1 tld. + * @param integer $tldLength Number of segments your tld contains. For example: `example.com` contains 1 tld. * While `example.co.uk` contains 2. * @return array of subdomains. */ @@ -594,7 +593,7 @@ class CakeRequest implements ArrayAccess { } /** - * Find out which content types the client accepts or check if they accept a + * Find out which content types the client accepts or check if they accept a * particular type of content. * * #### Get all types: @@ -669,8 +668,7 @@ class CakeRequest implements ArrayAccess { * You can write to any value, even paths/keys that do not exist, and the arrays * will be created for you. * - * @param string $name Dot separated name of the value to read/write - * @param mixed $value Value to write to the data array. + * @param string $name,... Dot separated name of the value to read/write * @return mixed Either the value being read, or this so you can chain consecutive writes. */ public function data($name) { @@ -685,7 +683,7 @@ class CakeRequest implements ArrayAccess { /** * Read data from `php://stdin`. Useful when interacting with XML or JSON * request body content. - * + * * Getting input with a decoding function: * * `$this->request->input('json_decode');` @@ -718,13 +716,13 @@ class CakeRequest implements ArrayAccess { * @return string contents of stdin */ protected function _readStdin() { - if (empty($this->__input)) { + if (empty($this->_input)) { $fh = fopen('php://input', 'r'); $content = stream_get_contents($fh); fclose($fh); - $this->__input = $content; + $this->_input = $content; } - return $this->__input; + return $this->_input; } /** @@ -770,7 +768,7 @@ class CakeRequest implements ArrayAccess { /** * Array access unset() implementation * - * @param $name Name to unset. + * @param string $name Name to unset. * @return void */ public function offsetUnset($name) { diff --git a/lib/Cake/Network/CakeResponse.php b/lib/Cake/Network/CakeResponse.php index fe9534fe2..d917bc817 100644 --- a/lib/Cake/Network/CakeResponse.php +++ b/lib/Cake/Network/CakeResponse.php @@ -1,6 +1,6 @@ false, @@ -53,7 +51,6 @@ class CakeSocket { * Configuration settings for the socket connection * * @var array - * @access public */ public $config = array(); @@ -61,7 +58,6 @@ class CakeSocket { * Reference to socket connection resource * * @var resource - * @access public */ public $connection = null; @@ -69,7 +65,6 @@ class CakeSocket { * This boolean contains the current state of the CakeSocket class * * @var boolean - * @access public */ public $connected = false; @@ -77,7 +72,6 @@ class CakeSocket { * This variable contains an array with the last error number (num) and string (str) * * @var array - * @access public */ public $lastError = array(); @@ -256,7 +250,6 @@ class CakeSocket { /** * Destructor, used to disconnect from current connection. * - * @access private */ public function __destruct() { $this->disconnect(); diff --git a/lib/Cake/Network/Email/AbstractTransport.php b/lib/Cake/Network/Email/AbstractTransport.php index 5b4a83ee6..fc837fc96 100644 --- a/lib/Cake/Network/Email/AbstractTransport.php +++ b/lib/Cake/Network/Email/AbstractTransport.php @@ -34,7 +34,7 @@ abstract class AbstractTransport { /** * Send mail * - * @params object $email CakeEmail + * @param CakeEmail $email CakeEmail * @return boolean */ abstract public function send(CakeEmail $email); @@ -43,7 +43,7 @@ abstract class AbstractTransport { * Set the config * * @param array $config - * @return object $this + * @return void */ public function config($config = array()) { if (!empty($config)) { diff --git a/lib/Cake/Network/Email/CakeEmail.php b/lib/Cake/Network/Email/CakeEmail.php index 1da8bf4f8..1b0440587 100644 --- a/lib/Cake/Network/Email/CakeEmail.php +++ b/lib/Cake/Network/Email/CakeEmail.php @@ -234,7 +234,7 @@ class CakeEmail { /** * Instance of transport class * - * @var object + * @var AbstractTransport */ protected $_transportClass = null; @@ -373,7 +373,7 @@ class CakeEmail { * * @param mixed $email String with email, Array with email as key, name as value or email as value (without name) * @param string $name - * @return object $this + * @return CakeEmail $this */ public function addTo($email, $name = null) { return $this->_addEmail('_to', $email, $name); @@ -398,7 +398,7 @@ class CakeEmail { * * @param mixed $email String with email, Array with email as key, name as value or email as value (without name) * @param string $name - * @return object $this + * @return CakeEmail $this */ public function addCc($email, $name = null) { return $this->_addEmail('_cc', $email, $name); @@ -423,7 +423,7 @@ class CakeEmail { * * @param mixed $email String with email, Array with email as key, name as value or email as value (without name) * @param string $name - * @return object $this + * @return CakeEmail $this */ public function addBcc($email, $name = null) { return $this->_addEmail('_bcc', $email, $name); @@ -435,7 +435,7 @@ class CakeEmail { * @param string $varName * @param mixed $email * @param mixed $name - * @return object $this + * @return CakeEmail $this * @throws SocketException */ protected function _setEmail($varName, $email, $name) { @@ -470,8 +470,8 @@ class CakeEmail { * @param mixed $email * @param string $name * @param string $throwMessage - * @return object $this - * @throws SocketExpceiton + * @return CakeEmail $this + * @throws SocketException */ protected function _setEmailSingle($varName, $email, $name, $throwMessage) { $current = $this->{$varName}; @@ -489,7 +489,8 @@ class CakeEmail { * @param string $varName * @param mixed $email * @param mixed $name - * @return object $this + * @return CakeEmail $this + * @throws SocketException */ protected function _addEmail($varName, $email, $name) { if (!is_array($email)) { @@ -533,8 +534,8 @@ class CakeEmail { /** * Sets headers for the message * - * @param array Associative array containing headers to be set. - * @return object $this + * @param array $headers Associative array containing headers to be set. + * @return CakeEmail $this * @throws SocketException */ public function setHeaders($headers) { @@ -773,7 +774,7 @@ class CakeEmail { /** * Return the transport class * - * @return object + * @return CakeEmail * @throws SocketException */ public function transportClass() { @@ -853,7 +854,7 @@ class CakeEmail { * Add attachments * * @param mixed $attachments String with the filename or array with filenames - * @return object $this + * @return CakeEmail $this * @throws SocketException */ public function addAttachments($attachments) { @@ -906,6 +907,7 @@ class CakeEmail { /** * Send an email using the specified content, template and layout * + * @param string|array $content * @return boolean Success * @throws SocketException */ @@ -985,7 +987,8 @@ class CakeEmail { * @param mixed $message String with message or array with variables to be used in render * @param mixed $transportConfig String to use config from EmailConfig or array with configs * @param boolean $send Send the email or just return the instance pre-configured - * @return object Instance of CakeEmail + * @return CakeEmail Instance of CakeEmail + * @throws SocketException */ public static function deliver($to = null, $subject = null, $message = null, $transportConfig = 'fast', $send = true) { $class = __CLASS__; @@ -1026,7 +1029,7 @@ class CakeEmail { /** * Apply the config to an instance * - * @param object $obj CakeEmail + * @param CakeEmail $obj CakeEmail * @param array $config * @return void */ @@ -1061,7 +1064,7 @@ class CakeEmail { /** * Reset all EmailComponent internal variables to be able to send out a new email. * - * @return object $this + * @return CakeEmail $this */ public function reset() { $this->_to = array(); @@ -1270,7 +1273,6 @@ class CakeEmail { * * @param string $content Content to render * @return array Email ready to be sent - * @access private */ protected function _render($content) { $viewClass = $this->_viewRender; diff --git a/lib/Cake/Network/Email/DebugTransport.php b/lib/Cake/Network/Email/DebugTransport.php index 602d8c8c1..9b93add80 100644 --- a/lib/Cake/Network/Email/DebugTransport.php +++ b/lib/Cake/Network/Email/DebugTransport.php @@ -28,7 +28,7 @@ class DebugTransport extends AbstractTransport { /** * Send mail * - * @params object $email CakeEmail + * @param CakeEmail $email CakeEmail * @return boolean */ public function send(CakeEmail $email) { diff --git a/lib/Cake/Network/Email/MailTransport.php b/lib/Cake/Network/Email/MailTransport.php index df52df94b..6d9688469 100644 --- a/lib/Cake/Network/Email/MailTransport.php +++ b/lib/Cake/Network/Email/MailTransport.php @@ -27,7 +27,7 @@ class MailTransport extends AbstractTransport { /** * Send mail * - * @params object $email CakeEmail + * @param CakeEmail $email CakeEmail * @return boolean */ public function send(CakeEmail $email) { diff --git a/lib/Cake/Network/Email/SmtpTransport.php b/lib/Cake/Network/Email/SmtpTransport.php index 6d4ac5531..3a30b89db 100644 --- a/lib/Cake/Network/Email/SmtpTransport.php +++ b/lib/Cake/Network/Email/SmtpTransport.php @@ -28,21 +28,21 @@ class SmtpTransport extends AbstractTransport { /** * Socket to SMTP server * - * @var object CakeScoket + * @var CakeSocket */ protected $_socket; /** * CakeEmail * - * @var object CakeEmail + * @var CakeEmail */ protected $_cakeEmail; /** * Send mail * - * @params object $email CakeEmail + * @param CakeEmail $email CakeEmail * @return boolean * @throws SocketException */ @@ -62,7 +62,7 @@ class SmtpTransport extends AbstractTransport { * Set the configuration * * @param array $config - * @return object $this + * @return void */ public function config($config = array()) { $default = array( diff --git a/lib/Cake/Network/Http/DigestAuthentication.php b/lib/Cake/Network/Http/DigestAuthentication.php index 3287c665a..9680e642a 100644 --- a/lib/Cake/Network/Http/DigestAuthentication.php +++ b/lib/Cake/Network/Http/DigestAuthentication.php @@ -45,7 +45,7 @@ class DigestAuthentication { * Retrive information about the authetication * * @param HttpSocket $http - * @parma array $authInfo + * @param array $authInfo * @return boolean */ protected static function _getServerInformation(HttpSocket $http, &$authInfo) { diff --git a/lib/Cake/Network/Http/HttpResponse.php b/lib/Cake/Network/Http/HttpResponse.php index 172ad2389..976344be8 100644 --- a/lib/Cake/Network/Http/HttpResponse.php +++ b/lib/Cake/Network/Http/HttpResponse.php @@ -71,6 +71,7 @@ class HttpResponse implements ArrayAccess { /** * Contructor * + * @param string $message */ public function __construct($message = null) { if ($message !== null) { @@ -91,6 +92,7 @@ class HttpResponse implements ArrayAccess { * Get header in case insensitive * * @param string $name Header name + * @param array $headers * @return mixed String if header exists or null */ public function getHeader($name, $headers = null) { @@ -122,7 +124,7 @@ class HttpResponse implements ArrayAccess { * * @param string $message Message to parse * @return void - * @throw SocketException + * @throws SocketException */ public function parseResponse($message) { if (!is_string($message)) { @@ -417,7 +419,7 @@ class HttpResponse implements ArrayAccess { /** * ArrayAccess - Offset Unset * - * @param mixed @offset + * @param mixed $offset * @return void */ public function offsetUnset($offset) { @@ -429,7 +431,7 @@ class HttpResponse implements ArrayAccess { * * @return string */ - function __toString() { + public function __toString() { return $this->body(); } diff --git a/lib/Cake/Network/Http/HttpSocket.php b/lib/Cake/Network/Http/HttpSocket.php index af911edce..c1d3056bc 100644 --- a/lib/Cake/Network/Http/HttpSocket.php +++ b/lib/Cake/Network/Http/HttpSocket.php @@ -203,7 +203,7 @@ class HttpSocket extends CakeSocket { * * @param mixed $resource Resource or false to disable the resource use * @return void - * @throw SocketException + * @throws SocketException */ public function setContentResource($resource) { if ($resource === false) { @@ -222,6 +222,7 @@ class HttpSocket extends CakeSocket { * * @param mixed $request Either an URI string, or an array defining host/uri * @return mixed false on error, HttpResponse on success + * @throws SocketException */ public function request($request = array()) { $this->reset(false); diff --git a/lib/Cake/Routing/Dispatcher.php b/lib/Cake/Routing/Dispatcher.php index f16690274..f526a2f91 100644 --- a/lib/Cake/Routing/Dispatcher.php +++ b/lib/Cake/Routing/Dispatcher.php @@ -95,8 +95,8 @@ class Dispatcher { * * @param Controller $controller Controller to invoke * @param CakeRequest $request The request object to invoke the controller for. - * @return string Output as sent by controller - * @throws MissingActionException when the action being called is missing. + * @param CakeResponse $response The response object to receive the output + * @return void */ protected function _invoke(Controller $controller, CakeRequest $request, CakeResponse $response) { $controller->constructClasses(); @@ -108,7 +108,7 @@ class Dispatcher { $render = false; $response = $result; } - + if ($render && $controller->autoRender) { $response = $controller->render(); } elseif ($response->body() === null) { @@ -165,7 +165,7 @@ class Dispatcher { /** * Load controller and return controller classname * - * @param array $params Array of parameters + * @param CakeRequest $request * @return string|bool Name of controller class name */ protected function _loadController($request) { @@ -202,6 +202,7 @@ class Dispatcher { * Outputs cached dispatch view cache * * @param string $path Requested URL path + * @return string|boolean False if is not cached or output */ public function cached($path) { if (Configure::read('Cache.check') === true) { diff --git a/lib/Cake/Routing/Route/CakeRoute.php b/lib/Cake/Routing/Route/CakeRoute.php index 23c473848..0af11e339 100644 --- a/lib/Cake/Routing/Route/CakeRoute.php +++ b/lib/Cake/Routing/Route/CakeRoute.php @@ -27,7 +27,6 @@ class CakeRoute { * `/:controller/:action/:id` has 3 key elements * * @var array - * @access public */ public $keys = array(); @@ -35,7 +34,6 @@ class CakeRoute { * An array of additional parameters for the Route. * * @var array - * @access public */ public $options = array(); @@ -43,7 +41,6 @@ class CakeRoute { * Default parameters for a Route * * @var array - * @access public */ public $defaults = array(); @@ -51,7 +48,6 @@ class CakeRoute { * The routes template string. * * @var string - * @access public */ public $template = null; @@ -60,7 +56,6 @@ class CakeRoute { * template * * @var string - * @access protected */ protected $_greedy = false; @@ -68,7 +63,6 @@ class CakeRoute { * The compiled route regular expresssion * * @var string - * @access protected */ protected $_compiledRoute = null; @@ -76,9 +70,8 @@ class CakeRoute { * HTTP header shortcut map. Used for evaluating header-based route expressions. * * @var array - * @access private */ - private $__headerMap = array( + protected $_headerMap = array( 'type' => 'content_type', 'method' => 'request_method', 'server' => 'server_name' @@ -89,8 +82,7 @@ class CakeRoute { * * @param string $template Template string with parameter placeholders * @param array $defaults Array of defaults for the route. - * @param string $params Array of parameters and additional options for the Route - * @return void + * @param array $options Array of additional options for the Route */ public function __construct($template, $defaults = array(), $options = array()) { $this->template = $template; @@ -188,8 +180,8 @@ class CakeRoute { } foreach ($this->defaults as $key => $val) { if ($key[0] === '[' && preg_match('/^\[(\w+)\]$/', $key, $header)) { - if (isset($this->__headerMap[$header[1]])) { - $header = $this->__headerMap[$header[1]]; + if (isset($this->_headerMap[$header[1]])) { + $header = $this->_headerMap[$header[1]]; } else { $header = 'http_' . $header[1]; } @@ -226,7 +218,7 @@ class CakeRoute { } $route[$key] = $value; } - + if (isset($route['_args_'])) { list($pass, $named) = $this->_parseArgs($route['_args_'], $route); $route['pass'] = array_merge($route['pass'], $pass); @@ -331,7 +323,7 @@ class CakeRoute { } $controllerMatches = ( - !isset($rule['controller'], $context['controller']) || + !isset($rule['controller'], $context['controller']) || in_array($context['controller'], (array)$rule['controller']) ); if (!$controllerMatches) { @@ -348,8 +340,8 @@ class CakeRoute { } /** - * Apply persistent parameters to a url array. Persistant parameters are a special - * key used during route creation to force route parameters to persist when omitted from + * Apply persistent parameters to a url array. Persistant parameters are a special + * key used during route creation to force route parameters to persist when omitted from * a url array. * * @param array $url The array to apply persistent parameters to. @@ -409,7 +401,7 @@ class CakeRoute { } elseif ($defaultExists) { continue; } - + // If the key is a routed key, its not different yet. if (array_key_exists($key, $keyNames)) { continue; diff --git a/lib/Cake/Routing/Route/PluginShortRoute.php b/lib/Cake/Routing/Route/PluginShortRoute.php index f70dc9a2e..7ae7a6bc1 100644 --- a/lib/Cake/Routing/Route/PluginShortRoute.php +++ b/lib/Cake/Routing/Route/PluginShortRoute.php @@ -21,7 +21,7 @@ App::uses('CakeRoute', 'Routing/Route'); class PluginShortRoute extends CakeRoute { /** - * Parses a string url into an array. If a plugin key is found, it will be copied to the + * Parses a string url into an array. If a plugin key is found, it will be copied to the * controller parameter * * @param string $url The url to parse diff --git a/lib/Cake/Routing/Route/RedirectRoute.php b/lib/Cake/Routing/Route/RedirectRoute.php index a83f00f1c..82e1697bc 100644 --- a/lib/Cake/Routing/Route/RedirectRoute.php +++ b/lib/Cake/Routing/Route/RedirectRoute.php @@ -4,7 +4,7 @@ App::uses('CakeRoute', 'Routing/Route'); /** * Redirect route will perform an immediate redirect. Redirect routes - * are useful when you want to have Routing layer redirects occur in your + * are useful when you want to have Routing layer redirects occur in your * application, for when URLs move. * * PHP5 @@ -42,7 +42,7 @@ class RedirectRoute extends CakeRoute { * * @param string $template Template string with parameter placeholders * @param array $defaults Array of defaults for the route. - * @param string $params Array of parameters and additional options for the Route + * @param array $options Array of additional options for the Route */ public function __construct($template, $defaults = array(), $options = array()) { parent::__construct($template, $defaults, $options); diff --git a/lib/Cake/Routing/Router.php b/lib/Cake/Routing/Router.php index d43f58a4f..7fe9c5b52 100644 --- a/lib/Cake/Routing/Router.php +++ b/lib/Cake/Routing/Router.php @@ -45,7 +45,6 @@ class Router { * Array of routes connected with Router::connect() * * @var array - * @access public */ public static $routes = array(); @@ -54,7 +53,6 @@ class Router { * Includes admin prefix * * @var array - * @access private */ protected static $_prefixes = array(); @@ -62,7 +60,6 @@ class Router { * Directive for Router to parse out file extensions for mapping to Content-types. * * @var boolean - * @access private */ protected static $_parseExtensions = false; @@ -70,7 +67,6 @@ class Router { * List of valid extensions to parse from a URL. If null, any extension is allowed. * * @var array - * @access private */ protected static $_validExtensions = array(); @@ -85,7 +81,12 @@ class Router { const ID = '[0-9]+'; const UUID = '[A-Fa-f0-9]{8}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{4}-[A-Fa-f0-9]{12}'; - private static $__namedExpressions = array( +/** + * Named expressions + * + * @var array + */ + protected static $_namedExpressions = array( 'Action' => Router::ACTION, 'Year' => Router::YEAR, 'Month' => Router::MONTH, @@ -98,7 +99,6 @@ class Router { * Stores all information necessary to decide what named arguments are parsed under what conditions. * * @var string - * @access public */ protected static $_namedConfig = array( 'default' => array('page', 'fields', 'order', 'limit', 'recursive', 'sort', 'direction', 'step'), @@ -111,7 +111,6 @@ class Router { * The route matching the URL of the current request * * @var array - * @access private */ protected static $_currentRoute = array(); @@ -119,7 +118,6 @@ class Router { * Default HTTP request method => controller action map. * * @var array - * @access private */ protected static $_resourceMap = array( array('action' => 'index', 'method' => 'GET', 'id' => false), @@ -158,7 +156,6 @@ class Router { * Sets the Routing prefixes. * * @return void - * @access private */ protected static function _setPrefixes() { $routing = Configure::read('Routing'); @@ -171,10 +168,10 @@ class Router { * Gets the named route elements for use in app/Config/routes.php * * @return array Named route elements - * @see Router::$__namedExpressions + * @see Router::$_namedExpressions */ public static function getNamedExpressions() { - return self::$__namedExpressions; + return self::$_namedExpressions; } /** @@ -206,7 +203,7 @@ class Router { * Shows connecting a route with custom route parameters as well as providing patterns for those parameters. * Patterns for routing parameters do not need capturing groups, as one will be added for each route params. * - * $options offers four 'special' keys. `pass`, `named`, `persist` and `routeClass` + * $options offers four 'special' keys. `pass`, `named`, `persist` and `routeClass` * have special meaning in the $options array. * * `pass` is used to define which of the routed parameters should be shifted into the pass array. Adding a @@ -219,7 +216,7 @@ class Router { * `routeClass` is used to extend and change how individual routes parse requests and handle reverse routing, * via a custom routing class. Ex. `'routeClass' => 'SlugRoute'` * - * `named` is used to configure named parameters at the route level. This key uses the same options + * `named` is used to configure named parameters at the route level. This key uses the same options * as Router::connectNamed() * * @param string $route A string describing the template of the route @@ -246,7 +243,7 @@ class Router { } $defaults += array('plugin' => null); if (empty($options['action'])) { - $defaults += array('action' => 'index'); + $defaults += array('action' => 'index'); } $routeClass = 'CakeRoute'; if (isset($options['routeClass'])) { @@ -274,7 +271,7 @@ class Router { * * `Router::redirect('/home/*', array('controller' => 'posts', 'action' => 'view', array('persist' => true));` * - * Redirects /home/* to /posts/view and passes the parameters to /posts/view. Using an array as the + * Redirects /home/* to /posts/view and passes the parameters to /posts/view. Using an array as the * redirect destination allows you to use other routes to define where a url string should be redirected to. * * `Router::redirect('/posts/*', 'http://google.com', array('status' => 302));` @@ -340,18 +337,18 @@ class Router { * Router::connectNamed( * array('page' => array('action' => 'index', 'controller' => 'pages')), * array('default' => false, 'greedy' => false) - * ); + * ); * }}} * * ### Options * - * - `greedy` Setting this to true will make Router parse all named params. Setting it to false will + * - `greedy` Setting this to true will make Router parse all named params. Setting it to false will * parse only the connected named params. * - `default` Set this to true to merge in the default set of named parameters. * - `reset` Set to true to clear existing rules and start fresh. * - `separator` Change the string used to separate the key & value in a named parameter. Defaults to `:` * - * @param array $named A list of named parameters. Key value pairs are accepted where values are + * @param array $named A list of named parameters. Key value pairs are accepted where values are * either regex strings to match, or arrays as seen above. * @param array $options Allows to control all settings: separator, greedy, reset, default * @return array @@ -461,7 +458,7 @@ class Router { $url = substr($url, 0, strpos($url, '?')); } - extract(self::__parseExtension($url)); + extract(self::_parseExtension($url)); for ($i = 0, $len = count(self::$routes); $i < $len; $i++) { $route =& self::$routes[$i]; @@ -487,9 +484,8 @@ class Router { * * @param string $url * @return array Returns an array containing the altered URL and the parsed extension. - * @access private */ - private static function __parseExtension($url) { + protected static function _parseExtension($url) { $ext = null; if (self::$_parseExtensions) { @@ -514,7 +510,7 @@ class Router { /** * Takes parameter and path information back from the Dispatcher, sets these - * parameters as the current request parameters that are merged with url arrays + * parameters as the current request parameters that are merged with url arrays * created later in the request. * * Nested requests will create a stack of requests. You can remove requests using @@ -523,7 +519,7 @@ class Router { * Will accept either a CakeRequest object or an array of arrays. Support for * accepting arrays may be removed in the future. * - * @param mixed $params Parameters and path information or a CakeRequest object. + * @param CakeRequest|array $request Parameters and path information or a CakeRequest object. * @return void */ public static function setRequestInfo($request) { @@ -610,7 +606,7 @@ class Router { } /** - * Reloads default Router settings. Resets all class variables and + * Reloads default Router settings. Resets all class variables and * removes all connected routes. * * @return void @@ -632,7 +628,7 @@ class Router { /** * Promote a route (by default, the last one added) to the beginning of the list * - * @param $which A zero-based array index representing the route to move. For example, + * @param integer $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 Returns false if no route exists at the position specified by $which. */ @@ -660,7 +656,7 @@ class Router { * - A combination of controller/action - the method will find url for it. * * There are a few 'special' parameters that can change the final URL string that is generated - * + * * - `base` - Set to false to remove the base path from the generated url. If your application * is not in the root directory, this can be used to generate urls that are 'cake relative'. * cake relative urls are required when using requestAction. @@ -696,7 +692,7 @@ class Router { $base = $path['base']; $extension = $output = $q = $frag = null; - + if (empty($url)) { $output = isset($path['here']) ? $path['here'] : '/'; if ($full && defined('FULL_BASE_URL')) { @@ -766,8 +762,8 @@ class Router { } } else { if ( - (strpos($url, '://') || - (strpos($url, 'javascript:') === 0) || + (strpos($url, '://') || + (strpos($url, 'javascript:') === 0) || (strpos($url, 'mailto:') === 0)) || (!strncmp($url, '#', 1)) ) { @@ -881,10 +877,10 @@ class Router { /** * Generates a well-formed querystring from $q * - * @param mixed $q Query string Either a string of already compiled query string arguments or + * @param string|array $q Query string Either a string of already compiled query string arguments or * an array of arguments to convert into a query string. * @param array $extra Extra querystring parameters. - * @param bool $escape Whether or not to use escaped & + * @param boolean $escape Whether or not to use escaped & * @return array */ public static function queryString($q, $extra = array(), $escape = false) { @@ -918,7 +914,7 @@ class Router { * This will strip out 'autoRender', 'bare', 'requested', and 'return' param names as those * are used for CakePHP internals and should not normally be part of an output url. * - * @param mixed $param The params array or CakeRequest object that needs to be reversed. + * @param CakeRequest|array $params The params array or CakeRequest object that needs to be reversed. * @param boolean $full Set to true to include the full url including the protocol when reversing * the url. * @return string The string that is the reversed result of the array @@ -1000,7 +996,7 @@ class Router { * * @param string $base Base URL * @param string $plugin Plugin name - * @return base url with plugin name removed if present + * @return string base url with plugin name removed if present */ public static function stripPlugin($base, $plugin = null) { if ($plugin != null) { diff --git a/lib/Cake/Test/Case/AllHelpersTest.php b/lib/Cake/Test/Case/AllHelpersTest.php index e6cd91613..9dc63f730 100644 --- a/lib/Cake/Test/Case/AllHelpersTest.php +++ b/lib/Cake/Test/Case/AllHelpersTest.php @@ -29,7 +29,6 @@ class AllHelpersTest extends PHPUnit_Framework_TestSuite { /** * suite declares tests to run * - * @access public * @return void */ public static function suite() { diff --git a/lib/Cake/Test/Case/Cache/CacheTest.php b/lib/Cake/Test/Case/Cache/CacheTest.php index 35f981288..d02502761 100644 --- a/lib/Cake/Test/Case/Cache/CacheTest.php +++ b/lib/Cake/Test/Case/Cache/CacheTest.php @@ -29,7 +29,6 @@ class CacheTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -43,7 +42,6 @@ class CacheTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -54,7 +52,6 @@ class CacheTest extends CakeTestCase { /** * testConfig method * - * @access public * @return void */ public function testConfig() { @@ -114,7 +111,6 @@ class CacheTest extends CakeTestCase { * * Test that the cache class doesn't cause fatal errors with a partial path * - * @access public * @return void */ public function testInvaidConfig() { @@ -147,7 +143,6 @@ class CacheTest extends CakeTestCase { /** * testConfigChange method * - * @access public * @return void */ public function testConfigChange() { @@ -193,7 +188,6 @@ class CacheTest extends CakeTestCase { /** * testWritingWithConfig method * - * @access public * @return void */ public function testWritingWithConfig() { @@ -231,7 +225,6 @@ class CacheTest extends CakeTestCase { /** * testInitSettings method * - * @access public * @return void */ public function testInitSettings() { @@ -278,7 +271,6 @@ class CacheTest extends CakeTestCase { /** * testWriteEmptyValues method * - * @access public * @return void */ public function testWriteEmptyValues() { @@ -326,7 +318,6 @@ class CacheTest extends CakeTestCase { * Check that the "Cache.disable" configuration and a change to it * (even after a cache config has been setup) is taken into account. * - * @access public * @return void */ public function testCacheDisable() { @@ -366,7 +357,6 @@ class CacheTest extends CakeTestCase { /** * testSet method * - * @access public * @return void */ public function testSet() { diff --git a/lib/Cake/Test/Case/Cache/Engine/ApcEngineTest.php b/lib/Cake/Test/Case/Cache/Engine/ApcEngineTest.php index de2d1bff8..4971f8e3e 100644 --- a/lib/Cake/Test/Case/Cache/Engine/ApcEngineTest.php +++ b/lib/Cake/Test/Case/Cache/Engine/ApcEngineTest.php @@ -29,7 +29,6 @@ class ApcEngineTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -43,7 +42,6 @@ class ApcEngineTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -55,7 +53,6 @@ class ApcEngineTest extends CakeTestCase { /** * testReadAndWriteCache method * - * @access public * @return void */ public function testReadAndWriteCache() { @@ -93,7 +90,6 @@ class ApcEngineTest extends CakeTestCase { /** * testExpiry method * - * @access public * @return void */ public function testExpiry() { @@ -128,7 +124,6 @@ class ApcEngineTest extends CakeTestCase { /** * testDeleteCache method * - * @access public * @return void */ public function testDeleteCache() { @@ -143,7 +138,6 @@ class ApcEngineTest extends CakeTestCase { /** * testDecrement method * - * @access public * @return void */ public function testDecrement() { @@ -169,7 +163,6 @@ class ApcEngineTest extends CakeTestCase { /** * testIncrement method * - * @access public * @return void */ public function testIncrement() { diff --git a/lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php b/lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php index 6eb3a7654..0c32c6cee 100644 --- a/lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php +++ b/lib/Cake/Test/Case/Cache/Engine/FileEngineTest.php @@ -30,14 +30,12 @@ class FileEngineTest extends CakeTestCase { * config property * * @var array - * @access public */ public $config = array(); /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -49,7 +47,6 @@ class FileEngineTest extends CakeTestCase { /** * teardown method * - * @access public * @return void */ public function tearDown() { @@ -61,7 +58,6 @@ class FileEngineTest extends CakeTestCase { /** * testCacheDirChange method * - * @access public * @return void */ public function testCacheDirChange() { @@ -76,7 +72,6 @@ class FileEngineTest extends CakeTestCase { /** * testReadAndWriteCache method * - * @access public * @return void */ public function testReadAndWriteCache() { @@ -105,7 +100,6 @@ class FileEngineTest extends CakeTestCase { /** * testExpiry method * - * @access public * @return void */ public function testExpiry() { @@ -136,7 +130,6 @@ class FileEngineTest extends CakeTestCase { /** * testDeleteCache method * - * @access public * @return void */ public function testDeleteCache() { @@ -155,7 +148,6 @@ class FileEngineTest extends CakeTestCase { /** * testSerialize method * - * @access public * @return void */ public function testSerialize() { @@ -179,7 +171,6 @@ class FileEngineTest extends CakeTestCase { /** * testClear method * - * @access public * @return void */ public function testClear() { @@ -246,7 +237,6 @@ class FileEngineTest extends CakeTestCase { /** * testKeyPath method * - * @access public * @return void */ public function testKeyPath() { @@ -264,7 +254,6 @@ class FileEngineTest extends CakeTestCase { /** * testRemoveWindowsSlashesFromCache method * - * @access public * @return void */ public function testRemoveWindowsSlashesFromCache() { @@ -310,7 +299,6 @@ class FileEngineTest extends CakeTestCase { /** * testWriteQuotedString method * - * @access public * @return void */ public function testWriteQuotedString() { diff --git a/lib/Cake/Test/Case/Cache/Engine/MemcacheTest.php b/lib/Cake/Test/Case/Cache/Engine/MemcacheTest.php index 09bbac3cb..5bdad0af7 100644 --- a/lib/Cake/Test/Case/Cache/Engine/MemcacheTest.php +++ b/lib/Cake/Test/Case/Cache/Engine/MemcacheTest.php @@ -46,7 +46,6 @@ class MemcacheEngineTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -64,7 +63,6 @@ class MemcacheEngineTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -76,7 +74,6 @@ class MemcacheEngineTest extends CakeTestCase { /** * testSettings method * - * @access public * @return void */ public function testSettings() { @@ -98,7 +95,6 @@ class MemcacheEngineTest extends CakeTestCase { /** * testSettings method * - * @access public * @return void */ public function testMultipleServers() { @@ -127,7 +123,6 @@ class MemcacheEngineTest extends CakeTestCase { /** * testConnect method * - * @access public * @return void */ public function testConnect() { @@ -172,7 +167,6 @@ class MemcacheEngineTest extends CakeTestCase { /** * testReadAndWriteCache method * - * @access public * @return void */ public function testReadAndWriteCache() { @@ -196,7 +190,6 @@ class MemcacheEngineTest extends CakeTestCase { /** * testExpiry method * - * @access public * @return void */ public function testExpiry() { @@ -245,7 +238,6 @@ class MemcacheEngineTest extends CakeTestCase { /** * testDeleteCache method * - * @access public * @return void */ public function testDeleteCache() { @@ -260,7 +252,6 @@ class MemcacheEngineTest extends CakeTestCase { /** * testDecrement method * - * @access public * @return void */ public function testDecrement() { @@ -283,7 +274,6 @@ class MemcacheEngineTest extends CakeTestCase { /** * testIncrement method * - * @access public * @return void */ public function testIncrement() { diff --git a/lib/Cake/Test/Case/Cache/Engine/WincacheEngineTest.php b/lib/Cake/Test/Case/Cache/Engine/WincacheEngineTest.php index c64782a2d..12bbee978 100644 --- a/lib/Cake/Test/Case/Cache/Engine/WincacheEngineTest.php +++ b/lib/Cake/Test/Case/Cache/Engine/WincacheEngineTest.php @@ -29,7 +29,6 @@ class WincacheEngineTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -42,7 +41,6 @@ class WincacheEngineTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -54,7 +52,6 @@ class WincacheEngineTest extends CakeTestCase { /** * testReadAndWriteCache method * - * @access public * @return void */ public function testReadAndWriteCache() { @@ -78,7 +75,6 @@ class WincacheEngineTest extends CakeTestCase { /** * testExpiry method * - * @access public * @return void */ public function testExpiry() { @@ -113,7 +109,6 @@ class WincacheEngineTest extends CakeTestCase { /** * testDeleteCache method * - * @access public * @return void */ public function testDeleteCache() { @@ -128,7 +123,6 @@ class WincacheEngineTest extends CakeTestCase { /** * testDecrement method * - * @access public * @return void */ public function testDecrement() { @@ -157,7 +151,6 @@ class WincacheEngineTest extends CakeTestCase { /** * testIncrement method * - * @access public * @return void */ public function testIncrement() { diff --git a/lib/Cake/Test/Case/Cache/Engine/XcacheTest.php b/lib/Cake/Test/Case/Cache/Engine/XcacheTest.php index 95bfcbb3a..68802e5d8 100644 --- a/lib/Cake/Test/Case/Cache/Engine/XcacheTest.php +++ b/lib/Cake/Test/Case/Cache/Engine/XcacheTest.php @@ -29,7 +29,6 @@ class XcacheEngineTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -42,7 +41,6 @@ class XcacheEngineTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -53,7 +51,6 @@ class XcacheEngineTest extends CakeTestCase { /** * testSettings method * - * @access public * @return void */ public function testSettings() { @@ -74,7 +71,6 @@ class XcacheEngineTest extends CakeTestCase { /** * testReadAndWriteCache method * - * @access public * @return void */ public function testReadAndWriteCache() { @@ -98,7 +94,6 @@ class XcacheEngineTest extends CakeTestCase { /** * testExpiry method * - * @access public * @return void */ public function testExpiry() { @@ -128,7 +123,6 @@ class XcacheEngineTest extends CakeTestCase { /** * testDeleteCache method * - * @access public * @return void */ public function testDeleteCache() { @@ -143,7 +137,6 @@ class XcacheEngineTest extends CakeTestCase { /** * testClearCache method * - * @access public * @return void */ public function testClearCache() { @@ -161,7 +154,6 @@ class XcacheEngineTest extends CakeTestCase { /** * testDecrement method * - * @access public * @return void */ public function testDecrement() { @@ -184,7 +176,6 @@ class XcacheEngineTest extends CakeTestCase { /** * testIncrement method * - * @access public * @return void */ public function testIncrement() { diff --git a/lib/Cake/Test/Case/Console/Command/AclShellTest.php b/lib/Cake/Test/Case/Console/Command/AclShellTest.php index 32a8d7ace..cc8c2217d 100644 --- a/lib/Cake/Test/Case/Console/Command/AclShellTest.php +++ b/lib/Cake/Test/Case/Console/Command/AclShellTest.php @@ -33,7 +33,6 @@ class AclShellTest extends CakeTestCase { * Fixtures * * @var array - * @access public */ public $fixtures = array('core.aco', 'core.aro', 'core.aros_aco'); diff --git a/lib/Cake/Test/Case/Console/Command/ApiShellTest.php b/lib/Cake/Test/Case/Console/Command/ApiShellTest.php index f3f600d94..4dbdcc312 100644 --- a/lib/Cake/Test/Case/Console/Command/ApiShellTest.php +++ b/lib/Cake/Test/Case/Console/Command/ApiShellTest.php @@ -56,28 +56,32 @@ class ApiShellTest extends CakeTestCase { $expected = array( '1. afterFilter()', - '2. beforeFilter()', - '3. beforeRedirect($url, $status = NULL, $exit = true)', - '4. beforeRender()', - '5. constructClasses()', - '6. disableCache()', - '7. flash($message, $url, $pause = 1, $layout = \'flash\')', - '8. header($status)', - '9. httpCodes($code = NULL)', - '10. invokeAction($request)', - '11. loadModel($modelClass = NULL, $id = NULL)', - '12. paginate($object = NULL, $scope = array (), $whitelist = array ())', - '13. postConditions($data = array (), $op = NULL, $bool = \'AND\', $exclusive = false)', - '14. redirect($url, $status = NULL, $exit = true)', - '15. referer($default = NULL, $local = false)', - '16. render($view = NULL, $layout = NULL)', - '17. set($one, $two = NULL)', - '18. setAction($action)', - '19. setRequest($request)', - '20. shutdownProcess()', - '21. startupProcess()', - '22. validate()', - '23. validateErrors()' + '2. afterScaffoldSave($method)', + '3. afterScaffoldSaveError($method)', + '4. beforeFilter()', + '5. beforeRedirect($url, $status = NULL, $exit = true)', + '6. beforeRender()', + '7. beforeScaffold($method)', + '8. constructClasses()', + '9. disableCache()', + '10. flash($message, $url, $pause = 1, $layout = \'flash\')', + '11. header($status)', + '12. httpCodes($code = NULL)', + '13. invokeAction($request)', + '14. loadModel($modelClass = NULL, $id = NULL)', + '15. paginate($object = NULL, $scope = array (), $whitelist = array ())', + '16. postConditions($data = array (), $op = NULL, $bool = \'AND\', $exclusive = false)', + '17. redirect($url, $status = NULL, $exit = true)', + '18. referer($default = NULL, $local = false)', + '19. render($view = NULL, $layout = NULL)', + '20. scaffoldError($method)', + '21. set($one, $two = NULL)', + '22. setAction($action)', + '23. setRequest($request)', + '24. shutdownProcess()', + '25. startupProcess()', + '26. validate()', + '27. validateErrors()' ); $this->Shell->expects($this->at(2))->method('out')->with($expected); diff --git a/lib/Cake/Test/Case/Console/Command/BakeShellTest.php b/lib/Cake/Test/Case/Console/Command/BakeShellTest.php index a1b6b44e8..8ada2cdeb 100644 --- a/lib/Cake/Test/Case/Console/Command/BakeShellTest.php +++ b/lib/Cake/Test/Case/Console/Command/BakeShellTest.php @@ -38,7 +38,6 @@ class BakeShellTest extends CakeTestCase { * fixtures * * @var array - * @access public */ public $fixtures = array('core.user'); diff --git a/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php b/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php index f36fa3e03..a627aaa4a 100644 --- a/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php +++ b/lib/Cake/Test/Case/Console/Command/SchemaShellTest.php @@ -35,7 +35,6 @@ class SchemaShellTestSchema extends CakeSchema { * name property * * @var string 'MyApp' - * @access public */ public $name = 'SchemaShellTest'; @@ -43,7 +42,6 @@ class SchemaShellTestSchema extends CakeSchema { * connection property * * @var string 'test' - * @access public */ public $connection = 'test'; @@ -51,7 +49,6 @@ class SchemaShellTestSchema extends CakeSchema { * comments property * * @var array - * @access public */ public $comments = array( 'id' => array('type' => 'integer', 'null' => false, 'default' => 0, 'key' => 'primary'), @@ -69,7 +66,6 @@ class SchemaShellTestSchema extends CakeSchema { * posts property * * @var array - * @access public */ public $articles = array( 'id' => array('type' => 'integer', 'null' => false, 'default' => 0, 'key' => 'primary'), @@ -95,7 +91,6 @@ class SchemaShellTest extends CakeTestCase { * Fixtures * * @var array - * @access public */ public $fixtures = array('core.article', 'core.user', 'core.post', 'core.auth_user', 'core.author', 'core.comment', 'core.test_plugin_comment' @@ -427,7 +422,7 @@ class SchemaShellTest extends CakeTestCase { public function testUpdateWithTable() { $this->Shell = $this->getMock( 'SchemaShell', - array('in', 'out', 'hr', 'createFile', 'error', 'err', '_stop', '__run'), + array('in', 'out', 'hr', 'createFile', 'error', 'err', '_stop', '_run'), array(&$this->Dispatcher) ); @@ -438,7 +433,7 @@ class SchemaShellTest extends CakeTestCase { $this->Shell->args = array('SchemaShellTest', 'articles'); $this->Shell->startup(); $this->Shell->expects($this->any())->method('in')->will($this->returnValue('y')); - $this->Shell->expects($this->once())->method('__run') + $this->Shell->expects($this->once())->method('_run') ->with($this->arrayHasKey('articles'), 'update', $this->isInstanceOf('CakeSchema')); $this->Shell->update(); diff --git a/lib/Cake/Test/Case/Console/Command/ShellTest.php b/lib/Cake/Test/Case/Console/Command/ShellTest.php index ff243aa4a..032e9fec4 100644 --- a/lib/Cake/Test/Case/Console/Command/ShellTest.php +++ b/lib/Cake/Test/Case/Console/Command/ShellTest.php @@ -34,7 +34,6 @@ class ShellTestShell extends Shell { * name property * * @var name - * @access public */ public $name = 'ShellTestShell'; @@ -42,7 +41,6 @@ class ShellTestShell extends Shell { * stopped property * * @var integer - * @access public */ public $stopped; @@ -110,7 +108,6 @@ class ShellTest extends CakeTestCase { * Fixtures used in this test case * * @var array - * @access public */ public $fixtures = array( 'core.post', 'core.comment', 'core.article', 'core.user', @@ -817,7 +814,6 @@ TEXT; /** * Testing camel cased naming of tasks * - * @access public * @return void */ public function testShellNaming() { diff --git a/lib/Cake/Test/Case/Console/Command/Task/ControllerTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/ControllerTaskTest.php index 6fd7abf29..37e856ad6 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/ControllerTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/ControllerTaskTest.php @@ -55,7 +55,6 @@ class ControllerTaskTest extends CakeTestCase { * fixtures * * @var array - * @access public */ public $fixtures = array('core.bake_article', 'core.bake_articles_bake_tag', 'core.bake_comment', 'core.bake_tag'); @@ -271,6 +270,9 @@ class ControllerTaskTest extends CakeTestCase { $this->Task->expects($this->any())->method('createFile')->will($this->returnValue(true)); $result = $this->Task->bake('Articles', '--actions--', $helpers, $components); + $this->assertContains(' * @property Article $Article', $result); + $this->assertContains(' * @property AclComponent $Acl', $result); + $this->assertContains(' * @property AuthComponent $Auth', $result); $this->assertContains('class ArticlesController extends AppController', $result); $this->assertContains("\$components = array('Acl', 'Auth')", $result); $this->assertContains("\$helpers = array('Ajax', 'Time')", $result); @@ -279,11 +281,13 @@ class ControllerTaskTest extends CakeTestCase { $result = $this->Task->bake('Articles', 'scaffold', $helpers, $components); $this->assertContains("class ArticlesController extends AppController", $result); $this->assertContains("public \$scaffold", $result); + $this->assertNotContains('@property', $result); $this->assertNotContains('helpers', $result); $this->assertNotContains('components', $result); $result = $this->Task->bake('Articles', '--actions--', array(), array()); $this->assertContains('class ArticlesController extends AppController', $result); + $this->assertIdentical(substr_count($result, '@property'), 1); $this->assertNotContains('components', $result); $this->assertNotContains('helpers', $result); $this->assertContains('--actions--', $result); diff --git a/lib/Cake/Test/Case/Console/Command/Task/FixtureTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/FixtureTaskTest.php index 982d96d26..2eee7d612 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/FixtureTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/FixtureTaskTest.php @@ -36,7 +36,6 @@ class FixtureTaskTest extends CakeTestCase { * fixtures * * @var array - * @access public */ public $fixtures = array('core.article', 'core.comment', 'core.datatype', 'core.binary_test'); diff --git a/lib/Cake/Test/Case/Console/Command/Task/ModelTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/ModelTaskTest.php index 5bed8e217..888a33e2f 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/ModelTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/ModelTaskTest.php @@ -38,7 +38,6 @@ class ModelTaskTest extends CakeTestCase { * fixtures * * @var array - * @access public */ public $fixtures = array( 'core.bake_article', 'core.bake_comment', 'core.bake_articles_bake_tag', @@ -727,6 +726,10 @@ STRINGEND; ) ); $result = $this->Task->bake('BakeArticle', compact('associations')); + $this->assertContains(' * @property BakeUser $BakeUser', $result); + $this->assertContains(' * @property OtherModel $OtherModel', $result); + $this->assertContains(' * @property BakeComment $BakeComment', $result); + $this->assertContains(' * @property BakeTag $BakeTag', $result); $this->assertPattern('/\$hasAndBelongsToMany \= array\(/', $result); $this->assertPattern('/\$hasMany \= array\(/', $result); $this->assertPattern('/\$belongsTo \= array\(/', $result); diff --git a/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php index ae0e5a5a7..4e061d11e 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php @@ -40,7 +40,6 @@ class TestTaskArticle extends Model { * Model name * * @var string - * @access public */ public $name = 'TestTaskArticle'; @@ -48,7 +47,6 @@ class TestTaskArticle extends Model { * Table name to use * * @var string - * @access public */ public $useTable = 'articles'; @@ -56,7 +54,6 @@ class TestTaskArticle extends Model { * HasMany Associations * * @var array - * @access public */ public $hasMany = array( 'Comment' => array( @@ -69,7 +66,6 @@ class TestTaskArticle extends Model { * Has and Belongs To Many Associations * * @var array - * @access public */ public $hasAndBelongsToMany = array( 'Tag' => array( @@ -117,7 +113,6 @@ class TestTaskTag extends Model { * Model name * * @var string - * @access public */ public $name = 'TestTaskTag'; @@ -125,7 +120,6 @@ class TestTaskTag extends Model { * Table name * * @var string - * @access public */ public $useTable = 'tags'; @@ -133,7 +127,6 @@ class TestTaskTag extends Model { * Has and Belongs To Many Associations * * @var array - * @access public */ public $hasAndBelongsToMany = array( 'Article' => array( @@ -166,7 +159,6 @@ class TestTaskComment extends TestTaskAppModel { * Model name * * @var string - * @access public */ public $name = 'TestTaskComment'; @@ -174,7 +166,6 @@ class TestTaskComment extends TestTaskAppModel { * Table name * * @var string - * @access public */ public $useTable = 'comments'; @@ -182,7 +173,6 @@ class TestTaskComment extends TestTaskAppModel { * Belongs To Associations * * @var array - * @access public */ public $belongsTo = array( 'Article' => array( @@ -204,7 +194,6 @@ class TestTaskCommentsController extends Controller { * Controller Name * * @var string - * @access public */ public $name = 'TestTaskComments'; @@ -212,7 +201,6 @@ class TestTaskCommentsController extends Controller { * Models to use * * @var array - * @access public */ public $uses = array('TestTaskComment', 'TestTaskTag'); } @@ -228,7 +216,6 @@ class TestTaskTest extends CakeTestCase { * Fixtures * * @var string - * @access public */ public $fixtures = array('core.article', 'core.comment', 'core.articles_tag', 'core.tag'); diff --git a/lib/Cake/Test/Case/Console/Command/Task/ViewTaskTest.php b/lib/Cake/Test/Case/Console/Command/Task/ViewTaskTest.php index 5f6582006..ad6b5acda 100644 --- a/lib/Cake/Test/Case/Console/Command/Task/ViewTaskTest.php +++ b/lib/Cake/Test/Case/Console/Command/Task/ViewTaskTest.php @@ -43,7 +43,6 @@ class ViewTaskComment extends Model { * Model name * * @var string - * @access public */ public $name = 'ViewTaskComment'; @@ -51,7 +50,6 @@ class ViewTaskComment extends Model { * Table name * * @var string - * @access public */ public $useTable = 'comments'; @@ -59,7 +57,6 @@ class ViewTaskComment extends Model { * Belongs To Associations * * @var array - * @access public */ public $belongsTo = array( 'Article' => array( @@ -81,7 +78,6 @@ class ViewTaskArticle extends Model { * Model name * * @var string - * @access public */ public $name = 'ViewTaskArticle'; @@ -89,7 +85,6 @@ class ViewTaskArticle extends Model { * Table name * * @var string - * @access public */ public $useTable = 'articles'; } @@ -106,7 +101,6 @@ class ViewTaskCommentsController extends Controller { * Controller name * * @var string - * @access public */ public $name = 'ViewTaskComments'; @@ -139,7 +133,6 @@ class ViewTaskArticlesController extends Controller { * Controller name * * @var string - * @access public */ public $name = 'ViewTaskArticles'; @@ -211,7 +204,6 @@ class ViewTaskTest extends CakeTestCase { * Fixtures * * @var array - * @access public */ public $fixtures = array('core.article', 'core.comment', 'core.articles_tag', 'core.tag'); diff --git a/lib/Cake/Test/Case/Console/Command/TestsuiteShellTest.php b/lib/Cake/Test/Case/Console/Command/TestsuiteShellTest.php index 8a11a41a0..5db685015 100644 --- a/lib/Cake/Test/Case/Console/Command/TestsuiteShellTest.php +++ b/lib/Cake/Test/Case/Console/Command/TestsuiteShellTest.php @@ -34,7 +34,7 @@ class TestsuiteShellTest extends CakeTestCase { $this->Shell = $this->getMock( 'TestsuiteShell', - array('in', 'out', 'hr', 'help', 'error', 'err', '_stop', 'initialize', 'run', 'clear'), + array('in', 'out', 'hr', 'help', 'error', 'err', '_stop', 'initialize', '_run', 'clear'), array($out, $out, $in) ); $this->Shell->OptionParser = $this->getMock('ConsoleOptionParser', array(), array(null, false)); @@ -80,7 +80,7 @@ class TestsuiteShellTest extends CakeTestCase { ->with(__d('cake_console', 'What test case would you like to run?'), null, 'q') ->will($this->returnValue('1')); - $this->Shell->expects($this->once())->method('run'); + $this->Shell->expects($this->once())->method('_run'); $this->Shell->available(); $this->assertEquals($this->Shell->args, array('core', 'AllBehaviors')); } @@ -95,7 +95,7 @@ class TestsuiteShellTest extends CakeTestCase { $this->Shell->args = array('core', 'Basics'); $this->Shell->params = array('filter' => 'myFilter', 'colors' => true, 'verbose' => true); - $this->Shell->expects($this->once())->method('run') + $this->Shell->expects($this->once())->method('_run') ->with( array('app' => false, 'plugin' => null, 'core' => true, 'output' => 'text', 'case' => 'Basics'), array('--filter', 'myFilter', '--colors', '--verbose') diff --git a/lib/Cake/Test/Case/Console/ShellDispatcherTest.php b/lib/Cake/Test/Case/Console/ShellDispatcherTest.php index 721260a50..5f0ec8a08 100644 --- a/lib/Cake/Test/Case/Console/ShellDispatcherTest.php +++ b/lib/Cake/Test/Case/Console/ShellDispatcherTest.php @@ -30,7 +30,6 @@ class TestShellDispatcher extends ShellDispatcher { * params property * * @var array - * @access public */ public $params = array(); @@ -38,7 +37,6 @@ class TestShellDispatcher extends ShellDispatcher { * stopped property * * @var string - * @access public */ public $stopped = null; @@ -46,7 +44,6 @@ class TestShellDispatcher extends ShellDispatcher { * TestShell * * @var mixed - * @access public */ public $TestShell; diff --git a/lib/Cake/Test/Case/Controller/Component/AclComponentTest.php b/lib/Cake/Test/Case/Controller/Component/AclComponentTest.php index 5a069d4dd..d9d20ed74 100644 --- a/lib/Cake/Test/Case/Controller/Component/AclComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/AclComponentTest.php @@ -32,7 +32,6 @@ class AclNodeTwoTestBase extends AclNode { * useDbConfig property * * @var string 'test' - * @access public */ public $useDbConfig = 'test'; @@ -40,7 +39,6 @@ class AclNodeTwoTestBase extends AclNode { * cacheSources property * * @var bool false - * @access public */ public $cacheSources = false; } @@ -56,7 +54,6 @@ class AroTwoTest extends AclNodeTwoTestBase { * name property * * @var string 'AroTwoTest' - * @access public */ public $name = 'AroTwoTest'; @@ -64,7 +61,6 @@ class AroTwoTest extends AclNodeTwoTestBase { * useTable property * * @var string 'aro_twos' - * @access public */ public $useTable = 'aro_twos'; @@ -72,7 +68,6 @@ class AroTwoTest extends AclNodeTwoTestBase { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('AcoTwoTest' => array('with' => 'PermissionTwoTest')); } @@ -88,7 +83,6 @@ class AcoTwoTest extends AclNodeTwoTestBase { * name property * * @var string 'AcoTwoTest' - * @access public */ public $name = 'AcoTwoTest'; @@ -96,7 +90,6 @@ class AcoTwoTest extends AclNodeTwoTestBase { * useTable property * * @var string 'aco_twos' - * @access public */ public $useTable = 'aco_twos'; @@ -104,7 +97,6 @@ class AcoTwoTest extends AclNodeTwoTestBase { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('AroTwoTest' => array('with' => 'PermissionTwoTest')); } @@ -120,7 +112,6 @@ class PermissionTwoTest extends CakeTestModel { * name property * * @var string 'PermissionTwoTest' - * @access public */ public $name = 'PermissionTwoTest'; @@ -128,7 +119,6 @@ class PermissionTwoTest extends CakeTestModel { * useTable property * * @var string 'aros_aco_twos' - * @access public */ public $useTable = 'aros_aco_twos'; @@ -136,7 +126,6 @@ class PermissionTwoTest extends CakeTestModel { * cacheQueries property * * @var bool false - * @access public */ public $cacheQueries = false; @@ -144,7 +133,6 @@ class PermissionTwoTest extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('AroTwoTest' => array('foreignKey' => 'aro_id'), 'AcoTwoTest' => array('foreignKey' => 'aco_id')); @@ -152,7 +140,6 @@ class PermissionTwoTest extends CakeTestModel { * actsAs property * * @var mixed null - * @access public */ public $actsAs = null; } @@ -167,7 +154,6 @@ class DbAclTwoTest extends DbAcl { /** * construct method * - * @access private * @return void */ function __construct() { @@ -258,7 +244,6 @@ class IniAclTest extends CakeTestCase { /** * testIniCheck method * - * @access public * @return void */ public function testCheck() { @@ -309,7 +294,6 @@ class DbAclTest extends CakeTestCase { * fixtures property * * @var array - * @access public */ public $fixtures = array('core.aro_two', 'core.aco_two', 'core.aros_aco_two'); @@ -329,7 +313,6 @@ class DbAclTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -340,7 +323,6 @@ class DbAclTest extends CakeTestCase { /** * testAclCreate method * - * @access public * @return void */ public function testCreate() { @@ -368,7 +350,6 @@ class DbAclTest extends CakeTestCase { /** * testAclCreateWithParent method * - * @access public * @return void */ public function testCreateWithParent() { @@ -388,7 +369,6 @@ class DbAclTest extends CakeTestCase { /** * testDbAclAllow method * - * @access public * @return void */ public function testAllow() { @@ -426,7 +406,6 @@ class DbAclTest extends CakeTestCase { /** * testAllowInvalidNode method * - * @access public * @return void */ public function testAllowInvalidNode() { @@ -437,7 +416,6 @@ class DbAclTest extends CakeTestCase { /** * testDbAclCheck method * - * @access public * @return void */ public function testCheck() { @@ -458,7 +436,6 @@ class DbAclTest extends CakeTestCase { /** * testCheckInvalidNode method * - * @access public * @return void */ public function testCheckInvalidNode() { @@ -469,7 +446,6 @@ class DbAclTest extends CakeTestCase { /** * testCheckInvalidPermission method * - * @access public * @return void */ public function testCheckInvalidPermission() { @@ -480,7 +456,6 @@ class DbAclTest extends CakeTestCase { /** * testCheckMissingPermission method * - * @access public * @return void */ public function testCheckMissingPermission() { @@ -494,7 +469,6 @@ class DbAclTest extends CakeTestCase { * Setup the acl permissions such that Bobs inherits from admin. * deny Admin delete access to a specific resource, check the permisssions are inherited. * - * @access public * @return void */ public function testAclCascadingDeny() { @@ -509,7 +483,6 @@ class DbAclTest extends CakeTestCase { /** * testDbAclDeny method * - * @access public * @return void */ public function testDeny() { @@ -539,7 +512,6 @@ class DbAclTest extends CakeTestCase { /** * testAclNodeLookup method * - * @access public * @return void */ public function testAclNodeLookup() { @@ -564,7 +536,6 @@ class DbAclTest extends CakeTestCase { /** * testDbInherit method * - * @access public * @return void */ public function testInherit() { @@ -582,7 +553,6 @@ class DbAclTest extends CakeTestCase { /** * testDbGrant method * - * @access public * @return void */ public function testGrant() { @@ -604,7 +574,6 @@ class DbAclTest extends CakeTestCase { /** * testDbRevoke method * - * @access public * @return void */ public function testRevoke() { @@ -629,7 +598,6 @@ class DbAclTest extends CakeTestCase { * Only designed to work with the db based ACL * * @param bool $treesToo - * @access private * @return void */ function __debug ($printTreesToo = false) { @@ -677,7 +645,6 @@ class DbAclTest extends CakeTestCase { * * @param string $string * @param int $len - * @access private * @return void */ function __pad($string = '', $len = 14) { diff --git a/lib/Cake/Test/Case/Controller/Component/Auth/DigestAuthenticateTest.php b/lib/Cake/Test/Case/Controller/Component/Auth/DigestAuthenticateTest.php index 570348514..34d3de55e 100644 --- a/lib/Cake/Test/Case/Controller/Component/Auth/DigestAuthenticateTest.php +++ b/lib/Cake/Test/Case/Controller/Component/Auth/DigestAuthenticateTest.php @@ -226,7 +226,6 @@ DIGEST; /** * testParseDigestAuthData method * - * @access public * @return void */ public function testParseAuthData() { diff --git a/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php b/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php index 76d055e6c..80a4fe1e5 100644 --- a/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/AuthComponentTest.php @@ -34,14 +34,12 @@ class TestAuthComponent extends AuthComponent { * testStop property * * @var bool false - * @access public */ public $testStop = false; /** * stop method * - * @access public * @return void */ function _stop($status = 0) { @@ -62,7 +60,6 @@ class AuthUser extends CakeTestModel { * name property * * @var string 'AuthUser' - * @access public */ public $name = 'AuthUser'; @@ -70,7 +67,6 @@ class AuthUser extends CakeTestModel { * useDbConfig property * * @var string 'test' - * @access public */ public $useDbConfig = 'test'; @@ -88,7 +84,6 @@ class AuthTestController extends Controller { * name property * * @var string 'AuthTest' - * @access public */ public $name = 'AuthTest'; @@ -96,7 +91,6 @@ class AuthTestController extends Controller { * uses property * * @var array - * @access public */ public $uses = array('AuthUser'); @@ -104,7 +98,6 @@ class AuthTestController extends Controller { * components property * * @var array - * @access public */ public $components = array('Session', 'Auth'); @@ -112,14 +105,12 @@ class AuthTestController extends Controller { * testUrl property * * @var mixed null - * @access public */ public $testUrl = null; /** * construct method * - * @access private * @return void */ function __construct($request, $response) { @@ -133,7 +124,6 @@ class AuthTestController extends Controller { /** * login method * - * @access public * @return void */ public function login() { @@ -142,7 +132,6 @@ class AuthTestController extends Controller { /** * admin_login method * - * @access public * @return void */ public function admin_login() { @@ -151,7 +140,6 @@ class AuthTestController extends Controller { /** * admin_add method * - * @access public * @return void */ public function admin_add() { @@ -160,7 +148,6 @@ class AuthTestController extends Controller { /** * logout method * - * @access public * @return void */ public function logout() { @@ -170,7 +157,6 @@ class AuthTestController extends Controller { /** * add method * - * @access public * @return void */ public function add() { @@ -180,7 +166,6 @@ class AuthTestController extends Controller { /** * add method * - * @access public * @return void */ public function camelCase() { @@ -193,7 +178,6 @@ class AuthTestController extends Controller { * @param mixed $url * @param mixed $status * @param mixed $exit - * @access public * @return void */ public function redirect($url, $status = null, $exit = true) { @@ -204,7 +188,6 @@ class AuthTestController extends Controller { /** * isAuthorized method * - * @access public * @return void */ public function isAuthorized() { @@ -224,7 +207,6 @@ class AjaxAuthController extends Controller { * name property * * @var string 'AjaxAuth' - * @access public */ public $name = 'AjaxAuth'; @@ -232,7 +214,6 @@ class AjaxAuthController extends Controller { * components property * * @var array - * @access public */ public $components = array('Session', 'TestAuth'); @@ -240,7 +221,6 @@ class AjaxAuthController extends Controller { * uses property * * @var array - * @access public */ public $uses = array(); @@ -248,14 +228,12 @@ class AjaxAuthController extends Controller { * testUrl property * * @var mixed null - * @access public */ public $testUrl = null; /** * beforeFilter method * - * @access public * @return void */ public function beforeFilter() { @@ -267,7 +245,6 @@ class AjaxAuthController extends Controller { /** * add method * - * @access public * @return void */ public function add() { @@ -282,7 +259,6 @@ class AjaxAuthController extends Controller { * @param mixed $url * @param mixed $status * @param mixed $exit - * @access public * @return void */ public function redirect($url, $status = null, $exit = true) { @@ -303,7 +279,6 @@ class AuthComponentTest extends CakeTestCase { * name property * * @var string 'Auth' - * @access public */ public $name = 'Auth'; @@ -311,7 +286,6 @@ class AuthComponentTest extends CakeTestCase { * fixtures property * * @var array - * @access public */ public $fixtures = array('core.auth_user'); @@ -319,14 +293,12 @@ class AuthComponentTest extends CakeTestCase { * initialized property * * @var bool false - * @access public */ public $initialized = false; /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -375,7 +347,6 @@ class AuthComponentTest extends CakeTestCase { /** * testNoAuth method * - * @access public * @return void */ public function testNoAuth() { @@ -385,7 +356,6 @@ class AuthComponentTest extends CakeTestCase { /** * testIsErrorOrTests * - * @access public * @return void */ public function testIsErrorOrTests() { @@ -406,7 +376,6 @@ class AuthComponentTest extends CakeTestCase { /** * testLogin method * - * @access public * @return void */ public function testLogin() { @@ -470,7 +439,6 @@ class AuthComponentTest extends CakeTestCase { /** * testAuthorizeFalse method * - * @access public * @return void */ public function testAuthorizeFalse() { @@ -633,7 +601,6 @@ class AuthComponentTest extends CakeTestCase { /** * Tests that deny always takes precedence over allow * - * @access public * @return void */ public function testAllowDenyAll() { @@ -729,7 +696,6 @@ class AuthComponentTest extends CakeTestCase { /** * testLoginRedirect method * - * @access public * @return void */ public function testLoginRedirect() { @@ -919,7 +885,6 @@ class AuthComponentTest extends CakeTestCase { /** * testAdminRoute method * - * @access public * @return void */ public function testAdminRoute() { @@ -949,7 +914,6 @@ class AuthComponentTest extends CakeTestCase { /** * testAjaxLogin method * - * @access public * @return void */ public function testAjaxLogin() { @@ -972,7 +936,6 @@ class AuthComponentTest extends CakeTestCase { /** * testLoginActionRedirect method * - * @access public * @return void */ public function testLoginActionRedirect() { @@ -1007,7 +970,6 @@ class AuthComponentTest extends CakeTestCase { /** * Tests that shutdown destroys the redirect session var * - * @access public * @return void */ public function testShutDown() { @@ -1022,7 +984,6 @@ class AuthComponentTest extends CakeTestCase { /** * test $settings in Controller::$components * - * @access public * @return void */ public function testComponentSettings() { diff --git a/lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php b/lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php index b0f215427..0ddd8c0dc 100644 --- a/lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/CookieComponentTest.php @@ -33,14 +33,12 @@ class CookieComponentTestController extends Controller { * components property * * @var array - * @access public */ public $components = array('Cookie'); /** * beforeFilter method * - * @access public * @return void */ public function beforeFilter() { @@ -64,14 +62,12 @@ class CookieComponentTest extends CakeTestCase { * Controller property * * @var CookieComponentTestController - * @access public */ public $Controller; /** * start * - * @access public * @return void */ public function setUp() { @@ -94,7 +90,6 @@ class CookieComponentTest extends CakeTestCase { /** * end * - * @access public * @return void */ public function tearDown() { @@ -136,7 +131,6 @@ class CookieComponentTest extends CakeTestCase { /** * testCookieName * - * @access public * @return void */ public function testCookieName() { @@ -146,7 +140,6 @@ class CookieComponentTest extends CakeTestCase { /** * testReadEncryptedCookieData * - * @access public * @return void */ public function testReadEncryptedCookieData() { @@ -163,7 +156,6 @@ class CookieComponentTest extends CakeTestCase { /** * testReadPlainCookieData * - * @access public * @return void */ public function testReadPlainCookieData() { @@ -223,7 +215,6 @@ class CookieComponentTest extends CakeTestCase { /** * testWritePlainCookieArray * - * @access public * @return void */ public function testWritePlainCookieArray() { @@ -254,7 +245,6 @@ class CookieComponentTest extends CakeTestCase { /** * testReadingCookieValue * - * @access public * @return void */ public function testReadingCookieValue() { @@ -283,7 +273,6 @@ class CookieComponentTest extends CakeTestCase { /** * testDeleteCookieValue * - * @access public * @return void */ public function testDeleteCookieValue() { @@ -310,7 +299,6 @@ class CookieComponentTest extends CakeTestCase { /** * testReadingCookieArray * - * @access public * @return void */ public function testReadingCookieArray() { @@ -368,7 +356,6 @@ class CookieComponentTest extends CakeTestCase { /** * testReadingCookieDataOnStartup * - * @access public * @return void */ public function testReadingCookieDataOnStartup() { @@ -420,7 +407,6 @@ class CookieComponentTest extends CakeTestCase { /** * testReadingCookieDataWithoutStartup * - * @access public * @return void */ public function testReadingCookieDataWithoutStartup() { @@ -551,7 +537,6 @@ class CookieComponentTest extends CakeTestCase { * * @param mixed $value * @return string - * @access private */ function __encrypt($value) { if (is_array($value)) { diff --git a/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php b/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php index 50c1bbbb3..7862f7416 100644 --- a/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/EmailComponentTest.php @@ -32,7 +32,6 @@ class EmailTestComponent extends EmailComponent { /** * Convenience method for testing. * - * @access public * @return string */ public function strip($content, $message = false) { @@ -95,7 +94,6 @@ class EmailTestController extends Controller { * name property * * @var string 'EmailTest' - * @access public */ public $name = 'EmailTest'; @@ -103,7 +101,6 @@ class EmailTestController extends Controller { * uses property * * @var mixed null - * @access public */ public $uses = null; @@ -111,7 +108,6 @@ class EmailTestController extends Controller { * components property * * @var array - * @access public */ public $components = array('Session', 'EmailTest'); @@ -128,7 +124,6 @@ class EmailComponentTest extends CakeTestCase { * Controller property * * @var EmailTestController - * @access public */ public $Controller; @@ -136,14 +131,12 @@ class EmailComponentTest extends CakeTestCase { * name property * * @var string 'Email' - * @access public */ public $name = 'Email'; /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -164,7 +157,6 @@ class EmailComponentTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -177,7 +169,6 @@ class EmailComponentTest extends CakeTestCase { * osFix method * * @param string $string - * @access private * @return string */ function __osFix($string) { @@ -187,7 +178,6 @@ class EmailComponentTest extends CakeTestCase { /** * testSendFormats method * - * @access public * @return void */ public function testSendFormats() { @@ -239,7 +229,6 @@ MSGBLOC; /** * testTemplates method * - * @access public * @return void */ public function testTemplates() { @@ -365,7 +354,6 @@ HTMLBLOC; /** * testSendDebug method * - * @access public * @return void */ public function testSendDebug() { @@ -427,7 +415,6 @@ HTMLBLOC; /** * testMessageRetrievalWithoutTemplate method * - * @access public * @return void */ public function testMessageRetrievalWithoutTemplate() { @@ -465,7 +452,6 @@ HTMLBLOC; /** * testMessageRetrievalWithTemplate method * - * @access public * @return void */ public function testMessageRetrievalWithTemplate() { @@ -526,7 +512,6 @@ HTMLBLOC; /** * testMessageRetrievalWithHelper method * - * @access public * @return void */ public function testMessageRetrievalWithHelper() { @@ -555,7 +540,6 @@ HTMLBLOC; /** * testContentArray method * - * @access public * @return void */ public function testSendContentArray() { @@ -603,7 +587,6 @@ HTMLBLOC; /** * testContentStripping method * - * @access public * @return void */ public function testContentStripping() { @@ -662,7 +645,6 @@ HTMLBLOC; /** * testMultibyte method * - * @access public * @return void */ public function testMultibyte() { @@ -778,7 +760,6 @@ HTMLBLOC; /** * testReset method * - * @access public * @return void */ public function testReset() { @@ -849,7 +830,6 @@ HTMLBLOC; /** * testStartup method * - * @access public * @return void */ public function testStartup() { @@ -859,7 +839,6 @@ HTMLBLOC; /** * testMessageId method * - * @access public * @return void */ public function testMessageId() { diff --git a/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php b/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php index 6e68e286d..2b4e8778d 100644 --- a/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php @@ -34,7 +34,6 @@ class PaginatorTestController extends Controller { * name property * * @var string 'PaginatorTest' - * @access public */ public $name = 'PaginatorTest'; @@ -42,7 +41,6 @@ class PaginatorTestController extends Controller { * uses property * * @var array - * @access public */ //public $uses = null; @@ -50,7 +48,6 @@ class PaginatorTestController extends Controller { * components property * * @var array - * @access public */ public $components = array('Paginator'); } @@ -66,7 +63,6 @@ class PaginatorControllerPost extends CakeTestModel { * name property * * @var string 'PaginatorControllerPost' - * @access public */ public $name = 'PaginatorControllerPost'; @@ -74,7 +70,6 @@ class PaginatorControllerPost extends CakeTestModel { * useTable property * * @var string 'posts' - * @access public */ public $useTable = 'posts'; @@ -82,7 +77,6 @@ class PaginatorControllerPost extends CakeTestModel { * invalidFields property * * @var array - * @access public */ public $invalidFields = array('name' => 'error_msg'); @@ -97,7 +91,6 @@ class PaginatorControllerPost extends CakeTestModel { * beforeFind method * * @param mixed $query - * @access public * @return void */ public function beforeFind($query) { @@ -109,7 +102,6 @@ class PaginatorControllerPost extends CakeTestModel { * * @param mixed $type * @param array $options - * @access public * @return void */ public function find($conditions = null, $fields = array(), $order = null, $recursive = null) { @@ -133,7 +125,6 @@ class ControllerPaginateModel extends CakeTestModel { * name property * * @var string 'ControllerPaginateModel' - * @access public */ public $name = 'ControllerPaginateModel'; @@ -141,7 +132,6 @@ class ControllerPaginateModel extends CakeTestModel { * useTable property * * @var string 'comments' - * @access public */ public $useTable = 'comments'; @@ -157,7 +147,6 @@ class ControllerPaginateModel extends CakeTestModel { /** * paginateCount * - * @access public * @return void */ public function paginateCount($conditions, $recursive, $extra) { @@ -176,7 +165,6 @@ class PaginatorControllerComment extends CakeTestModel { * name property * * @var string 'Comment' - * @access public */ public $name = 'Comment'; @@ -184,7 +172,6 @@ class PaginatorControllerComment extends CakeTestModel { * useTable property * * @var string 'comments' - * @access public */ public $useTable = 'comments'; @@ -192,7 +179,6 @@ class PaginatorControllerComment extends CakeTestModel { * alias property * * @var string 'PaginatorControllerComment' - * @access public */ public $alias = 'PaginatorControllerComment'; } @@ -203,7 +189,6 @@ class PaginatorTest extends CakeTestCase { * fixtures property * * @var array - * @access public */ public $fixtures = array('core.post', 'core.comment'); @@ -226,7 +211,6 @@ class PaginatorTest extends CakeTestCase { /** * testPaginate method * - * @access public * @return void */ public function testPaginate() { @@ -340,7 +324,6 @@ class PaginatorTest extends CakeTestCase { /** * testPaginateExtraParams method * - * @access public * @return void */ public function testPaginateExtraParams() { @@ -462,7 +445,6 @@ class PaginatorTest extends CakeTestCase { /** * testDefaultPaginateParams method * - * @access public * @return void */ public function testDefaultPaginateParams() { @@ -727,7 +709,6 @@ class PaginatorTest extends CakeTestCase { * testPaginateMaxLimit * * @return void - * @access public */ public function testPaginateMaxLimit() { $Controller = new Controller($this->request); diff --git a/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php b/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php index 4fbd05b4e..efe979545 100644 --- a/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php @@ -33,7 +33,6 @@ class RequestHandlerTestController extends Controller { * name property * * @var string - * @access public */ public $name = 'RequestHandlerTest'; @@ -41,7 +40,6 @@ class RequestHandlerTestController extends Controller { * uses property * * @var mixed null - * @access public */ public $uses = null; @@ -89,7 +87,6 @@ class RequestHandlerComponentTest extends CakeTestCase { * Controller property * * @var RequestHandlerTestController - * @access public */ public $Controller; @@ -97,14 +94,12 @@ class RequestHandlerComponentTest extends CakeTestCase { * RequestHandler property * * @var RequestHandlerComponent - * @access public */ public $RequestHandler; /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -115,7 +110,6 @@ class RequestHandlerComponentTest extends CakeTestCase { /** * init method * - * @access protected * @return void */ function _init() { @@ -130,7 +124,6 @@ class RequestHandlerComponentTest extends CakeTestCase { /** * endTest method * - * @access public * @return void */ public function tearDown() { @@ -160,7 +153,6 @@ class RequestHandlerComponentTest extends CakeTestCase { /** * testInitializeCallback method * - * @access public * @return void */ public function testInitializeCallback() { @@ -212,7 +204,6 @@ class RequestHandlerComponentTest extends CakeTestCase { /** * testDisabling method * - * @access public * @return void */ public function testDisabling() { @@ -227,7 +218,6 @@ class RequestHandlerComponentTest extends CakeTestCase { /** * testAutoResponseType method * - * @access public * @return void */ public function testAutoResponseType() { @@ -242,7 +232,6 @@ class RequestHandlerComponentTest extends CakeTestCase { /** * testAutoAjaxLayout method * - * @access public * @return void */ public function testAutoAjaxLayout() { @@ -262,7 +251,6 @@ class RequestHandlerComponentTest extends CakeTestCase { /** * testStartupCallback method * - * @access public * @return void */ public function testStartupCallback() { @@ -314,7 +302,6 @@ class RequestHandlerComponentTest extends CakeTestCase { /** * testNonAjaxRedirect method * - * @access public * @return void */ public function testNonAjaxRedirect() { @@ -326,7 +313,6 @@ class RequestHandlerComponentTest extends CakeTestCase { /** * testRenderAs method * - * @access public * @return void */ public function testRenderAs() { @@ -433,7 +419,6 @@ class RequestHandlerComponentTest extends CakeTestCase { /** * testRequestClientTypes method * - * @access public * @return void */ public function testRequestClientTypes() { @@ -447,7 +432,6 @@ class RequestHandlerComponentTest extends CakeTestCase { /** * Tests the detection of various Flash versions * - * @access public * @return void */ public function testFlashDetection() { @@ -463,7 +447,6 @@ class RequestHandlerComponentTest extends CakeTestCase { /** * testRequestContentTypes method * - * @access public * @return void */ public function testRequestContentTypes() { @@ -503,7 +486,6 @@ class RequestHandlerComponentTest extends CakeTestCase { /** * testResponseContentType method * - * @access public * @return void */ public function testResponseContentType() { @@ -515,7 +497,6 @@ class RequestHandlerComponentTest extends CakeTestCase { /** * testMobileDeviceDetection method * - * @access public * @return void */ public function testMobileDeviceDetection() { @@ -531,7 +512,6 @@ class RequestHandlerComponentTest extends CakeTestCase { /** * testRequestProperties method * - * @access public * @return void */ public function testRequestProperties() { @@ -547,7 +527,6 @@ class RequestHandlerComponentTest extends CakeTestCase { /** * testRequestMethod method * - * @access public * @return void */ public function testRequestMethod() { @@ -612,7 +591,6 @@ class RequestHandlerComponentTest extends CakeTestCase { /** * test accepts and prefers methods. * - * @access public * @return void */ public function testPrefers() { @@ -637,7 +615,6 @@ class RequestHandlerComponentTest extends CakeTestCase { /** * testCustomContent method * - * @access public * @return void */ public function testCustomContent() { @@ -650,7 +627,6 @@ class RequestHandlerComponentTest extends CakeTestCase { /** * testClientProperties method * - * @access public * @return void */ public function testClientProperties() { diff --git a/lib/Cake/Test/Case/Controller/Component/SessionComponentTest.php b/lib/Cake/Test/Case/Controller/Component/SessionComponentTest.php index 0983dcce3..bda3c3a11 100644 --- a/lib/Cake/Test/Case/Controller/Component/SessionComponentTest.php +++ b/lib/Cake/Test/Case/Controller/Component/SessionComponentTest.php @@ -30,7 +30,6 @@ class SessionTestController extends Controller { * uses property * * @var array - * @access public */ public $uses = array(); @@ -55,7 +54,6 @@ class OrangeSessionTestController extends Controller { * uses property * * @var array - * @access public */ public $uses = array(); @@ -111,7 +109,6 @@ class SessionComponentTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -123,7 +120,6 @@ class SessionComponentTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -134,7 +130,6 @@ class SessionComponentTest extends CakeTestCase { /** * ensure that session ids don't change when request action is called. * - * @access public * @return void */ public function testSessionIdConsistentAcrossRequestAction() { @@ -156,7 +151,6 @@ class SessionComponentTest extends CakeTestCase { /** * testSessionValid method * - * @access public * @return void */ public function testSessionValid() { @@ -176,7 +170,6 @@ class SessionComponentTest extends CakeTestCase { /** * testSessionError method * - * @access public * @return void */ public function testSessionError() { @@ -187,7 +180,6 @@ class SessionComponentTest extends CakeTestCase { /** * testSessionReadWrite method * - * @access public * @return void */ public function testSessionReadWrite() { @@ -221,7 +213,6 @@ class SessionComponentTest extends CakeTestCase { /** * testSessionDelete method * - * @access public * @return void */ public function testSessionDelete() { @@ -236,7 +227,6 @@ class SessionComponentTest extends CakeTestCase { /** * testSessionCheck method * - * @access public * @return void */ public function testSessionCheck() { @@ -252,7 +242,6 @@ class SessionComponentTest extends CakeTestCase { /** * testSessionFlash method * - * @access public * @return void */ public function testSessionFlash() { @@ -278,7 +267,6 @@ class SessionComponentTest extends CakeTestCase { /** * testSessionId method * - * @access public * @return void */ public function testSessionId() { @@ -291,7 +279,6 @@ class SessionComponentTest extends CakeTestCase { /** * testSessionDestroy method * - * @access public * @return void */ public function testSessionDestroy() { diff --git a/lib/Cake/Test/Case/Controller/ComponentTest.php b/lib/Cake/Test/Case/Controller/ComponentTest.php index c48e5360f..a613c944d 100644 --- a/lib/Cake/Test/Case/Controller/ComponentTest.php +++ b/lib/Cake/Test/Case/Controller/ComponentTest.php @@ -31,7 +31,6 @@ class ParamTestComponent extends Component { * name property * * @var string 'ParamTest' - * @access public */ public $name = 'ParamTest'; @@ -39,7 +38,6 @@ class ParamTestComponent extends Component { * components property * * @var array - * @access public */ public $components = array('Banana' => array('config' => 'value')); @@ -48,7 +46,6 @@ class ParamTestComponent extends Component { * * @param mixed $controller * @param mixed $settings - * @access public * @return void */ public function initialize(&$controller, $settings) { @@ -73,7 +70,6 @@ class ComponentTestController extends Controller { * name property * * @var string 'ComponentTest' - * @access public */ public $name = 'ComponentTest'; @@ -81,7 +77,6 @@ class ComponentTestController extends Controller { * uses property * * @var array - * @access public */ public $uses = array(); @@ -98,7 +93,6 @@ class AppleComponent extends Component { * components property * * @var array - * @access public */ public $components = array('Orange'); @@ -106,7 +100,6 @@ class AppleComponent extends Component { * testName property * * @var mixed null - * @access public */ public $testName = null; @@ -114,7 +107,6 @@ class AppleComponent extends Component { * startup method * * @param mixed $controller - * @access public * @return void */ public function startup(&$controller) { @@ -133,7 +125,6 @@ class OrangeComponent extends Component { * components property * * @var array - * @access public */ public $components = array('Banana'); @@ -141,7 +132,6 @@ class OrangeComponent extends Component { * initialize method * * @param mixed $controller - * @access public * @return void */ public function initialize(&$controller) { @@ -171,7 +161,6 @@ class BananaComponent extends Component { * testField property * * @var string 'BananaField' - * @access public */ public $testField = 'BananaField'; @@ -197,7 +186,6 @@ class MutuallyReferencingOneComponent extends Component { * components property * * @var array - * @access public */ public $components = array('MutuallyReferencingTwo'); } @@ -213,7 +201,6 @@ class MutuallyReferencingTwoComponent extends Component { * components property * * @var array - * @access public */ public $components = array('MutuallyReferencingOne'); } @@ -229,7 +216,6 @@ class SomethingWithEmailComponent extends Component { * components property * * @var array - * @access public */ public $components = array('Email'); } @@ -245,7 +231,6 @@ class ComponentTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -258,7 +243,6 @@ class ComponentTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { diff --git a/lib/Cake/Test/Case/Controller/ControllerMergeVarsTest.php b/lib/Cake/Test/Case/Controller/ControllerMergeVarsTest.php index fd4d8b51e..efd17c922 100644 --- a/lib/Cake/Test/Case/Controller/ControllerMergeVarsTest.php +++ b/lib/Cake/Test/Case/Controller/ControllerMergeVarsTest.php @@ -236,7 +236,7 @@ class ControllerMergeVarsTest extends CakeTestCase { } /** - * Ensure that __mergeVars is not being greedy and merging with + * Ensure that _mergeControllerVars is not being greedy and merging with * AppController when you make an instance of Controller * * @return void diff --git a/lib/Cake/Test/Case/Controller/ControllerTest.php b/lib/Cake/Test/Case/Controller/ControllerTest.php index b2009e102..e16864c7b 100644 --- a/lib/Cake/Test/Case/Controller/ControllerTest.php +++ b/lib/Cake/Test/Case/Controller/ControllerTest.php @@ -33,21 +33,18 @@ class ControllerTestAppController extends Controller { * helpers property * * @var array - * @access public */ public $helpers = array('Html'); /** * uses property * * @var array - * @access public */ public $uses = array('ControllerPost'); /** * components property * * @var array - * @access public */ public $components = array('Cookie'); } @@ -64,7 +61,6 @@ class ControllerPost extends CakeTestModel { * name property * * @var string 'ControllerPost' - * @access public */ public $name = 'ControllerPost'; @@ -72,7 +68,6 @@ class ControllerPost extends CakeTestModel { * useTable property * * @var string 'posts' - * @access public */ public $useTable = 'posts'; @@ -80,7 +75,6 @@ class ControllerPost extends CakeTestModel { * invalidFields property * * @var array - * @access public */ public $invalidFields = array('name' => 'error_msg'); @@ -88,7 +82,6 @@ class ControllerPost extends CakeTestModel { * lastQuery property * * @var mixed null - * @access public */ public $lastQuery = null; @@ -96,7 +89,6 @@ class ControllerPost extends CakeTestModel { * beforeFind method * * @param mixed $query - * @access public * @return void */ public function beforeFind($query) { @@ -108,7 +100,6 @@ class ControllerPost extends CakeTestModel { * * @param mixed $type * @param array $options - * @access public * @return void */ public function find($type, $options = array()) { @@ -132,7 +123,6 @@ class ControllerCommentsController extends ControllerTestAppController { * name property * * @var string 'ControllerPost' - * @access public */ public $name = 'ControllerComments'; @@ -150,7 +140,6 @@ class ControllerComment extends CakeTestModel { * name property * * @var string 'ControllerComment' - * @access public */ public $name = 'Comment'; @@ -158,7 +147,6 @@ class ControllerComment extends CakeTestModel { * useTable property * * @var string 'comments' - * @access public */ public $useTable = 'comments'; @@ -166,7 +154,6 @@ class ControllerComment extends CakeTestModel { * data property * * @var array - * @access public */ public $data = array('name' => 'Some Name'); @@ -174,7 +161,6 @@ class ControllerComment extends CakeTestModel { * alias property * * @var string 'ControllerComment' - * @access public */ public $alias = 'ControllerComment'; } @@ -190,7 +176,6 @@ class ControllerAlias extends CakeTestModel { * name property * * @var string 'ControllerAlias' - * @access public */ public $name = 'ControllerAlias'; @@ -198,7 +183,6 @@ class ControllerAlias extends CakeTestModel { * alias property * * @var string 'ControllerSomeAlias' - * @access public */ public $alias = 'ControllerSomeAlias'; @@ -206,7 +190,6 @@ class ControllerAlias extends CakeTestModel { * useTable property * * @var string 'posts' - * @access public */ public $useTable = 'posts'; } @@ -221,14 +204,12 @@ class NameTest extends CakeTestModel { /** * name property * @var string 'Name' - * @access public */ public $name = 'Name'; /** * useTable property * @var string 'names' - * @access public */ public $useTable = 'comments'; @@ -236,7 +217,6 @@ class NameTest extends CakeTestModel { * alias property * * @var string 'ControllerComment' - * @access public */ public $alias = 'Name'; } @@ -251,7 +231,6 @@ class TestController extends ControllerTestAppController { /** * name property * @var string 'Name' - * @access public */ public $name = 'Test'; @@ -259,7 +238,6 @@ class TestController extends ControllerTestAppController { * helpers property * * @var array - * @access public */ public $helpers = array('Session'); @@ -267,7 +245,6 @@ class TestController extends ControllerTestAppController { * components property * * @var array - * @access public */ public $components = array('Security'); @@ -275,7 +252,6 @@ class TestController extends ControllerTestAppController { * uses property * * @var array - * @access public */ public $uses = array('ControllerComment', 'ControllerAlias'); @@ -286,7 +262,6 @@ class TestController extends ControllerTestAppController { * * @param mixed $testId * @param mixed $test2Id - * @access public * @return void */ public function index($testId, $test2Id) { @@ -326,7 +301,6 @@ class TestComponent extends Object { /** * beforeRedirect method * - * @access public * @return void */ public function beforeRedirect() { @@ -334,7 +308,6 @@ class TestComponent extends Object { /** * initialize method * - * @access public * @return void */ public function initialize(&$controller) { @@ -343,7 +316,6 @@ class TestComponent extends Object { /** * startup method * - * @access public * @return void */ public function startup(&$controller) { @@ -351,7 +323,6 @@ class TestComponent extends Object { /** * shutdown method * - * @access public * @return void */ public function shutdown(&$controller) { @@ -378,14 +349,12 @@ class AnotherTestController extends ControllerTestAppController { /** * name property * @var string 'Name' - * @access public */ public $name = 'AnotherTest'; /** * uses property * * @var array - * @access public */ public $uses = null; @@ -403,7 +372,6 @@ class ControllerTest extends CakeTestCase { * fixtures property * * @var array - * @access public */ public $fixtures = array('core.post', 'core.comment', 'core.name'); @@ -421,7 +389,6 @@ class ControllerTest extends CakeTestCase { /** * teardown * - * @access public * @return void */ public function teardown() { @@ -432,7 +399,6 @@ class ControllerTest extends CakeTestCase { /** * testLoadModel method * - * @access public * @return void */ public function testLoadModel() { @@ -454,7 +420,6 @@ class ControllerTest extends CakeTestCase { /** * testLoadModel method from a plugin controller * - * @access public * @return void */ public function testLoadModelInPlugins() { @@ -485,7 +450,6 @@ class ControllerTest extends CakeTestCase { /** * testConstructClasses method * - * @access public * @return void */ public function testConstructClasses() { @@ -518,7 +482,6 @@ class ControllerTest extends CakeTestCase { /** * testAliasName method * - * @access public * @return void */ public function testAliasName() { @@ -536,7 +499,6 @@ class ControllerTest extends CakeTestCase { /** * testFlash method * - * @access public * @return void */ public function testFlash() { @@ -581,7 +543,6 @@ class ControllerTest extends CakeTestCase { /** * testControllerSet method * - * @access public * @return void */ public function testControllerSet() { @@ -625,7 +586,6 @@ class ControllerTest extends CakeTestCase { /** * testRender method * - * @access public * @return void */ public function testRender() { @@ -700,17 +660,16 @@ class ControllerTest extends CakeTestCase { /** * testToBeInheritedGuardmethods method * - * @access public * @return void */ public function testToBeInheritedGuardmethods() { $request = new CakeRequest('controller_posts/index'); $Controller = new Controller($request, $this->getMock('CakeResponse')); - $this->assertTrue($Controller->_beforeScaffold('')); - $this->assertTrue($Controller->_afterScaffoldSave('')); - $this->assertTrue($Controller->_afterScaffoldSaveError('')); - $this->assertFalse($Controller->_scaffoldError('')); + $this->assertTrue($Controller->beforeScaffold('')); + $this->assertTrue($Controller->afterScaffoldSave('')); + $this->assertTrue($Controller->afterScaffoldSaveError('')); + $this->assertFalse($Controller->scaffoldError('')); } /** @@ -734,7 +693,6 @@ class ControllerTest extends CakeTestCase { * testRedirect method * * @dataProvider statusCodeProvider - * @access public * @return void */ public function testRedirectByCode($code, $msg) { @@ -871,7 +829,6 @@ class ControllerTest extends CakeTestCase { /** * testMergeVars method * - * @access public * @return void */ public function testMergeVars() { @@ -933,7 +890,6 @@ class ControllerTest extends CakeTestCase { /** * test that options from child classes replace those in the parent classes. * - * @access public * @return void */ public function testChildComponentOptionsSupercedeParents() { @@ -948,7 +904,7 @@ class ControllerTest extends CakeTestCase { } /** - * Ensure that __mergeVars is not being greedy and merging with + * Ensure that _mergeControllerVars is not being greedy and merging with * ControllerTestAppController when you make an instance of Controller * * @return void @@ -967,7 +923,6 @@ class ControllerTest extends CakeTestCase { /** * testReferer method * - * @access public * @return void */ public function testReferer() { @@ -1004,7 +959,6 @@ class ControllerTest extends CakeTestCase { /** * testSetAction method * - * @access public * @return void */ public function testSetAction() { @@ -1019,7 +973,6 @@ class ControllerTest extends CakeTestCase { /** * testValidateErrors method * - * @access public * @return void */ public function testValidateErrors() { @@ -1062,7 +1015,6 @@ class ControllerTest extends CakeTestCase { /** * testPostConditions method * - * @access public * @return void */ public function testPostConditions() { @@ -1128,7 +1080,6 @@ class ControllerTest extends CakeTestCase { /** * testRequestHandlerPrefers method * - * @access public * @return void */ public function testRequestHandlerPrefers(){ @@ -1153,7 +1104,6 @@ class ControllerTest extends CakeTestCase { /** * testControllerHttpCodes method * - * @access public * @return void */ public function testControllerHttpCodes() { @@ -1168,7 +1118,6 @@ class ControllerTest extends CakeTestCase { /** * Tests that the startup process calls the correct functions * - * @access public * @return void */ public function testStartupProcess() { @@ -1189,7 +1138,6 @@ class ControllerTest extends CakeTestCase { /** * Tests that the shutdown process calls the correct functions * - * @access public * @return void */ public function testShutdownProcess() { diff --git a/lib/Cake/Test/Case/Controller/PagesControllerTest.php b/lib/Cake/Test/Case/Controller/PagesControllerTest.php index 68f9a0f83..8a71cb5ae 100644 --- a/lib/Cake/Test/Case/Controller/PagesControllerTest.php +++ b/lib/Cake/Test/Case/Controller/PagesControllerTest.php @@ -29,7 +29,6 @@ class PagesControllerTest extends CakeTestCase { /** * endTest method * - * @access public * @return void */ public function endTest() { @@ -39,7 +38,6 @@ class PagesControllerTest extends CakeTestCase { /** * testDisplay method * - * @access public * @return void */ public function testDisplay() { diff --git a/lib/Cake/Test/Case/Controller/ScaffoldTest.php b/lib/Cake/Test/Case/Controller/ScaffoldTest.php index 88a7326d0..7108cba05 100644 --- a/lib/Cake/Test/Case/Controller/ScaffoldTest.php +++ b/lib/Cake/Test/Case/Controller/ScaffoldTest.php @@ -32,7 +32,6 @@ class ScaffoldMockController extends Controller { * name property * * @var string 'ScaffoldMock' - * @access public */ public $name = 'ScaffoldMock'; @@ -40,7 +39,6 @@ class ScaffoldMockController extends Controller { * scaffold property * * @var mixed - * @access public */ public $scaffold; } @@ -56,7 +54,6 @@ class ScaffoldMockControllerWithFields extends Controller { * name property * * @var string 'ScaffoldMock' - * @access public */ public $name = 'ScaffoldMock'; @@ -64,16 +61,15 @@ class ScaffoldMockControllerWithFields extends Controller { * scaffold property * * @var mixed - * @access public */ public $scaffold; /** - * function _beforeScaffold + * function beforeScaffold * * @param string method */ - function _beforeScaffold($method) { + public function beforeScaffold($method) { $this->set('scaffoldFields', array('title')); return true; } @@ -116,7 +112,6 @@ class ScaffoldMock extends CakeTestModel { * useTable property * * @var string 'posts' - * @access public */ public $useTable = 'articles'; @@ -124,7 +119,6 @@ class ScaffoldMock extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array( 'User' => array( @@ -137,7 +131,6 @@ class ScaffoldMock extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array( 'Comment' => array( @@ -171,7 +164,6 @@ class ScaffoldUser extends CakeTestModel { * useTable property * * @var string 'posts' - * @access public */ public $useTable = 'users'; @@ -179,7 +171,6 @@ class ScaffoldUser extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array( 'Article' => array( @@ -200,7 +191,6 @@ class ScaffoldComment extends CakeTestModel { * useTable property * * @var string 'posts' - * @access public */ public $useTable = 'comments'; @@ -208,7 +198,6 @@ class ScaffoldComment extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array( 'Article' => array( @@ -228,7 +217,6 @@ class ScaffoldTag extends CakeTestModel { * useTable property * * @var string 'posts' - * @access public */ public $useTable = 'tags'; } @@ -243,7 +231,6 @@ class TestScaffoldView extends ScaffoldView { * testGetFilename method * * @param mixed $action - * @access public * @return void */ public function testGetFilename($action) { @@ -262,14 +249,12 @@ class ScaffoldViewTest extends CakeTestCase { * fixtures property * * @var array - * @access public */ public $fixtures = array('core.article', 'core.user', 'core.comment', 'core.join_thing', 'core.tag'); /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -299,7 +284,6 @@ class ScaffoldViewTest extends CakeTestCase { /** * testGetViewFilename method * - * @access public * @return void */ public function testGetViewFilename() { @@ -402,7 +386,6 @@ class ScaffoldViewTest extends CakeTestCase { /** * test default index scaffold generation * - * @access public * @return void */ public function testIndexScaffold() { @@ -442,7 +425,6 @@ class ScaffoldViewTest extends CakeTestCase { /** * test default view scaffold generation * - * @access public * @return void */ public function testViewScaffold() { @@ -485,7 +467,6 @@ class ScaffoldViewTest extends CakeTestCase { /** * test default view scaffold generation * - * @access public * @return void */ public function testEditScaffold() { @@ -528,7 +509,6 @@ class ScaffoldViewTest extends CakeTestCase { /** * Test Admin Index Scaffolding. * - * @access public * @return void */ public function testAdminIndexScaffold() { @@ -574,7 +554,6 @@ class ScaffoldViewTest extends CakeTestCase { /** * Test Admin Index Scaffolding. * - * @access public * @return void */ public function testAdminEditScaffold() { @@ -614,7 +593,6 @@ class ScaffoldViewTest extends CakeTestCase { /** * Test Admin Index Scaffolding. * - * @access public * @return void */ public function testMultiplePrefixScaffold() { @@ -670,7 +648,6 @@ class ScaffoldTest extends CakeTestCase { * Controller property * * @var SecurityTestController - * @access public */ public $Controller; @@ -678,7 +655,6 @@ class ScaffoldTest extends CakeTestCase { * fixtures property * * @var array - * @access public */ public $fixtures = array('core.article', 'core.user', 'core.comment', 'core.join_thing', 'core.tag'); /** @@ -707,7 +683,6 @@ class ScaffoldTest extends CakeTestCase { * Test the correct Generation of Scaffold Params. * This ensures that the correct action and view will be generated * - * @access public * @return void */ public function testScaffoldParams() { diff --git a/lib/Cake/Test/Case/Core/AppTest.php b/lib/Cake/Test/Case/Core/AppTest.php index dc89f5e4c..9f51fd1a1 100644 --- a/lib/Cake/Test/Case/Core/AppTest.php +++ b/lib/Cake/Test/Case/Core/AppTest.php @@ -19,7 +19,6 @@ class AppTest extends CakeTestCase { /** * testBuild method * - * @access public * @return void */ public function testBuild() { @@ -87,7 +86,6 @@ class AppTest extends CakeTestCase { /** * tests that it is possible to set up paths using the cake 1.3 notation for them (models, behaviors, controllers...) * - * @access public * @return void */ public function testCompatibleBuild() { @@ -188,7 +186,6 @@ class AppTest extends CakeTestCase { /** * testBuildWithReset method * - * @access public * @return void */ public function testBuildWithReset() { @@ -216,7 +213,6 @@ class AppTest extends CakeTestCase { /** * testCore method * - * @access public * @return void */ public function testCore() { @@ -242,7 +238,6 @@ class AppTest extends CakeTestCase { /** * testListObjects method * - * @access public * @return void */ public function testListObjects() { @@ -404,7 +399,6 @@ class AppTest extends CakeTestCase { /** * testClassLoading method * - * @access public * @return void */ public function testClassLoading() { @@ -545,7 +539,6 @@ class AppTest extends CakeTestCase { /** * testFileLoading method * - * @access public * @return void */ public function testFileLoading () { @@ -559,7 +552,6 @@ class AppTest extends CakeTestCase { /** * testFileLoadingWithArray method * - * @access public * @return void */ public function testFileLoadingWithArray() { @@ -577,7 +569,6 @@ class AppTest extends CakeTestCase { /** * testFileLoadingReturnValue method * - * @access public * @return void */ public function testFileLoadingReturnValue () { @@ -597,7 +588,6 @@ class AppTest extends CakeTestCase { /** * testLoadingWithSearch method * - * @access public * @return void */ public function testLoadingWithSearch () { @@ -611,7 +601,6 @@ class AppTest extends CakeTestCase { /** * testLoadingWithSearchArray method * - * @access public * @return void */ public function testLoadingWithSearchArray() { @@ -639,7 +628,6 @@ class AppTest extends CakeTestCase { /** * testMultipleLoading method * - * @access public * @return void */ public function testMultipleLoading() { diff --git a/lib/Cake/Test/Case/Core/ConfigureTest.php b/lib/Cake/Test/Case/Core/ConfigureTest.php index a54f74025..fdb1475d8 100644 --- a/lib/Cake/Test/Case/Core/ConfigureTest.php +++ b/lib/Cake/Test/Case/Core/ConfigureTest.php @@ -30,7 +30,6 @@ class ConfigureTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -45,7 +44,6 @@ class ConfigureTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -75,7 +73,6 @@ class ConfigureTest extends CakeTestCase { /** * testRead method * - * @access public * @return void */ public function testRead() { @@ -103,7 +100,6 @@ class ConfigureTest extends CakeTestCase { /** * testWrite method * - * @access public * @return void */ public function testWrite() { @@ -156,7 +152,6 @@ class ConfigureTest extends CakeTestCase { /** * testDelete method * - * @access public * @return void */ public function testDelete() { @@ -241,7 +236,6 @@ class ConfigureTest extends CakeTestCase { /** * testLoad method * - * @access public * @return void */ public function testLoadPlugin() { @@ -265,7 +259,6 @@ class ConfigureTest extends CakeTestCase { /** * testStore method * - * @access public * @return void */ public function testStoreAndRestore() { @@ -306,7 +299,6 @@ class ConfigureTest extends CakeTestCase { /** * testVersion method * - * @access public * @return void */ public function testVersion() { diff --git a/lib/Cake/Test/Case/Core/ObjectTest.php b/lib/Cake/Test/Case/Core/ObjectTest.php index 0e318ff56..81e03f371 100644 --- a/lib/Cake/Test/Case/Core/ObjectTest.php +++ b/lib/Cake/Test/Case/Core/ObjectTest.php @@ -33,7 +33,6 @@ class RequestActionPost extends CakeTestModel { * name property * * @var string 'ControllerPost' - * @access public */ public $name = 'RequestActionPost'; @@ -41,7 +40,6 @@ class RequestActionPost extends CakeTestModel { * useTable property * * @var string 'posts' - * @access public */ public $useTable = 'posts'; } @@ -86,7 +84,6 @@ class RequestActionController extends Controller { /** * normal_request_action method * - * @access public * @return void */ public function normal_request_action() { @@ -105,7 +102,6 @@ class RequestActionController extends Controller { /** * paginate_request_action method * - * @access public * @return void */ public function paginate_request_action() { @@ -144,7 +140,6 @@ class TestObject extends Object { * firstName property * * @var string 'Joel' - * @access public */ public $firstName = 'Joel'; @@ -152,7 +147,6 @@ class TestObject extends Object { * lastName property * * @var string 'Moss' - * @access public */ public $lastName = 'Moss'; @@ -160,14 +154,12 @@ class TestObject extends Object { * methodCalls property * * @var array - * @access public */ public $methodCalls = array(); /** * emptyMethod method * - * @access public * @return void */ public function emptyMethod() { @@ -178,7 +170,6 @@ class TestObject extends Object { * oneParamMethod method * * @param mixed $param - * @access public * @return void */ public function oneParamMethod($param) { @@ -190,7 +181,6 @@ class TestObject extends Object { * * @param mixed $param * @param mixed $param2 - * @access public * @return void */ public function twoParamMethod($param, $param2) { @@ -203,7 +193,6 @@ class TestObject extends Object { * @param mixed $param * @param mixed $param2 * @param mixed $param3 - * @access public * @return void */ public function threeParamMethod($param, $param2, $param3) { @@ -216,7 +205,6 @@ class TestObject extends Object { * @param mixed $param2 * @param mixed $param3 * @param mixed $param4 - * @access public * @return void */ public function fourParamMethod($param, $param2, $param3, $param4) { @@ -230,7 +218,6 @@ class TestObject extends Object { * @param mixed $param3 * @param mixed $param4 * @param mixed $param5 - * @access public * @return void */ public function fiveParamMethod($param, $param2, $param3, $param4, $param5) { @@ -247,7 +234,6 @@ class TestObject extends Object { * @param mixed $param5 * @param mixed $param6 * @param mixed $param7 - * @access public * @return void */ public function crazyMethod($param, $param2, $param3, $param4, $param5, $param6, $param7 = null) { @@ -258,7 +244,6 @@ class TestObject extends Object { * methodWithOptionalParam method * * @param mixed $param - * @access public * @return void */ public function methodWithOptionalParam($param = null) { @@ -302,7 +287,6 @@ class ObjectTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -312,7 +296,6 @@ class ObjectTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -324,7 +307,6 @@ class ObjectTest extends CakeTestCase { /** * testLog method * - * @access public * @return void */ public function testLog() { @@ -355,7 +337,6 @@ class ObjectTest extends CakeTestCase { /** * testSet method * - * @access public * @return void */ public function testSet() { @@ -376,7 +357,6 @@ class ObjectTest extends CakeTestCase { /** * testToString method * - * @access public * @return void */ public function testToString() { @@ -387,7 +367,6 @@ class ObjectTest extends CakeTestCase { /** * testMethodDispatching method * - * @access public * @return void */ public function testMethodDispatching() { @@ -454,7 +433,6 @@ class ObjectTest extends CakeTestCase { /** * testRequestAction method * - * @access public * @return void */ public function testRequestAction() { @@ -589,7 +567,6 @@ class ObjectTest extends CakeTestCase { /** * Test that requestAction() is populating $this->params properly * - * @access public * @return void */ public function testRequestActionParamParseAndPass() { @@ -613,7 +590,6 @@ class ObjectTest extends CakeTestCase { /** * test requestAction and POST parameter passing, and not passing when url is an array. * - * @access public * @return void */ public function testRequestActionPostPassing() { diff --git a/lib/Cake/Test/Case/Error/ExceptionRendererTest.php b/lib/Cake/Test/Case/Error/ExceptionRendererTest.php index eb5856f3a..005fdb3dc 100644 --- a/lib/Cake/Test/Case/Error/ExceptionRendererTest.php +++ b/lib/Cake/Test/Case/Error/ExceptionRendererTest.php @@ -34,7 +34,6 @@ class AuthBlueberryUser extends CakeTestModel { * name property * * @var string 'AuthBlueberryUser' - * @access public */ public $name = 'AuthBlueberryUser'; @@ -42,7 +41,6 @@ class AuthBlueberryUser extends CakeTestModel { * useTable property * * @var string - * @access public */ public $useTable = false; } @@ -57,7 +55,6 @@ class BlueberryComponent extends Component { /** * testName property * - * @access public * @return void */ public $testName = null; @@ -65,7 +62,6 @@ class BlueberryComponent extends Component { /** * initialize method * - * @access public * @return void */ public function initialize(&$controller) { @@ -84,14 +80,12 @@ class TestErrorController extends Controller { * uses property * * @var array - * @access public */ public $uses = array(); /** * components property * - * @access public * @return void */ public $components = array('Blueberry'); @@ -99,7 +93,6 @@ class TestErrorController extends Controller { /** * beforeRender method * - * @access public * @return void */ public function beforeRender() { @@ -109,7 +102,6 @@ class TestErrorController extends Controller { /** * index method * - * @access public * @return void */ public function index() { @@ -340,7 +332,6 @@ class ExceptionRendererTest extends CakeTestCase { /** * testerror400 method * - * @access public * @return void */ public function testError400() { @@ -411,7 +402,6 @@ class ExceptionRendererTest extends CakeTestCase { /** * testError500 method * - * @access public * @return void */ public function testError500Message() { @@ -430,7 +420,6 @@ class ExceptionRendererTest extends CakeTestCase { /** * testMissingController method * - * @access public * @return void */ public function testMissingController() { diff --git a/lib/Cake/Test/Case/I18n/I18nTest.php b/lib/Cake/Test/Case/I18n/I18nTest.php index b3b1edb31..be8d501d8 100644 --- a/lib/Cake/Test/Case/I18n/I18nTest.php +++ b/lib/Cake/Test/Case/I18n/I18nTest.php @@ -28,7 +28,6 @@ class I18nTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -43,7 +42,6 @@ class I18nTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -99,7 +97,6 @@ class I18nTest extends CakeTestCase { /** * testDefaultStrings method * - * @access public * @return void */ public function testDefaultStrings() { @@ -169,7 +166,6 @@ class I18nTest extends CakeTestCase { /** * testPoRulesZero method * - * @access public * @return void */ public function testPoRulesZero() { @@ -241,7 +237,6 @@ class I18nTest extends CakeTestCase { /** * testMoRulesZero method * - * @access public * @return void */ public function testMoRulesZero() { @@ -313,7 +308,6 @@ class I18nTest extends CakeTestCase { /** * testPoRulesOne method * - * @access public * @return void */ public function testPoRulesOne() { @@ -385,7 +379,6 @@ class I18nTest extends CakeTestCase { /** * testMoRulesOne method * - * @access public * @return void */ public function testMoRulesOne() { @@ -457,7 +450,6 @@ class I18nTest extends CakeTestCase { /** * testPoRulesTwo method * - * @access public * @return void */ public function testPoRulesTwo() { @@ -529,7 +521,6 @@ class I18nTest extends CakeTestCase { /** * testMoRulesTwo method * - * @access public * @return void */ public function testMoRulesTwo() { @@ -601,7 +592,6 @@ class I18nTest extends CakeTestCase { /** * testPoRulesThree method * - * @access public * @return void */ public function testPoRulesThree() { @@ -673,7 +663,6 @@ class I18nTest extends CakeTestCase { /** * testMoRulesThree method * - * @access public * @return void */ public function testMoRulesThree() { @@ -745,7 +734,6 @@ class I18nTest extends CakeTestCase { /** * testPoRulesFour method * - * @access public * @return void */ public function testPoRulesFour() { @@ -817,7 +805,6 @@ class I18nTest extends CakeTestCase { /** * testMoRulesFour method * - * @access public * @return void */ public function testMoRulesFour() { @@ -889,7 +876,6 @@ class I18nTest extends CakeTestCase { /** * testPoRulesFive method * - * @access public * @return void */ public function testPoRulesFive() { @@ -963,7 +949,6 @@ class I18nTest extends CakeTestCase { /** * testMoRulesFive method * - * @access public * @return void */ public function testMoRulesFive() { @@ -1037,7 +1022,6 @@ class I18nTest extends CakeTestCase { /** * testPoRulesSix method * - * @access public * @return void */ public function testPoRulesSix() { @@ -1109,7 +1093,6 @@ class I18nTest extends CakeTestCase { /** * testMoRulesSix method * - * @access public * @return void */ public function testMoRulesSix() { @@ -1181,7 +1164,6 @@ class I18nTest extends CakeTestCase { /** * testPoRulesSeven method * - * @access public * @return void */ public function testPoRulesSeven() { @@ -1253,7 +1235,6 @@ class I18nTest extends CakeTestCase { /** * testMoRulesSeven method * - * @access public * @return void */ public function testMoRulesSeven() { @@ -1325,7 +1306,6 @@ class I18nTest extends CakeTestCase { /** * testPoRulesEight method * - * @access public * @return void */ public function testPoRulesEight() { @@ -1397,7 +1377,6 @@ class I18nTest extends CakeTestCase { /** * testMoRulesEight method * - * @access public * @return void */ public function testMoRulesEight() { @@ -1469,7 +1448,6 @@ class I18nTest extends CakeTestCase { /** * testPoRulesNine method * - * @access public * @return void */ public function testPoRulesNine() { @@ -1544,7 +1522,6 @@ class I18nTest extends CakeTestCase { /** * testMoRulesNine method * - * @access public * @return void */ public function testMoRulesNine() { @@ -1619,7 +1596,6 @@ class I18nTest extends CakeTestCase { /** * testPoRulesTen method * - * @access public * @return void */ public function testPoRulesTen() { @@ -1693,7 +1669,6 @@ class I18nTest extends CakeTestCase { /** * testMoRulesTen method * - * @access public * @return void */ public function testMoRulesTen() { @@ -1767,7 +1742,6 @@ class I18nTest extends CakeTestCase { /** * testPoRulesEleven method * - * @access public * @return void */ public function testPoRulesEleven() { @@ -1839,7 +1813,6 @@ class I18nTest extends CakeTestCase { /** * testMoRulesEleven method * - * @access public * @return void */ public function testMoRulesEleven() { @@ -1911,7 +1884,6 @@ class I18nTest extends CakeTestCase { /** * testPoRulesTwelve method * - * @access public * @return void */ public function testPoRulesTwelve() { @@ -1983,7 +1955,6 @@ class I18nTest extends CakeTestCase { /** * testMoRulesTwelve method * - * @access public * @return void */ public function testMoRulesTwelve() { @@ -2055,7 +2026,6 @@ class I18nTest extends CakeTestCase { /** * testPoRulesThirteen method * - * @access public * @return void */ public function testPoRulesThirteen() { @@ -2127,7 +2097,6 @@ class I18nTest extends CakeTestCase { /** * testMoRulesThirteen method * - * @access public * @return void */ public function testMoRulesThirteen() { @@ -2199,7 +2168,6 @@ class I18nTest extends CakeTestCase { /** * testPoRulesFourteen method * - * @access public * @return void */ public function testPoRulesFourteen() { @@ -2271,7 +2239,6 @@ class I18nTest extends CakeTestCase { /** * testMoRulesFourteen method * - * @access public * @return void */ public function testMoRulesFourteen() { @@ -2343,7 +2310,6 @@ class I18nTest extends CakeTestCase { /** * testSetLanguageWithSession method * - * @access public * @return void */ public function testSetLanguageWithSession () { @@ -2384,7 +2350,6 @@ class I18nTest extends CakeTestCase { /** * testNoCoreTranslation method * - * @access public * @return void */ public function testNoCoreTranslation () { @@ -2427,7 +2392,6 @@ class I18nTest extends CakeTestCase { /** * testPluginTranslation method * - * @access public * @return void */ public function testPluginTranslation() { @@ -2471,7 +2435,6 @@ class I18nTest extends CakeTestCase { /** * testPoMultipleLineTranslation method * - * @access public * @return void */ public function testPoMultipleLineTranslation () { @@ -2545,7 +2508,6 @@ class I18nTest extends CakeTestCase { /** * testPoNoTranslationNeeded method * - * @access public * @return void */ public function testPoNoTranslationNeeded () { @@ -2557,7 +2519,6 @@ class I18nTest extends CakeTestCase { /** * testPoQuotedString method * - * @access public * @return void */ public function testPoQuotedString () { @@ -2568,7 +2529,6 @@ class I18nTest extends CakeTestCase { /** * testFloatValue method * - * @access public * @return void */ public function testFloatValue() { @@ -2590,7 +2550,6 @@ class I18nTest extends CakeTestCase { /** * testCategory method * - * @access public * @return void */ public function testCategory() { @@ -2602,7 +2561,6 @@ class I18nTest extends CakeTestCase { /** * testPluginCategory method * - * @access public * @return void */ public function testPluginCategory() { @@ -2619,7 +2577,6 @@ class I18nTest extends CakeTestCase { /** * testCategoryThenSingular method * - * @access public * @return void */ public function testCategoryThenSingular() { @@ -2666,7 +2623,6 @@ class I18nTest extends CakeTestCase { /** * Singular method * - * @access private * @return void */ function __domainCategorySingular($domain = 'test_plugin', $category = 3) { @@ -2677,7 +2633,6 @@ class I18nTest extends CakeTestCase { /** * Plural method * - * @access private * @return void */ function __domainCategoryPlural($domain = 'test_plugin', $category = 3) { @@ -2691,7 +2646,6 @@ class I18nTest extends CakeTestCase { /** * Singular method * - * @access private * @return void */ function __domainSingular($domain = 'test_plugin') { @@ -2702,7 +2656,6 @@ class I18nTest extends CakeTestCase { /** * Plural method * - * @access private * @return void */ function __domainPlural($domain = 'test_plugin') { @@ -2716,7 +2669,6 @@ class I18nTest extends CakeTestCase { /** * category method * - * @access private * @return void */ function __category($category = 3) { @@ -2727,7 +2679,6 @@ class I18nTest extends CakeTestCase { /** * Singular method * - * @access private * @return void */ function __singular() { @@ -2738,7 +2689,6 @@ class I18nTest extends CakeTestCase { /** * Plural method * - * @access private * @return void */ function __plural() { @@ -2752,7 +2702,6 @@ class I18nTest extends CakeTestCase { /** * singularFromCore method * - * @access private * @return void */ function __singularFromCore() { @@ -2763,7 +2712,6 @@ class I18nTest extends CakeTestCase { /** * pluralFromCore method * - * @access private * @return void */ function __pluralFromCore() { diff --git a/lib/Cake/Test/Case/I18n/L10nTest.php b/lib/Cake/Test/Case/I18n/L10nTest.php index aa99de6a6..3fe57f7b4 100644 --- a/lib/Cake/Test/Case/I18n/L10nTest.php +++ b/lib/Cake/Test/Case/I18n/L10nTest.php @@ -28,7 +28,6 @@ class L10nTest extends CakeTestCase { /** * testGet method * - * @access public * @return void */ public function testGet() { @@ -81,7 +80,6 @@ class L10nTest extends CakeTestCase { /** * testGetAutoLanguage method * - * @access public * @return void */ public function testGetAutoLanguage() { @@ -115,7 +113,6 @@ class L10nTest extends CakeTestCase { /** * testMap method * - * @access public * @return void */ public function testMap() { @@ -445,7 +442,6 @@ class L10nTest extends CakeTestCase { /** * testCatalog method * - * @access public * @return void */ public function testCatalog() { diff --git a/lib/Cake/Test/Case/I18n/MultibyteTest.php b/lib/Cake/Test/Case/I18n/MultibyteTest.php index ea9634453..40caec103 100644 --- a/lib/Cake/Test/Case/I18n/MultibyteTest.php +++ b/lib/Cake/Test/Case/I18n/MultibyteTest.php @@ -28,7 +28,6 @@ class MultibyteTest extends CakeTestCase { /** * testUtf8 method * - * @access public * @return void */ public function testUtf8() { @@ -352,7 +351,6 @@ class MultibyteTest extends CakeTestCase { /** * testAscii method * - * @access public * @return void */ public function testAscii() { @@ -673,7 +671,6 @@ class MultibyteTest extends CakeTestCase { /** * testUsingMbStripos method * - * @access public * @return void */ public function testUsingMbStripos() { @@ -921,7 +918,6 @@ class MultibyteTest extends CakeTestCase { /** * testMultibyteStripos method * - * @access public * @return void */ public function testMultibyteStripos() { @@ -1169,7 +1165,6 @@ class MultibyteTest extends CakeTestCase { /** * testUsingMbStristr method * - * @access public * @return void */ public function testUsingMbStristr() { @@ -1560,7 +1555,6 @@ class MultibyteTest extends CakeTestCase { /** * testMultibyteStristr method * - * @access public * @return void */ public function testMultibyteStristr() { @@ -1951,7 +1945,6 @@ class MultibyteTest extends CakeTestCase { /** * testUsingMbStrlen method * - * @access public * @return void */ public function testUsingMbStrlen() { @@ -2099,7 +2092,6 @@ class MultibyteTest extends CakeTestCase { /** * testMultibyteStrlen method * - * @access public * @return void */ public function testMultibyteStrlen() { @@ -2247,7 +2239,6 @@ class MultibyteTest extends CakeTestCase { /** * testUsingMbStrpos method * - * @access public * @return void */ public function testUsingMbStrpos() { @@ -2495,7 +2486,6 @@ class MultibyteTest extends CakeTestCase { /** * testMultibyteStrpos method * - * @access public * @return void */ public function testMultibyteStrpos() { @@ -2743,7 +2733,6 @@ class MultibyteTest extends CakeTestCase { /** * testUsingMbStrrchr method * - * @access public * @return void */ public function testUsingMbStrrchr() { @@ -3128,7 +3117,6 @@ class MultibyteTest extends CakeTestCase { /** * testMultibyteStrrchr method * - * @access public * @return void */ public function testMultibyteStrrchr() { @@ -3513,7 +3501,6 @@ class MultibyteTest extends CakeTestCase { /** * testUsingMbStrrichr method * - * @access public * @return void */ public function testUsingMbStrrichr() { @@ -3898,7 +3885,6 @@ class MultibyteTest extends CakeTestCase { /** * testMultibyteStrrichr method * - * @access public * @return void */ public function testMultibyteStrrichr() { @@ -4283,7 +4269,6 @@ class MultibyteTest extends CakeTestCase { /** * testUsingMbStrripos method * - * @access public * @return void */ public function testUsingMbStrripos() { @@ -4536,7 +4521,6 @@ class MultibyteTest extends CakeTestCase { /** * testMultibyteStrripos method * - * @access public * @return void */ public function testMultibyteStrripos() { @@ -4790,7 +4774,6 @@ class MultibyteTest extends CakeTestCase { /** * testUsingMbStrrpos method * - * @access public * @return void */ public function testUsingMbStrrpos() { @@ -5046,7 +5029,6 @@ class MultibyteTest extends CakeTestCase { /** * testMultibyteStrrpos method * - * @access public * @return void */ public function testMultibyteStrrpos() { @@ -5300,7 +5282,6 @@ class MultibyteTest extends CakeTestCase { /** * testUsingMbStrstr method * - * @access public * @return void */ public function testUsingMbStrstr() { @@ -5697,7 +5678,6 @@ class MultibyteTest extends CakeTestCase { /** * testMultibyteStrstr method * - * @access public * @return void */ public function testMultibyteStrstr() { @@ -6094,7 +6074,6 @@ class MultibyteTest extends CakeTestCase { /** * testUsingMbStrtolower method * - * @access public * @return void */ public function testUsingMbStrtolower() { @@ -6650,7 +6629,6 @@ mb_strtolower does not work for these strings. /** * testMultibyteStrtolower method * - * @access public * @return void */ public function testMultibyteStrtolower() { @@ -7208,7 +7186,6 @@ mb_strtolower does not work for these strings. /** * testUsingMbStrtoupper method * - * @access public * @return void */ public function testUsingMbStrtoupper() { @@ -7754,7 +7731,6 @@ mb_strtoupper does not work for these strings. /** * testMultibyteStrtoupper method * - * @access public * @return void */ public function testMultibyteStrtoupper() { @@ -8307,7 +8283,6 @@ mb_strtoupper does not work for these strings. /** * testUsingMbSubstrCount method * - * @access public * @return void */ public function testUsingMbSubstrCount() { @@ -8561,7 +8536,6 @@ mb_strtoupper does not work for these strings. /** * testMultibyteSubstrCount method * - * @access public * @return void */ public function testMultibyteSubstrCount() { @@ -8815,7 +8789,6 @@ mb_strtoupper does not work for these strings. /** * testUsingMbSubstr method * - * @access public * @return void */ public function testUsingMbSubstr() { @@ -8974,7 +8947,6 @@ mb_strtoupper does not work for these strings. /** * testMultibyteSubstr method * - * @access public * @return void */ public function testMultibyteSubstr() { @@ -9133,7 +9105,6 @@ mb_strtoupper does not work for these strings. /** * testMultibyteSubstr method * - * @access public * @return void */ public function testMultibyteMimeEncode() { diff --git a/lib/Cake/Test/Case/Log/CakeLogTest.php b/lib/Cake/Test/Case/Log/CakeLogTest.php index 405ed00cb..f1effb744 100644 --- a/lib/Cake/Test/Case/Log/CakeLogTest.php +++ b/lib/Cake/Test/Case/Log/CakeLogTest.php @@ -151,7 +151,6 @@ class CakeLogTest extends CakeTestCase { /** * testLogFileWriting method * - * @access public * @return void */ public function testLogFileWriting() { diff --git a/lib/Cake/Test/Case/Log/Engine/FileLogTest.php b/lib/Cake/Test/Case/Log/Engine/FileLogTest.php index dcb597cfa..0ea494941 100644 --- a/lib/Cake/Test/Case/Log/Engine/FileLogTest.php +++ b/lib/Cake/Test/Case/Log/Engine/FileLogTest.php @@ -28,7 +28,6 @@ class FileLogTest extends CakeTestCase { /** * testLogFileWriting method * - * @access public * @return void */ public function testLogFileWriting() { diff --git a/lib/Cake/Test/Case/Model/Behavior/AclBehaviorTest.php b/lib/Cake/Test/Case/Model/Behavior/AclBehaviorTest.php index dd5010a00..e9381e9d5 100644 --- a/lib/Cake/Test/Case/Model/Behavior/AclBehaviorTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/AclBehaviorTest.php @@ -38,7 +38,6 @@ class AclPerson extends CakeTestModel { * name property * * @var string - * @access public */ public $name = 'AclPerson'; @@ -46,7 +45,6 @@ class AclPerson extends CakeTestModel { * useTable property * * @var string - * @access public */ public $useTable = 'people'; @@ -54,7 +52,6 @@ class AclPerson extends CakeTestModel { * actsAs property * * @var array - * @access public */ public $actsAs = array('Acl' => 'both'); @@ -62,7 +59,6 @@ class AclPerson extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array( 'Mother' => array( @@ -75,7 +71,6 @@ class AclPerson extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array( 'Child' => array( @@ -118,7 +113,6 @@ class AclUser extends CakeTestModel { * name property * * @var string - * @access public */ public $name = 'User'; @@ -126,7 +120,6 @@ class AclUser extends CakeTestModel { * useTable property * * @var string - * @access public */ public $useTable = 'users'; @@ -134,7 +127,6 @@ class AclUser extends CakeTestModel { * actsAs property * * @var array - * @access public */ public $actsAs = array('Acl' => 'requester'); @@ -159,7 +151,6 @@ class AclPost extends CakeTestModel { * name property * * @var string - * @access public */ public $name = 'Post'; @@ -167,7 +158,6 @@ class AclPost extends CakeTestModel { * useTable property * * @var string - * @access public */ public $useTable = 'posts'; @@ -175,7 +165,6 @@ class AclPost extends CakeTestModel { * actsAs property * * @var array - * @access public */ var $actsAs = array('Acl' => 'Controlled'); @@ -200,7 +189,6 @@ class AclBehaviorTest extends CakeTestCase { * Aco property * * @var Aco - * @access public */ public $Aco; @@ -208,7 +196,6 @@ class AclBehaviorTest extends CakeTestCase { * Aro property * * @var Aro - * @access public */ public $Aro; @@ -216,7 +203,6 @@ class AclBehaviorTest extends CakeTestCase { * fixtures property * * @var array - * @access public */ public $fixtures = array('core.person', 'core.user', 'core.post', 'core.aco', 'core.aro', 'core.aros_aco'); @@ -263,7 +249,6 @@ class AclBehaviorTest extends CakeTestCase { * Test Setup of AclBehavior as both requester and controlled * * @return void - * @access public */ public function testSetupMulti() { $User = new AclPerson(); diff --git a/lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php b/lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php index d4e2803b6..4ec3086f6 100644 --- a/lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/ContainableBehaviorTest.php @@ -32,7 +32,6 @@ class ContainableBehaviorTest extends CakeTestCase { * Fixtures associated with this test case * * @var array - * @access public */ public $fixtures = array( 'core.article', 'core.article_featured', 'core.article_featureds_tags', @@ -79,7 +78,6 @@ class ContainableBehaviorTest extends CakeTestCase { /** * testContainments method * - * @access public * @return void */ public function testContainments() { @@ -149,7 +147,6 @@ class ContainableBehaviorTest extends CakeTestCase { /** * testInvalidContainments method * - * @access public * @return void */ public function testInvalidContainments() { @@ -163,7 +160,6 @@ class ContainableBehaviorTest extends CakeTestCase { /** * testBeforeFind method * - * @access public * @return void */ public function testBeforeFind() { @@ -238,7 +234,6 @@ class ContainableBehaviorTest extends CakeTestCase { /** * testContain method * - * @access public * @return void */ public function testContain() { @@ -254,7 +249,6 @@ class ContainableBehaviorTest extends CakeTestCase { /** * testFindEmbeddedNoBindings method * - * @access public * @return void */ public function testFindEmbeddedNoBindings() { @@ -279,7 +273,6 @@ class ContainableBehaviorTest extends CakeTestCase { /** * testFindFirstLevel method * - * @access public * @return void */ public function testFindFirstLevel() { @@ -388,7 +381,6 @@ class ContainableBehaviorTest extends CakeTestCase { /** * testFindEmbeddedFirstLevel method * - * @access public * @return void */ public function testFindEmbeddedFirstLevel() { @@ -495,7 +487,6 @@ class ContainableBehaviorTest extends CakeTestCase { /** * testFindSecondLevel method * - * @access public * @return void */ public function testFindSecondLevel() { @@ -842,7 +833,6 @@ class ContainableBehaviorTest extends CakeTestCase { /** * testFindEmbeddedSecondLevel method * - * @access public * @return void */ public function testFindEmbeddedSecondLevel() { @@ -1185,7 +1175,6 @@ class ContainableBehaviorTest extends CakeTestCase { /** * testFindThirdLevel method * - * @access public * @return void */ public function testFindThirdLevel() { @@ -1506,7 +1495,6 @@ class ContainableBehaviorTest extends CakeTestCase { /** * testFindEmbeddedThirdLevel method * - * @access public * @return void */ public function testFindEmbeddedThirdLevel() { @@ -1824,7 +1812,6 @@ class ContainableBehaviorTest extends CakeTestCase { /** * testSettingsThirdLevel method * - * @access public * @return void */ public function testSettingsThirdLevel() { @@ -2071,7 +2058,6 @@ class ContainableBehaviorTest extends CakeTestCase { /** * testFindThirdLevelNonReset method * - * @access public * @return void */ public function testFindThirdLevelNonReset() { @@ -2396,7 +2382,6 @@ class ContainableBehaviorTest extends CakeTestCase { /** * testFindEmbeddedThirdLevelNonReset method * - * @access public * @return void */ public function testFindEmbeddedThirdLevelNonReset() { @@ -2886,7 +2871,6 @@ class ContainableBehaviorTest extends CakeTestCase { /** * testEmbeddedFindFields method * - * @access public * @return void */ public function testEmbeddedFindFields() { @@ -2990,7 +2974,6 @@ class ContainableBehaviorTest extends CakeTestCase { /** * testFindConditionalBinding method * - * @access public * @return void */ public function testFindConditionalBinding() { @@ -3130,7 +3113,6 @@ class ContainableBehaviorTest extends CakeTestCase { /** * testOtherFinds method * - * @access public * @return void */ public function testOtherFinds() { @@ -3194,7 +3176,6 @@ class ContainableBehaviorTest extends CakeTestCase { /** * testOriginalAssociations method * - * @access public * @return void */ public function testOriginalAssociations() { @@ -3547,7 +3528,6 @@ class ContainableBehaviorTest extends CakeTestCase { * * @param mixed $Model * @param array $contain - * @access private * @return void */ function __containments(&$Model, $contain = array()) { @@ -3569,7 +3549,6 @@ class ContainableBehaviorTest extends CakeTestCase { * * @param mixed $Model * @param array $expected - * @access private * @return void */ function __assertBindings(&$Model, $expected = array()) { @@ -3586,7 +3565,6 @@ class ContainableBehaviorTest extends CakeTestCase { * @param mixed $Model * @param array $extra * @param bool $output - * @access private * @return void */ function __bindings(&$Model, $extra = array(), $output = true) { diff --git a/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php b/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php index d5c98ce0f..6bc85ae58 100644 --- a/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php @@ -35,7 +35,6 @@ class TranslateBehaviorTest extends CakeTestCase { * autoFixtures property * * @var bool false - * @access public */ public $autoFixtures = false; @@ -43,7 +42,6 @@ class TranslateBehaviorTest extends CakeTestCase { * fixtures property * * @var array - * @access public */ public $fixtures = array( 'core.translated_item', 'core.translate', 'core.translate_table', @@ -54,7 +52,6 @@ class TranslateBehaviorTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -64,7 +61,6 @@ class TranslateBehaviorTest extends CakeTestCase { /** * testTranslateModel method * - * @access public * @return void */ public function testTranslateModel() { @@ -96,7 +92,6 @@ class TranslateBehaviorTest extends CakeTestCase { /** * testLocaleFalsePlain method * - * @access public * @return void */ public function testLocaleFalsePlain() { @@ -121,7 +116,6 @@ class TranslateBehaviorTest extends CakeTestCase { /** * testLocaleFalseAssociations method * - * @access public * @return void */ public function testLocaleFalseAssociations() { @@ -176,7 +170,6 @@ class TranslateBehaviorTest extends CakeTestCase { /** * testLocaleSingle method * - * @access public * @return void */ public function testLocaleSingle() { @@ -233,7 +226,6 @@ class TranslateBehaviorTest extends CakeTestCase { /** * testLocaleSingleWithConditions method * - * @access public * @return void */ public function testLocaleSingleWithConditions() { @@ -273,7 +265,6 @@ class TranslateBehaviorTest extends CakeTestCase { /** * testLocaleSingleAssociations method * - * @access public * @return void */ public function testLocaleSingleAssociations() { @@ -334,7 +325,6 @@ class TranslateBehaviorTest extends CakeTestCase { /** * testLocaleMultiple method * - * @access public * @return void */ public function testLocaleMultiple() { @@ -390,7 +380,6 @@ class TranslateBehaviorTest extends CakeTestCase { /** * testMissingTranslation method * - * @access public * @return void */ public function testMissingTranslation() { @@ -418,7 +407,6 @@ class TranslateBehaviorTest extends CakeTestCase { /** * testTranslatedFindList method * - * @access public * @return void */ public function testTranslatedFindList() { @@ -452,7 +440,6 @@ class TranslateBehaviorTest extends CakeTestCase { /** * testReadSelectedFields method * - * @access public * @return void */ public function testReadSelectedFields() { @@ -488,7 +475,6 @@ class TranslateBehaviorTest extends CakeTestCase { /** * testSaveCreate method * - * @access public * @return void */ public function testSaveCreate() { @@ -507,7 +493,6 @@ class TranslateBehaviorTest extends CakeTestCase { /** * testSaveUpdate method * - * @access public * @return void */ public function testSaveUpdate() { @@ -530,7 +515,6 @@ class TranslateBehaviorTest extends CakeTestCase { /** * testMultipleCreate method * - * @access public * @return void */ public function testMultipleCreate() { @@ -569,7 +553,6 @@ class TranslateBehaviorTest extends CakeTestCase { /** * testMultipleUpdate method * - * @access public * @return void */ public function testMultipleUpdate() { @@ -612,7 +595,6 @@ class TranslateBehaviorTest extends CakeTestCase { /** * testMixedCreateUpdateWithArrayLocale method * - * @access public * @return void */ public function testMixedCreateUpdateWithArrayLocale() { @@ -654,7 +636,6 @@ class TranslateBehaviorTest extends CakeTestCase { /** * testValidation method * - * @access public * @return void */ public function testValidation() { @@ -687,7 +668,6 @@ class TranslateBehaviorTest extends CakeTestCase { /** * testAttachDetach method * - * @access public * @return void */ public function testAttachDetach() { @@ -737,7 +717,6 @@ class TranslateBehaviorTest extends CakeTestCase { /** * testAnotherTranslateTable method * - * @access public * @return void */ public function testAnotherTranslateTable() { @@ -761,7 +740,6 @@ class TranslateBehaviorTest extends CakeTestCase { /** * testTranslateWithAssociations method * - * @access public * @return void */ public function testTranslateWithAssociations() { @@ -855,7 +833,6 @@ class TranslateBehaviorTest extends CakeTestCase { * testTranslateTableWithPrefix method * Tests that is possible to have a translation model with a custom tablePrefix * - * @access public * @return void */ public function testTranslateTableWithPrefix() { diff --git a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorAfterTest.php b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorAfterTest.php index f53ed828b..6eaf118d9 100644 --- a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorAfterTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorAfterTest.php @@ -33,7 +33,6 @@ class TreeBehaviorAfterTest extends CakeTestCase { * Whether backup global state for each test method or not * * @var bool false - * @access public */ public $backupGlobals = false; @@ -41,7 +40,6 @@ class TreeBehaviorAfterTest extends CakeTestCase { * settings property * * @var array - * @access public */ public $settings = array( 'modelClass' => 'AfterTree', @@ -54,14 +52,12 @@ class TreeBehaviorAfterTest extends CakeTestCase { * fixtures property * * @var array - * @access public */ public $fixtures = array('core.after_tree'); /** * Tests the afterSave callback in the model * - * @access public * @return void */ public function testAftersaveCallback() { diff --git a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorNumberTest.php b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorNumberTest.php index 3a3257448..b1b273e7b 100644 --- a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorNumberTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorNumberTest.php @@ -34,7 +34,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { * Whether backup global state for each test method or not * * @var bool false - * @access public */ public $backupGlobals = false; @@ -42,7 +41,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { * settings property * * @var array - * @access protected */ protected $settings = array( 'modelClass' => 'NumberTree', @@ -55,14 +53,12 @@ class TreeBehaviorNumberTest extends CakeTestCase { * fixtures property * * @var array - * @access public */ public $fixtures = array('core.number_tree'); /** * testInitialize method * - * @access public * @return void */ public function testInitialize() { @@ -80,7 +76,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testDetectInvalidLeft method * - * @access public * @return void */ public function testDetectInvalidLeft() { @@ -107,7 +102,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testDetectInvalidRight method * - * @access public * @return void */ public function testDetectInvalidRight() { @@ -134,7 +128,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testDetectInvalidParent method * - * @access public * @return void */ public function testDetectInvalidParent() { @@ -160,7 +153,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testDetectNoneExistantParent method * - * @access public * @return void */ public function testDetectNoneExistantParent() { @@ -184,7 +176,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testRecoverFromMissingParent method * - * @access public * @return void */ public function testRecoverFromMissingParent() { @@ -208,7 +199,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testDetectInvalidParents method * - * @access public * @return void */ public function testDetectInvalidParents() { @@ -231,7 +221,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testDetectInvalidLftsRghts method * - * @access public * @return void */ public function testDetectInvalidLftsRghts() { @@ -253,7 +242,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * Reproduces a situation where a single node has lft= rght, and all other lft and rght fields follow sequentially * - * @access public * @return void */ public function testDetectEqualLftsRghts() { @@ -281,7 +269,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testAddOrphan method * - * @access public * @return void */ public function testAddOrphan() { @@ -301,7 +288,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testAddMiddle method * - * @access public * @return void */ public function testAddMiddle() { @@ -335,7 +321,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testAddInvalid method * - * @access public * @return void */ public function testAddInvalid() { @@ -360,7 +345,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testAddNotIndexedByModel method * - * @access public * @return void */ public function testAddNotIndexedByModel() { @@ -380,7 +364,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testMovePromote method * - * @access public * @return void */ public function testMovePromote() { @@ -407,7 +390,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testMoveWithWhitelist method * - * @access public * @return void */ public function testMoveWithWhitelist() { @@ -435,7 +417,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testInsertWithWhitelist method * - * @access public * @return void */ public function testInsertWithWhitelist() { @@ -454,7 +435,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testMoveBefore method * - * @access public * @return void */ public function testMoveBefore() { @@ -483,7 +463,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testMoveAfter method * - * @access public * @return void */ public function testMoveAfter() { @@ -512,7 +491,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testMoveDemoteInvalid method * - * @access public * @return void */ public function testMoveDemoteInvalid() { @@ -546,7 +524,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testMoveInvalid method * - * @access public * @return void */ public function testMoveInvalid() { @@ -573,7 +550,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testMoveSelfInvalid method * - * @access public * @return void */ public function testMoveSelfInvalid() { @@ -600,7 +576,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testMoveUpSuccess method * - * @access public * @return void */ public function testMoveUpSuccess() { @@ -622,7 +597,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testMoveUpFail method * - * @access public * @return void */ public function testMoveUpFail() { @@ -645,7 +619,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testMoveUp2 method * - * @access public * @return void */ public function testMoveUp2() { @@ -676,7 +649,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testMoveUpFirst method * - * @access public * @return void */ public function testMoveUpFirst() { @@ -707,7 +679,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testMoveDownSuccess method * - * @access public * @return void */ public function testMoveDownSuccess() { @@ -729,7 +700,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testMoveDownFail method * - * @access public * @return void */ public function testMoveDownFail() { @@ -751,7 +721,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testMoveDownLast method * - * @access public * @return void */ public function testMoveDownLast() { @@ -782,7 +751,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testMoveDown2 method * - * @access public * @return void */ public function testMoveDown2() { @@ -813,7 +781,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testSaveNoMove method * - * @access public * @return void */ public function testSaveNoMove() { @@ -844,7 +811,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testMoveToRootAndMoveUp method * - * @access public * @return void */ public function testMoveToRootAndMoveUp() { @@ -869,7 +835,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testDelete method * - * @access public * @return void */ public function testDelete() { @@ -905,7 +870,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testRemove method * - * @access public * @return void */ public function testRemove() { @@ -938,7 +902,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testRemoveLastTopParent method * - * @access public * @return void */ public function testRemoveLastTopParent() { @@ -1006,7 +969,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testRemoveAndDelete method * - * @access public * @return void */ public function testRemoveAndDelete() { @@ -1071,7 +1033,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testChildren method * - * @access public * @return void */ public function testChildren() { @@ -1102,7 +1063,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testCountChildren method * - * @access public * @return void */ public function testCountChildren() { @@ -1128,7 +1088,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testGetParentNode method * - * @access public * @return void */ public function testGetParentNode() { @@ -1147,7 +1106,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testGetPath method * - * @access public * @return void */ public function testGetPath() { @@ -1168,7 +1126,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testNoAmbiguousColumn method * - * @access public * @return void */ public function testNoAmbiguousColumn() { @@ -1201,7 +1158,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testReorderTree method * - * @access public * @return void */ public function testReorderTree() { @@ -1233,7 +1189,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { * This caused infinite loops when moving down elements as stale data is returned * from the memory cache * - * @access public * @return void */ public function testReorderBigTreeWithQueryCaching() { @@ -1250,7 +1205,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testGenerateTreeListWithSelfJoin method * - * @access public * @return void */ public function testGenerateTreeListWithSelfJoin() { @@ -1268,7 +1222,6 @@ class TreeBehaviorNumberTest extends CakeTestCase { /** * testArraySyntax method * - * @access public * @return void */ public function testArraySyntax() { diff --git a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorScopedTest.php b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorScopedTest.php index 166543e77..b6d6c3122 100644 --- a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorScopedTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorScopedTest.php @@ -34,7 +34,6 @@ class TreeBehaviorScopedTest extends CakeTestCase { * Whether backup global state for each test method or not * * @var bool false - * @access public */ public $backupGlobals = false; @@ -42,7 +41,6 @@ class TreeBehaviorScopedTest extends CakeTestCase { * settings property * * @var array - * @access public */ public $settings = array( 'modelClass' => 'FlagTree', @@ -55,14 +53,12 @@ class TreeBehaviorScopedTest extends CakeTestCase { * fixtures property * * @var array - * @access public */ public $fixtures = array('core.flag_tree', 'core.ad', 'core.campaign', 'core.translate', 'core.number_tree_two'); /** * testStringScope method * - * @access public * @return void */ public function testStringScope() { @@ -99,7 +95,6 @@ class TreeBehaviorScopedTest extends CakeTestCase { /** * testArrayScope method * - * @access public * @return void */ public function testArrayScope() { @@ -136,7 +131,6 @@ class TreeBehaviorScopedTest extends CakeTestCase { /** * testMoveUpWithScope method * - * @access public * @return void */ public function testMoveUpWithScope() { @@ -153,7 +147,6 @@ class TreeBehaviorScopedTest extends CakeTestCase { /** * testMoveDownWithScope method * - * @access public * @return void */ public function testMoveDownWithScope() { @@ -171,7 +164,6 @@ class TreeBehaviorScopedTest extends CakeTestCase { * Tests the interaction (non-interference) between TreeBehavior and other behaviors with respect * to callback hooks * - * @access public * @return void */ public function testTranslatingTree() { diff --git a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorUuidTest.php b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorUuidTest.php index 9b5446adf..99886541c 100644 --- a/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorUuidTest.php +++ b/lib/Cake/Test/Case/Model/Behavior/TreeBehaviorUuidTest.php @@ -34,7 +34,6 @@ class TreeBehaviorUuidTest extends CakeTestCase { * Whether backup global state for each test method or not * * @var bool false - * @access public */ public $backupGlobals = false; @@ -42,7 +41,6 @@ class TreeBehaviorUuidTest extends CakeTestCase { * settings property * * @var array - * @access public */ public $settings = array( 'modelClass' => 'UuidTree', @@ -55,7 +53,6 @@ class TreeBehaviorUuidTest extends CakeTestCase { * fixtures property * * @var array - * @access public */ public $fixtures = array('core.uuid_tree'); diff --git a/lib/Cake/Test/Case/Model/BehaviorCollectionTest.php b/lib/Cake/Test/Case/Model/BehaviorCollectionTest.php index c9bff3151..757216c4e 100644 --- a/lib/Cake/Test/Case/Model/BehaviorCollectionTest.php +++ b/lib/Cake/Test/Case/Model/BehaviorCollectionTest.php @@ -33,7 +33,6 @@ class TestBehavior extends ModelBehavior { * mapMethods property * * @var array - * @access public */ public $mapMethods = array('/test(\w+)/' => 'testMethod', '/look for\s+(.+)/' => 'speakEnglish'); @@ -42,7 +41,6 @@ class TestBehavior extends ModelBehavior { * * @param mixed $model * @param array $config - * @access public * @return void */ public function setup($model, $config = array()) { @@ -58,7 +56,6 @@ class TestBehavior extends ModelBehavior { * * @param mixed $model * @param mixed $query - * @access public * @return void */ public function beforeFind($model, $query) { @@ -87,7 +84,6 @@ class TestBehavior extends ModelBehavior { * @param mixed $model * @param mixed $results * @param mixed $primary - * @access public * @return void */ public function afterFind($model, $results, $primary) { @@ -115,7 +111,6 @@ class TestBehavior extends ModelBehavior { * beforeSave method * * @param mixed $model - * @access public * @return void */ public function beforeSave($model) { @@ -142,7 +137,6 @@ class TestBehavior extends ModelBehavior { * * @param mixed $model * @param mixed $created - * @access public * @return void */ public function afterSave($model, $created) { @@ -174,7 +168,6 @@ class TestBehavior extends ModelBehavior { * beforeValidate method * * @param mixed $model - * @access public * @return void */ public function beforeValidate($model) { @@ -206,7 +199,6 @@ class TestBehavior extends ModelBehavior { * * @param mixed $model * @param bool $cascade - * @access public * @return void */ public function beforeDelete($model, $cascade = true) { @@ -235,7 +227,6 @@ class TestBehavior extends ModelBehavior { * afterDelete method * * @param mixed $model - * @access public * @return void */ public function afterDelete($model) { @@ -254,7 +245,6 @@ class TestBehavior extends ModelBehavior { * onError method * * @param mixed $model - * @access public * @return void */ public function onError($model, $error) { @@ -268,7 +258,6 @@ class TestBehavior extends ModelBehavior { * beforeTest method * * @param mixed $model - * @access public * @return void */ public function beforeTest($model) { @@ -284,7 +273,6 @@ class TestBehavior extends ModelBehavior { * * @param mixed $model * @param bool $param - * @access public * @return void */ public function testMethod(Model $model, $param = true) { @@ -297,7 +285,6 @@ class TestBehavior extends ModelBehavior { * testData method * * @param mixed $model - * @access public * @return void */ public function testData(Model $model) { @@ -313,7 +300,6 @@ class TestBehavior extends ModelBehavior { * * @param mixed $model * @param mixed $field - * @access public * @return void */ public function validateField(Model $model, $field) { @@ -326,7 +312,6 @@ class TestBehavior extends ModelBehavior { * @param mixed $model * @param mixed $method * @param mixed $query - * @access public * @return void */ public function speakEnglish(Model $model, $method, $query) { @@ -430,7 +415,6 @@ class BehaviorCollectionTest extends CakeTestCase { * fixtures property * * @var array - * @access public */ public $fixtures = array( 'core.apple', 'core.sample', 'core.article', 'core.user', 'core.comment', @@ -467,7 +451,6 @@ class BehaviorCollectionTest extends CakeTestCase { /** * testBehaviorBinding method * - * @access public * @return void */ public function testBehaviorBinding() { @@ -566,7 +549,6 @@ class BehaviorCollectionTest extends CakeTestCase { /** * testBehaviorToggling method * - * @access public * @return void */ public function testBehaviorToggling() { @@ -602,7 +584,6 @@ class BehaviorCollectionTest extends CakeTestCase { /** * testBehaviorFindCallbacks method * - * @access public * @return void */ public function testBehaviorFindCallbacks() { @@ -661,7 +642,6 @@ class BehaviorCollectionTest extends CakeTestCase { /** * testBehaviorHasManyFindCallbacks method * - * @access public * @return void */ public function testBehaviorHasManyFindCallbacks() { @@ -733,7 +713,6 @@ class BehaviorCollectionTest extends CakeTestCase { /** * testBehaviorHasOneFindCallbacks method * - * @access public * @return void */ public function testBehaviorHasOneFindCallbacks() { @@ -803,7 +782,6 @@ class BehaviorCollectionTest extends CakeTestCase { /** * testBehaviorBelongsToFindCallbacks method * - * @access public * @return void */ public function testBehaviorBelongsToFindCallbacks() { @@ -872,7 +850,6 @@ class BehaviorCollectionTest extends CakeTestCase { /** * testBehaviorSaveCallbacks method * - * @access public * @return void */ public function testBehaviorSaveCallbacks() { @@ -953,7 +930,6 @@ class BehaviorCollectionTest extends CakeTestCase { /** * testBehaviorDeleteCallbacks method * - * @access public * @return void */ public function testBehaviorDeleteCallbacks() { @@ -988,7 +964,6 @@ class BehaviorCollectionTest extends CakeTestCase { /** * testBehaviorOnErrorCallback method * - * @access public * @return void */ public function testBehaviorOnErrorCallback() { @@ -1003,7 +978,6 @@ class BehaviorCollectionTest extends CakeTestCase { /** * testBehaviorValidateCallback method * - * @access public * @return void */ public function testBehaviorValidateCallback() { @@ -1032,7 +1006,6 @@ class BehaviorCollectionTest extends CakeTestCase { /** * testBehaviorValidateMethods method * - * @access public * @return void */ public function testBehaviorValidateMethods() { @@ -1051,7 +1024,6 @@ class BehaviorCollectionTest extends CakeTestCase { /** * testBehaviorMethodDispatching method * - * @access public * @return void */ public function testBehaviorMethodDispatching() { @@ -1077,7 +1049,6 @@ class BehaviorCollectionTest extends CakeTestCase { /** * testBehaviorMethodDispatchingWithData method * - * @access public * @return void */ public function testBehaviorMethodDispatchingWithData() { @@ -1141,7 +1112,6 @@ class BehaviorCollectionTest extends CakeTestCase { /** * Test attach and detaching * - * @access public * @return void */ public function testBehaviorAttachAndDetach() { diff --git a/lib/Cake/Test/Case/Model/CakeSchemaTest.php b/lib/Cake/Test/Case/Model/CakeSchemaTest.php index f4ddb4ebc..936e8d675 100644 --- a/lib/Cake/Test/Case/Model/CakeSchemaTest.php +++ b/lib/Cake/Test/Case/Model/CakeSchemaTest.php @@ -32,7 +32,6 @@ class MyAppSchema extends CakeSchema { * name property * * @var string 'MyApp' - * @access public */ public $name = 'MyApp'; @@ -40,7 +39,6 @@ class MyAppSchema extends CakeSchema { * connection property * * @var string 'test' - * @access public */ public $connection = 'test'; @@ -48,7 +46,6 @@ class MyAppSchema extends CakeSchema { * comments property * * @var array - * @access public */ public $comments = array( 'id' => array('type' => 'integer', 'null' => false, 'default' => 0, 'key' => 'primary'), @@ -66,7 +63,6 @@ class MyAppSchema extends CakeSchema { * posts property * * @var array - * @access public */ public $posts = array( 'id' => array('type' => 'integer', 'null' => false, 'default' => 0, 'key' => 'primary'), @@ -84,7 +80,6 @@ class MyAppSchema extends CakeSchema { * _foo property * * @var array - * @access protected */ protected $_foo = array('bar'); @@ -92,7 +87,6 @@ class MyAppSchema extends CakeSchema { * setup method * * @param mixed $version - * @access public * @return void */ public function setup($version) { @@ -102,7 +96,6 @@ class MyAppSchema extends CakeSchema { * teardown method * * @param mixed $version - * @access public * @return void */ public function teardown($version) { @@ -133,7 +126,6 @@ class TestAppSchema extends CakeSchema { * name property * * @var string 'MyApp' - * @access public */ public $name = 'MyApp'; @@ -141,7 +133,6 @@ class TestAppSchema extends CakeSchema { * comments property * * @var array - * @access public */ public $comments = array( 'id' => array('type' => 'integer', 'null' => false, 'default' => 0,'key' => 'primary'), @@ -159,7 +150,6 @@ class TestAppSchema extends CakeSchema { * posts property * * @var array - * @access public */ public $posts = array( 'id' => array('type' => 'integer', 'null' => false, 'default' => 0, 'key' => 'primary'), @@ -177,7 +167,6 @@ class TestAppSchema extends CakeSchema { * posts_tags property * * @var array - * @access public */ public $posts_tags = array( 'post_id' => array('type' => 'integer', 'null' => false, 'key' => 'primary'), @@ -190,7 +179,6 @@ class TestAppSchema extends CakeSchema { * tags property * * @var array - * @access public */ public $tags = array( 'id' => array('type' => 'integer', 'null' => false, 'default' => 0, 'key' => 'primary'), @@ -205,7 +193,6 @@ class TestAppSchema extends CakeSchema { * datatypes property * * @var array - * @access public */ public $datatypes = array( 'id' => array('type' => 'integer', 'null' => false, 'default' => 0, 'key' => 'primary'), @@ -219,7 +206,6 @@ class TestAppSchema extends CakeSchema { * setup method * * @param mixed $version - * @access public * @return void */ public function setup($version) { @@ -229,7 +215,6 @@ class TestAppSchema extends CakeSchema { * teardown method * * @param mixed $version - * @access public * @return void */ public function teardown($version) { @@ -247,7 +232,6 @@ class SchemaPost extends CakeTestModel { * name property * * @var string 'SchemaPost' - * @access public */ public $name = 'SchemaPost'; @@ -255,7 +239,6 @@ class SchemaPost extends CakeTestModel { * useTable property * * @var string 'posts' - * @access public */ public $useTable = 'posts'; @@ -263,7 +246,6 @@ class SchemaPost extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array('SchemaComment'); @@ -271,7 +253,6 @@ class SchemaPost extends CakeTestModel { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('SchemaTag'); } @@ -287,7 +268,6 @@ class SchemaComment extends CakeTestModel { * name property * * @var string 'SchemaComment' - * @access public */ public $name = 'SchemaComment'; @@ -295,7 +275,6 @@ class SchemaComment extends CakeTestModel { * useTable property * * @var string 'comments' - * @access public */ public $useTable = 'comments'; @@ -303,7 +282,6 @@ class SchemaComment extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('SchemaPost'); } @@ -319,7 +297,6 @@ class SchemaTag extends CakeTestModel { * name property * * @var string 'SchemaTag' - * @access public */ public $name = 'SchemaTag'; @@ -327,7 +304,6 @@ class SchemaTag extends CakeTestModel { * useTable property * * @var string 'tags' - * @access public */ public $useTable = 'tags'; @@ -335,7 +311,6 @@ class SchemaTag extends CakeTestModel { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('SchemaPost'); } @@ -351,7 +326,6 @@ class SchemaDatatype extends CakeTestModel { * name property * * @var string 'SchemaDatatype' - * @access public */ public $name = 'SchemaDatatype'; @@ -359,7 +333,6 @@ class SchemaDatatype extends CakeTestModel { * useTable property * * @var string 'datatypes' - * @access public */ public $useTable = 'datatypes'; } @@ -381,7 +354,6 @@ class Testdescribe extends CakeTestModel { * name property * * @var string 'Testdescribe' - * @access public */ public $name = 'Testdescribe'; } @@ -397,7 +369,6 @@ class SchemaCrossDatabase extends CakeTestModel { * name property * * @var string 'SchemaCrossDatabase' - * @access public */ public $name = 'SchemaCrossDatabase'; @@ -405,7 +376,6 @@ class SchemaCrossDatabase extends CakeTestModel { * useTable property * * @var string 'posts' - * @access public */ public $useTable = 'cross_database'; @@ -413,7 +383,6 @@ class SchemaCrossDatabase extends CakeTestModel { * useDbConfig property * * @var string 'test2' - * @access public */ public $useDbConfig = 'test2'; } @@ -429,14 +398,12 @@ class SchemaCrossDatabaseFixture extends CakeTestFixture { * name property * * @var string 'CrossDatabase' - * @access public */ public $name = 'CrossDatabase'; /** * table property * - * @access public */ public $table = 'cross_database'; @@ -444,7 +411,6 @@ class SchemaCrossDatabaseFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -455,7 +421,6 @@ class SchemaCrossDatabaseFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('id' => 1, 'name' => 'First'), @@ -500,7 +465,6 @@ class CakeSchemaTest extends CakeTestCase { * fixtures property * * @var array - * @access public */ public $fixtures = array( 'core.post', 'core.tag', 'core.posts_tag', 'core.test_plugin_comment', @@ -537,7 +501,6 @@ class CakeSchemaTest extends CakeTestCase { /** * testSchemaName method * - * @access public * @return void */ public function testSchemaName() { @@ -554,7 +517,6 @@ class CakeSchemaTest extends CakeTestCase { /** * testSchemaRead method * - * @access public * @return void */ public function testSchemaRead() { @@ -639,7 +601,6 @@ class CakeSchemaTest extends CakeTestCase { /** * testSchemaReadWithOddTablePrefix method * - * @access public * @return void */ public function testSchemaReadWithOddTablePrefix() { @@ -792,7 +753,6 @@ class CakeSchemaTest extends CakeTestCase { /** * testSchemaWrite method * - * @access public * @return void */ public function testSchemaWrite() { @@ -808,7 +768,6 @@ class CakeSchemaTest extends CakeTestCase { /** * testSchemaComparison method * - * @access public * @return void */ public function testSchemaComparison() { @@ -1009,7 +968,6 @@ class CakeSchemaTest extends CakeTestCase { /** * testSchemaLoading method * - * @access public * @return void */ public function testSchemaLoading() { @@ -1038,7 +996,6 @@ class CakeSchemaTest extends CakeTestCase { /** * testSchemaCreateTable method * - * @access public * @return void */ public function testSchemaCreateTable() { diff --git a/lib/Cake/Test/Case/Model/ConnectionManagerTest.php b/lib/Cake/Test/Case/Model/ConnectionManagerTest.php index 533ce116d..0bc163063 100644 --- a/lib/Cake/Test/Case/Model/ConnectionManagerTest.php +++ b/lib/Cake/Test/Case/Model/ConnectionManagerTest.php @@ -37,7 +37,6 @@ class ConnectionManagerTest extends CakeTestCase { /** * testEnumConnectionObjects method * - * @access public * @return void */ public function testEnumConnectionObjects() { @@ -51,7 +50,6 @@ class ConnectionManagerTest extends CakeTestCase { /** * testGetDataSource method * - * @access public * @return void */ public function testGetDataSource() { @@ -86,7 +84,6 @@ class ConnectionManagerTest extends CakeTestCase { /** * testGetPluginDataSource method * - * @access public * @return void */ public function testGetPluginDataSource() { @@ -108,7 +105,6 @@ class ConnectionManagerTest extends CakeTestCase { /** * testGetPluginDataSourceAndPluginDriver method * - * @access public * @return void */ public function testGetPluginDataSourceAndPluginDriver() { @@ -132,7 +128,6 @@ class ConnectionManagerTest extends CakeTestCase { /** * testGetLocalDataSourceAndPluginDriver method * - * @access public * @return void */ public function testGetLocalDataSourceAndPluginDriver() { @@ -155,7 +150,6 @@ class ConnectionManagerTest extends CakeTestCase { /** * testGetPluginDataSourceAndLocalDriver method * - * @access public * @return void */ public function testGetPluginDataSourceAndLocalDriver() { @@ -181,7 +175,6 @@ class ConnectionManagerTest extends CakeTestCase { /** * testSourceList method * - * @access public * @return void */ public function testSourceList() { @@ -194,7 +187,6 @@ class ConnectionManagerTest extends CakeTestCase { /** * testGetSourceName method * - * @access public * @return void */ public function testGetSourceName() { @@ -212,7 +204,6 @@ class ConnectionManagerTest extends CakeTestCase { /** * testLoadDataSource method * - * @access public * @return void */ public function testLoadDataSource() { @@ -243,7 +234,6 @@ class ConnectionManagerTest extends CakeTestCase { /** * testCreateDataSource method * - * @access public * @return void */ public function testCreateDataSourceWithIntegrationTests() { @@ -276,7 +266,6 @@ class ConnectionManagerTest extends CakeTestCase { /** * testConnectionData method * - * @access public * @return void */ public function testConnectionData() { diff --git a/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php b/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php index 5562b6497..ac89c0a1a 100644 --- a/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php @@ -42,14 +42,12 @@ class CakeSessionTest extends CakeTestCase { * Fixtures used in the SessionTest * * @var array - * @access public */ public $fixtures = array('core.session'); /** * setup before class. * - * @access public * @return void */ public static function setupBeforeClass() { @@ -61,7 +59,6 @@ class CakeSessionTest extends CakeTestCase { /** * teardown after class * - * @access public * @return void */ public static function teardownAfterClass() { @@ -72,7 +69,6 @@ class CakeSessionTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setup() { @@ -90,7 +86,6 @@ class CakeSessionTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function teardown() { @@ -127,7 +122,6 @@ class CakeSessionTest extends CakeTestCase { /** * testSessionPath * - * @access public * @return void */ public function testSessionPath() { @@ -141,7 +135,6 @@ class CakeSessionTest extends CakeTestCase { /** * testCakeSessionPathEmpty * - * @access public * @return void */ public function testCakeSessionPathEmpty() { @@ -152,7 +145,6 @@ class CakeSessionTest extends CakeTestCase { /** * testCakeSessionPathContainsParams * - * @access public * @return void */ public function testCakeSessionPathContainsQuestion() { @@ -163,7 +155,6 @@ class CakeSessionTest extends CakeTestCase { /** * testSetHost * - * @access public * @return void */ public function testSetHost() { @@ -175,7 +166,6 @@ class CakeSessionTest extends CakeTestCase { /** * testSetHostWithPort * - * @access public * @return void */ public function testSetHostWithPort() { @@ -215,7 +205,6 @@ class CakeSessionTest extends CakeTestCase { /** * testCheck method * - * @access public * @return void */ public function testCheck() { @@ -228,7 +217,6 @@ class CakeSessionTest extends CakeTestCase { /** * testSimpleRead method * - * @access public * @return void */ public function testSimpleRead() { @@ -257,7 +245,6 @@ class CakeSessionTest extends CakeTestCase { * testReadyEmpty * * @return void - * @access public */ public function testReadyEmpty() { $this->assertFalse(TestCakeSession::read('')); @@ -267,7 +254,6 @@ class CakeSessionTest extends CakeTestCase { * test writing a hash of values/ * * @return void - * @access public */ public function testWriteArray() { $result = TestCakeSession::write(array( @@ -286,7 +272,6 @@ class CakeSessionTest extends CakeTestCase { * testWriteEmptyKey * * @return void - * @access public */ public function testWriteEmptyKey() { $this->assertFalse(TestCakeSession::write('', 'graham')); @@ -297,7 +282,6 @@ class CakeSessionTest extends CakeTestCase { /** * testId method * - * @access public * @return void */ public function testId() { @@ -315,7 +299,6 @@ class CakeSessionTest extends CakeTestCase { /** * testStarted method * - * @access public * @return void */ public function testStarted() { @@ -330,7 +313,6 @@ class CakeSessionTest extends CakeTestCase { /** * testError method * - * @access public * @return void */ public function testError() { @@ -346,7 +328,6 @@ class CakeSessionTest extends CakeTestCase { /** * testDel method * - * @access public * @return void */ public function testDelete() { @@ -364,7 +345,6 @@ class CakeSessionTest extends CakeTestCase { /** * testDestroy method * - * @access public * @return void */ public function testDestroy() { @@ -379,7 +359,6 @@ class CakeSessionTest extends CakeTestCase { /** * testCheckingSavedEmpty method * - * @access public * @return void */ public function testCheckingSavedEmpty() { @@ -399,7 +378,6 @@ class CakeSessionTest extends CakeTestCase { /** * testCheckKeyWithSpaces method * - * @access public * @return void */ public function testCheckKeyWithSpaces() { @@ -414,7 +392,6 @@ class CakeSessionTest extends CakeTestCase { /** * testCheckEmpty * - * @access public * @return void */ public function testCheckEmpty() { @@ -438,7 +415,6 @@ class CakeSessionTest extends CakeTestCase { /** * testReadingSavedEmpty method * - * @access public * @return void */ public function testReadingSavedEmpty() { @@ -459,7 +435,6 @@ class CakeSessionTest extends CakeTestCase { /** * testCheckUserAgentFalse method * - * @access public * @return void */ public function testCheckUserAgentFalse() { @@ -471,7 +446,6 @@ class CakeSessionTest extends CakeTestCase { /** * testCheckUserAgentTrue method * - * @access public * @return void */ public function testCheckUserAgentTrue() { @@ -487,7 +461,6 @@ class CakeSessionTest extends CakeTestCase { /** * testReadAndWriteWithDatabaseStorage method * - * @access public * @return void */ public function testReadAndWriteWithCakeStorage() { @@ -570,7 +543,6 @@ class CakeSessionTest extends CakeTestCase { /** * testReadAndWriteWithDatabaseStorage method * - * @access public * @return void */ public function testReadAndWriteWithCacheStorage() { @@ -630,7 +602,6 @@ class CakeSessionTest extends CakeTestCase { /** * testReadAndWriteWithDatabaseStorage method * - * @access public * @return void */ public function testReadAndWriteWithDatabaseStorage() { @@ -673,7 +644,6 @@ class CakeSessionTest extends CakeTestCase { /** * testSessionTimeout method * - * @access public * @return void */ public function testSessionTimeout() { diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php index 4d3497a05..5e7a6d6df 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php @@ -33,7 +33,6 @@ class DboMysqlTest extends CakeTestCase { * autoFixtures property * * @var bool false - * @access public */ public $autoFixtures = false; @@ -41,7 +40,6 @@ class DboMysqlTest extends CakeTestCase { * fixtures property * * @var array - * @access public */ public $fixtures = array( 'core.apple', 'core.article', 'core.articles_tag', 'core.attachment', 'core.comment', @@ -53,7 +51,6 @@ class DboMysqlTest extends CakeTestCase { * The Dbo instance to be tested * * @var DboSource - * @access public */ public $Dbo = null; @@ -659,7 +656,6 @@ class DboMysqlTest extends CakeTestCase { /** * testReadTableParameters method * - * @access public * @return void */ public function testReadTableParameters() { @@ -689,7 +685,6 @@ class DboMysqlTest extends CakeTestCase { /** * testBuildTableParameters method * - * @access public * @return void */ public function testBuildTableParameters() { @@ -709,7 +704,6 @@ class DboMysqlTest extends CakeTestCase { /** * testBuildTableParameters method * - * @access public * @return void */ public function testGetCharsetName() { @@ -850,7 +844,6 @@ class DboMysqlTest extends CakeTestCase { /** * testFieldDoubleEscaping method * - * @access public * @return void */ public function testFieldDoubleEscaping() { @@ -985,7 +978,6 @@ class DboMysqlTest extends CakeTestCase { * buildRelatedModels method * * @param mixed $model - * @access protected * @return void */ function _buildRelatedModels($model) { @@ -1008,7 +1000,6 @@ class DboMysqlTest extends CakeTestCase { * @param mixed $model * @param mixed $queryData * @param mixed $binding - * @access public * @return void */ function &_prepareAssociationQuery($model, &$queryData, $binding) { @@ -1019,7 +1010,9 @@ class DboMysqlTest extends CakeTestCase { $linkModel = $model->{$className}; $external = isset($assocData['external']); - $queryData = $this->Dbo->__scrubQueryData($queryData); + $reflection = new ReflectionMethod($this->Dbo, '_scrubQueryData'); + $reflection->setAccessible(true); + $queryData = $reflection->invokeArgs($this->Dbo, array($queryData)); $result = array_merge(array('linkModel' => &$linkModel), compact('type', 'assoc', 'assocData', 'external')); return $result; @@ -1028,7 +1021,6 @@ class DboMysqlTest extends CakeTestCase { /** * testGenerateInnerJoinAssociationQuery method * - * @access public * @return void */ public function testGenerateInnerJoinAssociationQuery() { @@ -1057,7 +1049,6 @@ class DboMysqlTest extends CakeTestCase { /** * testGenerateAssociationQuerySelfJoinWithConditionsInHasOneBinding method * - * @access public * @return void */ public function testGenerateAssociationQuerySelfJoinWithConditionsInHasOneBinding() { @@ -1085,7 +1076,6 @@ class DboMysqlTest extends CakeTestCase { /** * testGenerateAssociationQuerySelfJoinWithConditionsInBelongsToBinding method * - * @access public * @return void */ public function testGenerateAssociationQuerySelfJoinWithConditionsInBelongsToBinding() { @@ -1112,7 +1102,6 @@ class DboMysqlTest extends CakeTestCase { /** * testGenerateAssociationQuerySelfJoinWithConditions method * - * @access public * @return void */ public function testGenerateAssociationQuerySelfJoinWithConditions() { @@ -1174,7 +1163,6 @@ class DboMysqlTest extends CakeTestCase { /** * testGenerateAssociationQueryHasOne method * - * @access public * @return void */ public function testGenerateAssociationQueryHasOne() { @@ -1207,7 +1195,6 @@ class DboMysqlTest extends CakeTestCase { /** * testGenerateAssociationQueryHasOneWithConditions method * - * @access public * @return void */ public function testGenerateAssociationQueryHasOneWithConditions() { @@ -1237,7 +1224,6 @@ class DboMysqlTest extends CakeTestCase { /** * testGenerateAssociationQueryBelongsTo method * - * @access public * @return void */ public function testGenerateAssociationQueryBelongsTo() { @@ -1269,7 +1255,6 @@ class DboMysqlTest extends CakeTestCase { /** * testGenerateAssociationQueryBelongsToWithConditions method * - * @access public * @return void */ public function testGenerateAssociationQueryBelongsToWithConditions() { @@ -1301,7 +1286,6 @@ class DboMysqlTest extends CakeTestCase { /** * testGenerateAssociationQueryHasMany method * - * @access public * @return void */ public function testGenerateAssociationQueryHasMany() { @@ -1331,7 +1315,6 @@ class DboMysqlTest extends CakeTestCase { /** * testGenerateAssociationQueryHasManyWithLimit method * - * @access public * @return void */ public function testGenerateAssociationQueryHasManyWithLimit() { @@ -1371,7 +1354,6 @@ class DboMysqlTest extends CakeTestCase { /** * testGenerateAssociationQueryHasManyWithConditions method * - * @access public * @return void */ public function testGenerateAssociationQueryHasManyWithConditions() { @@ -1400,7 +1382,6 @@ class DboMysqlTest extends CakeTestCase { /** * testGenerateAssociationQueryHasManyWithOffsetAndLimit method * - * @access public * @return void */ public function testGenerateAssociationQueryHasManyWithOffsetAndLimit() { @@ -1438,7 +1419,6 @@ class DboMysqlTest extends CakeTestCase { /** * testGenerateAssociationQueryHasManyWithPageAndLimit method * - * @access public * @return void */ public function testGenerateAssociationQueryHasManyWithPageAndLimit() { @@ -1475,7 +1455,6 @@ class DboMysqlTest extends CakeTestCase { /** * testGenerateAssociationQueryHasManyWithFields method * - * @access public * @return void */ public function testGenerateAssociationQueryHasManyWithFields() { @@ -1623,7 +1602,6 @@ class DboMysqlTest extends CakeTestCase { /** * testGenerateAssociationQueryHasAndBelongsToMany method * - * @access public * @return void */ public function testGenerateAssociationQueryHasAndBelongsToMany() { @@ -1655,7 +1633,6 @@ class DboMysqlTest extends CakeTestCase { /** * testGenerateAssociationQueryHasAndBelongsToManyWithConditions method * - * @access public * @return void */ public function testGenerateAssociationQueryHasAndBelongsToManyWithConditions() { @@ -1684,7 +1661,6 @@ class DboMysqlTest extends CakeTestCase { /** * testGenerateAssociationQueryHasAndBelongsToManyWithOffsetAndLimit method * - * @access public * @return void */ public function testGenerateAssociationQueryHasAndBelongsToManyWithOffsetAndLimit() { @@ -1721,7 +1697,6 @@ class DboMysqlTest extends CakeTestCase { /** * testGenerateAssociationQueryHasAndBelongsToManyWithPageAndLimit method * - * @access public * @return void */ public function testGenerateAssociationQueryHasAndBelongsToManyWithPageAndLimit() { @@ -1758,7 +1733,6 @@ class DboMysqlTest extends CakeTestCase { /** * testSelectDistict method * - * @access public * @return void */ public function testSelectDistict() { @@ -1771,7 +1745,6 @@ class DboMysqlTest extends CakeTestCase { /** * testStringConditionsParsing method * - * @access public * @return void */ public function testStringConditionsParsing() { @@ -1888,7 +1861,6 @@ class DboMysqlTest extends CakeTestCase { /** * testQuotesInStringConditions method * - * @access public * @return void */ public function testQuotesInStringConditions() { @@ -1913,7 +1885,6 @@ class DboMysqlTest extends CakeTestCase { /** * testParenthesisInStringConditions method * - * @access public * @return void */ public function testParenthesisInStringConditions() { @@ -1963,7 +1934,6 @@ class DboMysqlTest extends CakeTestCase { /** * testParenthesisInArrayConditions method * - * @access public * @return void */ public function testParenthesisInArrayConditions() { @@ -2013,7 +1983,6 @@ class DboMysqlTest extends CakeTestCase { /** * testArrayConditionsParsing method * - * @access public * @return void */ public function testArrayConditionsParsing() { @@ -2246,7 +2215,6 @@ class DboMysqlTest extends CakeTestCase { /** * testArrayConditionsParsingComplexKeys method * - * @access public * @return void */ public function testArrayConditionsParsingComplexKeys() { @@ -2272,7 +2240,6 @@ class DboMysqlTest extends CakeTestCase { /** * testMixedConditionsParsing method * - * @access public * @return void */ public function testMixedConditionsParsing() { @@ -2294,7 +2261,6 @@ class DboMysqlTest extends CakeTestCase { /** * testConditionsOptionalArguments method * - * @access public * @return void */ public function testConditionsOptionalArguments() { @@ -2308,7 +2274,6 @@ class DboMysqlTest extends CakeTestCase { /** * testConditionsWithModel * - * @access public * @return void */ public function testConditionsWithModel() { @@ -2342,7 +2307,6 @@ class DboMysqlTest extends CakeTestCase { /** * testFieldParsing method * - * @access public * @return void */ public function testFieldParsing() { @@ -2484,7 +2448,6 @@ class DboMysqlTest extends CakeTestCase { /** * testRenderStatement method * - * @access public * @return void */ public function testRenderStatement() { @@ -2510,7 +2473,6 @@ class DboMysqlTest extends CakeTestCase { /** * testSchema method * - * @access public * @return void */ public function testSchema() { @@ -2531,7 +2493,6 @@ class DboMysqlTest extends CakeTestCase { /** * testOrderParsing method * - * @access public * @return void */ public function testOrderParsing() { @@ -2617,7 +2578,6 @@ class DboMysqlTest extends CakeTestCase { /** * testCalculations method * - * @access public * @return void */ public function testCalculations() { @@ -2660,7 +2620,6 @@ class DboMysqlTest extends CakeTestCase { /** * testLength method * - * @access public * @return void */ public function testLength() { @@ -2704,7 +2663,6 @@ class DboMysqlTest extends CakeTestCase { /** * testBuildIndex method * - * @access public * @return void */ public function testBuildIndex() { @@ -2733,7 +2691,6 @@ class DboMysqlTest extends CakeTestCase { /** * testBuildColumn method * - * @access public * @return void */ public function testBuildColumn2() { @@ -3167,7 +3124,6 @@ class DboMysqlTest extends CakeTestCase { /** * testIntrospectType method * - * @access public * @return void */ public function testIntrospectType() { @@ -3328,7 +3284,6 @@ class DboMysqlTest extends CakeTestCase { /** * testRealQueries method * - * @access public * @return void */ public function testRealQueries() { diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/OracleTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/OracleTest.php index cf1b27e86..893d0a3e0 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/OracleTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/OracleTest.php @@ -35,7 +35,6 @@ class DboOracleTest extends CakeTestCase { /** * setup method * - * @access public * @return void */ public function setUp() { @@ -48,7 +47,6 @@ class DboOracleTest extends CakeTestCase { /** * testLastErrorStatement method * - * @access public * @return void */ public function testLastErrorStatement() { @@ -62,7 +60,6 @@ class DboOracleTest extends CakeTestCase { /** * testLastErrorConnect method * - * @access public * @return void */ public function testLastErrorConnect() { @@ -80,7 +77,6 @@ class DboOracleTest extends CakeTestCase { /** * testName method * - * @access public * @return void */ public function testName() { diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php index 36d724aa8..26ea7262b 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/PostgresTest.php @@ -34,7 +34,6 @@ class DboPostgresTestDb extends Postgres { * simulated property * * @var array - * @access public */ public $simulated = array(); @@ -42,7 +41,6 @@ class DboPostgresTestDb extends Postgres { * execute method * * @param mixed $sql - * @access protected * @return void */ function _execute($sql, $params = array()) { @@ -53,7 +51,6 @@ class DboPostgresTestDb extends Postgres { /** * getLastQuery method * - * @access public * @return void */ public function getLastQuery() { @@ -72,7 +69,6 @@ class PostgresTestModel extends Model { * name property * * @var string 'PostgresTestModel' - * @access public */ public $name = 'PostgresTestModel'; @@ -80,7 +76,6 @@ class PostgresTestModel extends Model { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -88,7 +83,6 @@ class PostgresTestModel extends Model { * belongsTo property * * @var array - * @access public */ public $belongsTo = array( 'PostgresClientTestModel' => array( @@ -103,7 +97,6 @@ class PostgresTestModel extends Model { * @param mixed $fields * @param mixed $order * @param mixed $recursive - * @access public * @return void */ public function find($conditions = null, $fields = null, $order = null, $recursive = null) { @@ -117,7 +110,6 @@ class PostgresTestModel extends Model { * @param mixed $fields * @param mixed $order * @param mixed $recursive - * @access public * @return void */ public function findAll($conditions = null, $fields = null, $order = null, $recursive = null) { @@ -127,7 +119,6 @@ class PostgresTestModel extends Model { /** * schema method * - * @access public * @return void */ public function schema($field = false) { @@ -165,7 +156,6 @@ class PostgresClientTestModel extends Model { * name property * * @var string 'PostgresClientTestModel' - * @access public */ public $name = 'PostgresClientTestModel'; @@ -173,14 +163,12 @@ class PostgresClientTestModel extends Model { * useTable property * * @var bool false - * @access public */ public $useTable = false; /** * schema method * - * @access public * @return void */ public function schema($field = false) { @@ -206,7 +194,6 @@ class DboPostgresTest extends CakeTestCase { * using CakeTestCase::loadFixtures * * @var boolean - * @access public */ public $autoFixtures = false; @@ -214,7 +201,6 @@ class DboPostgresTest extends CakeTestCase { * Fixtures * * @var object - * @access public */ public $fixtures = array('core.user', 'core.binary_test', 'core.comment', 'core.article', 'core.tag', 'core.articles_tag', 'core.attachment', 'core.person', 'core.post', 'core.author', @@ -224,7 +210,6 @@ class DboPostgresTest extends CakeTestCase { * Actual DB connection used in testing * * @var DboSource - * @access public */ public $Dbo = null; @@ -232,7 +217,6 @@ class DboPostgresTest extends CakeTestCase { * Simulated DB connection used in testing * * @var DboSource - * @access public */ public $Dbo2 = null; @@ -310,7 +294,6 @@ class DboPostgresTest extends CakeTestCase { /** * testColumnParsing method * - * @access public * @return void */ public function testColumnParsing() { @@ -325,7 +308,6 @@ class DboPostgresTest extends CakeTestCase { /** * testValueQuoting method * - * @access public * @return void */ public function testValueQuoting() { @@ -395,7 +377,6 @@ class DboPostgresTest extends CakeTestCase { /** * Tests that different Postgres boolean 'flavors' are properly returned as native PHP booleans * - * @access public * @return void */ public function testBooleanNormalization() { @@ -430,7 +411,6 @@ class DboPostgresTest extends CakeTestCase { /** * testLastInsertIdMultipleInsert method * - * @access public * @return void */ public function testLastInsertIdMultipleInsert() { @@ -452,7 +432,6 @@ class DboPostgresTest extends CakeTestCase { /** * Tests that table lists and descriptions are scoped to the proper Postgres schema * - * @access public * @return void */ public function testSchemaScoping() { @@ -474,7 +453,6 @@ class DboPostgresTest extends CakeTestCase { * Tests that column types without default lengths in $columns do not have length values * applied when generating schemas. * - * @access public * @return void */ public function testColumnUseLength() { @@ -490,7 +468,6 @@ class DboPostgresTest extends CakeTestCase { /** * Tests that binary data is escaped/unescaped properly on reads and writes * - * @access public * @return void */ public function testBinaryDataIntegrity() { @@ -524,7 +501,6 @@ class DboPostgresTest extends CakeTestCase { /** * Tests the syntax of generated schema indexes * - * @access public * @return void */ public function testSchemaIndexSyntax() { @@ -639,7 +615,6 @@ class DboPostgresTest extends CakeTestCase { /** * Test the alterSchema capabilities of postgres * - * @access public * @return void */ public function testAlterSchema() { @@ -688,7 +663,6 @@ class DboPostgresTest extends CakeTestCase { /** * Test the alter index capabilities of postgres * - * @access public * @return void */ public function testAlterIndexes() { @@ -764,7 +738,6 @@ class DboPostgresTest extends CakeTestCase { /* * Test it is possible to use virtual field with postgresql * - * @access public * @return void */ public function testVirtualFields() { @@ -786,7 +759,6 @@ class DboPostgresTest extends CakeTestCase { /** * Tests additional order options for postgres * - * @access public * @return void */ public function testOrderAdditionalParams() { diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php index 6da7360db..50e33b772 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/SqliteTest.php @@ -31,7 +31,6 @@ class DboSqliteTestDb extends Sqlite { * simulated property * * @var array - * @access public */ public $simulated = array(); @@ -39,7 +38,6 @@ class DboSqliteTestDb extends Sqlite { * execute method * * @param mixed $sql - * @access protected * @return void */ function _execute($sql, $params = array()) { @@ -50,7 +48,6 @@ class DboSqliteTestDb extends Sqlite { /** * getLastQuery method * - * @access public * @return void */ public function getLastQuery() { @@ -69,7 +66,6 @@ class DboSqliteTest extends CakeTestCase { * Do not automatically load fixtures for each test, they will be loaded manually using CakeTestCase::loadFixtures * * @var boolean - * @access public */ public $autoFixtures = false; @@ -77,7 +73,6 @@ class DboSqliteTest extends CakeTestCase { * Fixtures * * @var object - * @access public */ public $fixtures = array('core.user'); @@ -85,7 +80,6 @@ class DboSqliteTest extends CakeTestCase { * Actual DB connection used in testing * * @var DboSource - * @access public */ public $Dbo = null; @@ -127,7 +121,6 @@ class DboSqliteTest extends CakeTestCase { /** * test Index introspection. * - * @access public * @return void */ public function testIndex() { diff --git a/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php b/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php index b2eab7da9..5eddfb37a 100644 --- a/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/DboSourceTest.php @@ -38,7 +38,6 @@ class DboSourceTest extends CakeTestCase { * debug property * * @var mixed null - * @access public */ public $debug = null; @@ -46,7 +45,6 @@ class DboSourceTest extends CakeTestCase { * autoFixtures property * * @var bool false - * @access public */ public $autoFixtures = false; @@ -54,7 +52,6 @@ class DboSourceTest extends CakeTestCase { * fixtures property * * @var array - * @access public */ public $fixtures = array( 'core.apple', 'core.article', 'core.articles_tag', 'core.attachment', 'core.comment', @@ -64,7 +61,6 @@ class DboSourceTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -81,7 +77,6 @@ class DboSourceTest extends CakeTestCase { * execute method * * @param \$sql - * @access protected * @return void */ function _execute(\$sql) { @@ -92,12 +87,15 @@ class DboSourceTest extends CakeTestCase { /** * getLastQuery method * - * @access public * @return void */ public function getLastQuery() { return \$this->simulated[count(\$this->simulated) - 1]; } + + public function mergeAssociation(&\$data, &\$merge, \$association, \$type, \$selfJoin = false) { + return parent::_mergeAssociation(\$data, \$merge, \$association, \$type, \$selfJoin); + } }"); } @@ -112,7 +110,6 @@ class DboSourceTest extends CakeTestCase { /** * endTest method * - * @access public * @return void */ public function tearDown() { @@ -161,7 +158,6 @@ class DboSourceTest extends CakeTestCase { /** * testMergeAssociations method * - * @access public * @return void */ public function testMergeAssociations() { @@ -185,7 +181,7 @@ class DboSourceTest extends CakeTestCase { 'updated' => '2007-03-17 01:18:31' ) ); - $this->testDb->__mergeAssociation($data, $merge, 'Topic', 'hasOne'); + $this->testDb->mergeAssociation($data, $merge, 'Topic', 'hasOne'); $this->assertEqual($data, $expected); $data = array('Article2' => array( @@ -208,7 +204,7 @@ class DboSourceTest extends CakeTestCase { 'id' => '1', 'user' => 'mariano', 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', 'created' => '2007-03-17 01:16:23', 'updated' => '2007-03-17 01:18:31' ) ); - $this->testDb->__mergeAssociation($data, $merge, 'User2', 'belongsTo'); + $this->testDb->mergeAssociation($data, $merge, 'User2', 'belongsTo'); $this->assertEqual($data, $expected); $data = array( @@ -223,7 +219,7 @@ class DboSourceTest extends CakeTestCase { ), 'Comment' => array() ); - $this->testDb->__mergeAssociation($data, $merge, 'Comment', 'hasMany'); + $this->testDb->mergeAssociation($data, $merge, 'Comment', 'hasMany'); $this->assertEqual($data, $expected); $data = array( @@ -256,7 +252,7 @@ class DboSourceTest extends CakeTestCase { ) ) ); - $this->testDb->__mergeAssociation($data, $merge, 'Comment', 'hasMany'); + $this->testDb->mergeAssociation($data, $merge, 'Comment', 'hasMany'); $this->assertEqual($data, $expected); $data = array( @@ -301,7 +297,7 @@ class DboSourceTest extends CakeTestCase { ) ) ); - $this->testDb->__mergeAssociation($data, $merge, 'Comment', 'hasMany'); + $this->testDb->mergeAssociation($data, $merge, 'Comment', 'hasMany'); $this->assertEqual($data, $expected); $data = array( @@ -356,7 +352,7 @@ class DboSourceTest extends CakeTestCase { ) ) ); - $this->testDb->__mergeAssociation($data, $merge, 'Comment', 'hasMany'); + $this->testDb->mergeAssociation($data, $merge, 'Comment', 'hasMany'); $this->assertEqual($data, $expected); $data = array( @@ -397,7 +393,7 @@ class DboSourceTest extends CakeTestCase { ) ) ); - $this->testDb->__mergeAssociation($data, $merge, 'Tag', 'hasAndBelongsToMany'); + $this->testDb->mergeAssociation($data, $merge, 'Tag', 'hasAndBelongsToMany'); $this->assertEqual($data, $expected); $data = array( @@ -428,7 +424,7 @@ class DboSourceTest extends CakeTestCase { ), 'Tag' => array('id' => '1', 'tag' => 'Tag 1', 'created' => '2007-03-17 01:16:23', 'updated' => '2007-03-17 01:18:31') ); - $this->testDb->__mergeAssociation($data, $merge, 'Tag', 'hasOne'); + $this->testDb->mergeAssociation($data, $merge, 'Tag', 'hasOne'); $this->assertEqual($data, $expected); } @@ -436,7 +432,6 @@ class DboSourceTest extends CakeTestCase { /** * testMagicMethodQuerying method * - * @access public * @return void */ public function testMagicMethodQuerying() { @@ -509,7 +504,6 @@ class DboSourceTest extends CakeTestCase { /** * testValue method * - * @access public * @return void */ public function testValue() { @@ -524,7 +518,6 @@ class DboSourceTest extends CakeTestCase { /** * testReconnect method * - * @access public * @return void */ public function testReconnect() { @@ -536,7 +529,6 @@ class DboSourceTest extends CakeTestCase { /** * testName method * - * @access public * @return void */ public function testName() { @@ -623,7 +615,6 @@ class DboSourceTest extends CakeTestCase { /** * testLog method * - * @access public * @return void */ public function testLog() { @@ -815,7 +806,6 @@ class DboSourceTest extends CakeTestCase { /** * testStatements method * - * @access public * @return void */ public function testStatements() { diff --git a/lib/Cake/Test/Case/Model/Datasource/Session/DatabaseSessionTest.php b/lib/Cake/Test/Case/Model/Datasource/Session/DatabaseSessionTest.php index e4d201169..ac64b6a36 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Session/DatabaseSessionTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Session/DatabaseSessionTest.php @@ -129,7 +129,6 @@ class DatabaseSessionTest extends CakeTestCase { /** * testReadAndWriteWithDatabaseStorage method * - * @access public * @return void */ public function testWriteEmptySessionId() { diff --git a/lib/Cake/Test/Case/Model/DbAclTest.php b/lib/Cake/Test/Case/Model/DbAclTest.php index 237cdaac3..345f5864a 100644 --- a/lib/Cake/Test/Case/Model/DbAclTest.php +++ b/lib/Cake/Test/Case/Model/DbAclTest.php @@ -32,7 +32,6 @@ class DbAclNodeTestBase extends AclNode { * useDbConfig property * * @var string 'test' - * @access public */ public $useDbConfig = 'test'; @@ -40,7 +39,6 @@ class DbAclNodeTestBase extends AclNode { * cacheSources property * * @var bool false - * @access public */ public $cacheSources = false; } @@ -56,7 +54,6 @@ class DbAroTest extends DbAclNodeTestBase { * name property * * @var string 'DbAroTest' - * @access public */ public $name = 'DbAroTest'; @@ -64,7 +61,6 @@ class DbAroTest extends DbAclNodeTestBase { * useTable property * * @var string 'aros' - * @access public */ public $useTable = 'aros'; @@ -72,7 +68,6 @@ class DbAroTest extends DbAclNodeTestBase { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('DbAcoTest' => array('with' => 'DbPermissionTest')); } @@ -88,7 +83,6 @@ class DbAcoTest extends DbAclNodeTestBase { * name property * * @var string 'DbAcoTest' - * @access public */ public $name = 'DbAcoTest'; @@ -96,7 +90,6 @@ class DbAcoTest extends DbAclNodeTestBase { * useTable property * * @var string 'acos' - * @access public */ public $useTable = 'acos'; @@ -104,7 +97,6 @@ class DbAcoTest extends DbAclNodeTestBase { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('DbAroTest' => array('with' => 'DbPermissionTest')); } @@ -120,7 +112,6 @@ class DbPermissionTest extends CakeTestModel { * name property * * @var string 'DbPermissionTest' - * @access public */ public $name = 'DbPermissionTest'; @@ -128,7 +119,6 @@ class DbPermissionTest extends CakeTestModel { * useTable property * * @var string 'aros_acos' - * @access public */ public $useTable = 'aros_acos'; @@ -136,7 +126,6 @@ class DbPermissionTest extends CakeTestModel { * cacheQueries property * * @var bool false - * @access public */ public $cacheQueries = false; @@ -144,7 +133,6 @@ class DbPermissionTest extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('DbAroTest' => array('foreignKey' => 'aro_id'), 'DbAcoTest' => array('foreignKey' => 'aco_id')); } @@ -160,7 +148,6 @@ class DbAcoActionTest extends CakeTestModel { * name property * * @var string 'DbAcoActionTest' - * @access public */ public $name = 'DbAcoActionTest'; @@ -168,7 +155,6 @@ class DbAcoActionTest extends CakeTestModel { * useTable property * * @var string 'aco_actions' - * @access public */ public $useTable = 'aco_actions'; @@ -176,7 +162,6 @@ class DbAcoActionTest extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('DbAcoTest' => array('foreignKey' => 'aco_id')); } @@ -192,7 +177,6 @@ class DbAroUserTest extends CakeTestModel { * name property * * @var string 'AuthUser' - * @access public */ public $name = 'AuthUser'; @@ -200,14 +184,12 @@ class DbAroUserTest extends CakeTestModel { * useTable property * * @var string 'auth_users' - * @access public */ public $useTable = 'auth_users'; /** * bindNode method * * @param mixed $ref - * @access public * @return void */ public function bindNode($ref = null) { @@ -229,7 +211,6 @@ class TestDbAcl extends DbAcl { /** * construct method * - * @access private * @return void */ function __construct() { @@ -251,14 +232,12 @@ class AclNodeTest extends CakeTestCase { * fixtures property * * @var array - * @access public */ public $fixtures = array('core.aro', 'core.aco', 'core.aros_aco', 'core.aco_action', 'core.auth_user'); /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -269,7 +248,6 @@ class AclNodeTest extends CakeTestCase { /** * testNode method * - * @access public * @return void */ public function testNode() { @@ -322,7 +300,6 @@ class AclNodeTest extends CakeTestCase { /** * testNodeArrayFind method * - * @access public * @return void */ public function testNodeArrayFind() { @@ -340,7 +317,6 @@ class AclNodeTest extends CakeTestCase { /** * testNodeObjectFind method * - * @access public * @return void */ public function testNodeObjectFind() { @@ -361,7 +337,6 @@ class AclNodeTest extends CakeTestCase { /** * testNodeAliasParenting method * - * @access public * @return void */ public function testNodeAliasParenting() { diff --git a/lib/Cake/Test/Case/Model/ModelDeleteTest.php b/lib/Cake/Test/Case/Model/ModelDeleteTest.php index 6106f9caa..9ae3643a5 100644 --- a/lib/Cake/Test/Case/Model/ModelDeleteTest.php +++ b/lib/Cake/Test/Case/Model/ModelDeleteTest.php @@ -28,7 +28,6 @@ class ModelDeleteTest extends BaseModelTest { /** * testDeleteHabtmReferenceWithConditions method * - * @access public * @return void */ public function testDeleteHabtmReferenceWithConditions() { @@ -119,7 +118,6 @@ class ModelDeleteTest extends BaseModelTest { /** * testDeleteArticleBLinks method * - * @access public * @return void */ public function testDeleteArticleBLinks() { @@ -148,7 +146,6 @@ class ModelDeleteTest extends BaseModelTest { /** * testDeleteDependentWithConditions method * - * @access public * @return void */ public function testDeleteDependentWithConditions() { @@ -188,7 +185,6 @@ class ModelDeleteTest extends BaseModelTest { /** * testDel method * - * @access public * @return void */ public function testDelete() { @@ -285,7 +281,6 @@ class ModelDeleteTest extends BaseModelTest { /** * testDeleteAll method * - * @access public * @return void */ public function testDeleteAll() { @@ -433,7 +428,6 @@ class ModelDeleteTest extends BaseModelTest { /** * testRecursiveDel method * - * @access public * @return void */ public function testRecursiveDel() { @@ -469,7 +463,6 @@ class ModelDeleteTest extends BaseModelTest { /** * testDependentExclusiveDelete method * - * @access public * @return void */ public function testDependentExclusiveDelete() { @@ -488,7 +481,6 @@ class ModelDeleteTest extends BaseModelTest { /** * testDeleteLinks method * - * @access public * @return void */ public function testDeleteLinks() { @@ -588,7 +580,6 @@ class ModelDeleteTest extends BaseModelTest { /** * testHabtmDeleteLinksWhenNoPrimaryKeyInJoinTable method * - * @access public * @return void */ public function testHabtmDeleteLinksWhenNoPrimaryKeyInJoinTable() { diff --git a/lib/Cake/Test/Case/Model/ModelIntegrationTest.php b/lib/Cake/Test/Case/Model/ModelIntegrationTest.php index fde2da93e..c02e5aee1 100644 --- a/lib/Cake/Test/Case/Model/ModelIntegrationTest.php +++ b/lib/Cake/Test/Case/Model/ModelIntegrationTest.php @@ -146,7 +146,6 @@ class ModelIntegrationTest extends BaseModelTest { /** * testPkInHAbtmLinkModelArticleB * - * @access public * @return void */ public function testPkInHabtmLinkModelArticleB() { @@ -158,7 +157,6 @@ class ModelIntegrationTest extends BaseModelTest { /** * Tests that $cacheSources can only be disabled in the db using model settings, not enabled * - * @access public * @return void */ public function testCacheSourcesDisabling() { @@ -179,7 +177,6 @@ class ModelIntegrationTest extends BaseModelTest { /** * testPkInHabtmLinkModel method * - * @access public * @return void */ public function testPkInHabtmLinkModel() { @@ -207,7 +204,6 @@ class ModelIntegrationTest extends BaseModelTest { /** * testDynamicBehaviorAttachment method * - * @access public * @return void */ public function testDynamicBehaviorAttachment() { @@ -592,7 +588,6 @@ class ModelIntegrationTest extends BaseModelTest { /** * testDisplayField method * - * @access public * @return void */ public function testDisplayField() { @@ -609,7 +604,6 @@ class ModelIntegrationTest extends BaseModelTest { /** * testSchema method * - * @access public * @return void */ public function testSchema() { @@ -720,7 +714,6 @@ class ModelIntegrationTest extends BaseModelTest { /** * testDeconstructFields with datetime, timestamp, and date fields * - * @access public * @return void */ public function testDeconstructFieldsDateTime() { @@ -899,7 +892,6 @@ class ModelIntegrationTest extends BaseModelTest { /** * testTablePrefixSwitching method * - * @access public * @return void */ public function testTablePrefixSwitching() { @@ -953,7 +945,6 @@ class ModelIntegrationTest extends BaseModelTest { /** * Tests validation parameter order in custom validation methods * - * @access public * @return void */ public function testInvalidAssociation() { @@ -964,7 +955,6 @@ class ModelIntegrationTest extends BaseModelTest { /** * testLoadModelSecondIteration method * - * @access public * @return void */ public function testLoadModelSecondIteration() { @@ -1028,7 +1018,6 @@ class ModelIntegrationTest extends BaseModelTest { /** * testPluginAssociations method * - * @access public * @return void */ public function testPluginAssociations() { @@ -1153,7 +1142,6 @@ class ModelIntegrationTest extends BaseModelTest { /** * Tests getAssociated method * - * @access public * @return void */ public function testGetAssociated() { @@ -1197,7 +1185,6 @@ class ModelIntegrationTest extends BaseModelTest { /** * testAutoConstructAssociations method * - * @access public * @return void */ public function testAutoConstructAssociations() { @@ -1344,7 +1331,6 @@ class ModelIntegrationTest extends BaseModelTest { /** * testColumnTypeFetching method * - * @access public * @return void */ public function testColumnTypeFetching() { @@ -1363,7 +1349,6 @@ class ModelIntegrationTest extends BaseModelTest { /** * testHabtmUniqueKey method * - * @access public * @return void */ public function testHabtmUniqueKey() { @@ -1374,7 +1359,6 @@ class ModelIntegrationTest extends BaseModelTest { /** * testIdentity method * - * @access public * @return void */ public function testIdentity() { @@ -1397,7 +1381,6 @@ class ModelIntegrationTest extends BaseModelTest { /** * testWithAssociation method * - * @access public * @return void */ public function testWithAssociation() { @@ -1649,7 +1632,6 @@ class ModelIntegrationTest extends BaseModelTest { /** * testFindSelfAssociations method * - * @access public * @return void */ public function testFindSelfAssociations() { @@ -1759,7 +1741,6 @@ class ModelIntegrationTest extends BaseModelTest { /** * testDynamicAssociations method * - * @access public * @return void */ public function testDynamicAssociations() { @@ -1867,7 +1848,6 @@ class ModelIntegrationTest extends BaseModelTest { /** * testCreation method * - * @access public * @return void */ public function testCreation() { @@ -1987,7 +1967,6 @@ class ModelIntegrationTest extends BaseModelTest { * testEscapeField to prove it escapes the field well even when it has part of the alias on it * @see ttp://cakephp.lighthouseapp.com/projects/42648-cakephp-1x/tickets/473-escapefield-doesnt-consistently-prepend-modelname * - * @access public * @return void */ public function testEscapeField() { diff --git a/lib/Cake/Test/Case/Model/ModelReadTest.php b/lib/Cake/Test/Case/Model/ModelReadTest.php index d2fd6ea76..83198f0a8 100644 --- a/lib/Cake/Test/Case/Model/ModelReadTest.php +++ b/lib/Cake/Test/Case/Model/ModelReadTest.php @@ -33,7 +33,6 @@ class ModelReadTest extends BaseModelTest { * something_id | something_else_id | doomed = 0 * Should return both records and not just one. * - * @access public * @return void */ public function testFetchingNonUniqueFKJoinTableRecords() { @@ -74,7 +73,6 @@ class ModelReadTest extends BaseModelTest { * These tests will never pass with Postgres or Oracle as all fields in a select must be * part of an aggregate function or in the GROUP BY statement. * - * @access public * @return void */ public function testGroupBy() { @@ -233,7 +231,6 @@ class ModelReadTest extends BaseModelTest { /** * testOldQuery method * - * @access public * @return void */ public function testOldQuery() { @@ -270,7 +267,6 @@ class ModelReadTest extends BaseModelTest { /** * testPreparedQuery method * - * @access public * @return void */ public function testPreparedQuery() { @@ -339,7 +335,6 @@ class ModelReadTest extends BaseModelTest { /** * testParameterMismatch method * - * @access public * @return void */ public function testParameterMismatch() { @@ -361,7 +356,6 @@ class ModelReadTest extends BaseModelTest { /** * testVeryStrangeUseCase method * - * @access public * @return void */ public function testVeryStrangeUseCase() { @@ -384,7 +378,6 @@ class ModelReadTest extends BaseModelTest { /** * testRecursiveUnbind method * - * @access public * @return void */ public function testRecursiveUnbind() { @@ -2981,7 +2974,6 @@ class ModelReadTest extends BaseModelTest { /** * testSelfAssociationAfterFind method * - * @access public * @return void */ public function testSelfAssociationAfterFind() { @@ -3009,7 +3001,6 @@ class ModelReadTest extends BaseModelTest { /** * testFindAllThreaded method * - * @access public * @return void */ public function testFindAllThreaded() { @@ -3640,7 +3631,6 @@ class ModelReadTest extends BaseModelTest { /** * testFindCombinedRelations method * - * @access public * @return void */ public function testFindCombinedRelations() { @@ -3919,7 +3909,6 @@ class ModelReadTest extends BaseModelTest { /** * testSaveEmpty method * - * @access public * @return void */ public function testSaveEmpty() { @@ -3934,7 +3923,6 @@ class ModelReadTest extends BaseModelTest { * testFindAllWithConditionInChildQuery * * @todo external conditions like this are going to need to be revisited at some point - * @access public * @return void */ public function testFindAllWithConditionInChildQuery() { @@ -3978,7 +3966,6 @@ class ModelReadTest extends BaseModelTest { /** * testFindAllWithConditionsHavingMixedDataTypes method * - * @access public * @return void */ public function testFindAllWithConditionsHavingMixedDataTypes() { @@ -4060,7 +4047,6 @@ class ModelReadTest extends BaseModelTest { /** * testBindUnbind method * - * @access public * @return void */ public function testBindUnbind() { @@ -4544,7 +4530,6 @@ class ModelReadTest extends BaseModelTest { /** * testBindMultipleTimes method * - * @access public * @return void */ public function testBindMultipleTimes() { @@ -4733,7 +4718,6 @@ class ModelReadTest extends BaseModelTest { /** * testBindMultipleTimes method with different reset settings * - * @access public * @return void */ public function testBindMultipleTimesWithDifferentResetSettings() { @@ -4804,7 +4788,6 @@ class ModelReadTest extends BaseModelTest { /** * testBindMultipleTimes method with different reset settings * - * @access public * @return void */ public function testUnBindMultipleTimesWithDifferentResetSettings() { @@ -4839,7 +4822,6 @@ class ModelReadTest extends BaseModelTest { /** * testAssociationAfterFind method * - * @access public * @return void */ public function testAssociationAfterFind() { @@ -4932,7 +4914,6 @@ class ModelReadTest extends BaseModelTest { /** * Tests that callbacks can be properly disabled * - * @access public * @return void */ public function testCallbackDisabling() { @@ -4960,7 +4941,6 @@ class ModelReadTest extends BaseModelTest { * Tests that the database configuration assigned to the model can be changed using * (before|after)Find callbacks * - * @access public * @return void */ public function testCallbackSourceChange() { @@ -4975,7 +4955,6 @@ class ModelReadTest extends BaseModelTest { /** * testMultipleBelongsToWithSameClass method * - * @access public * @return void */ public function testMultipleBelongsToWithSameClass() { @@ -5074,7 +5053,6 @@ class ModelReadTest extends BaseModelTest { /** * testHabtmRecursiveBelongsTo method * - * @access public * @return void */ public function testHabtmRecursiveBelongsTo() { @@ -5133,7 +5111,6 @@ class ModelReadTest extends BaseModelTest { /** * testNonNumericHabtmJoinKey method * - * @access public * @return void */ public function testNonNumericHabtmJoinKey() { @@ -5234,7 +5211,6 @@ class ModelReadTest extends BaseModelTest { /** * testHabtmFinderQuery method * - * @access public * @return void */ public function testHabtmFinderQuery() { @@ -5283,7 +5259,6 @@ class ModelReadTest extends BaseModelTest { /** * testHabtmLimitOptimization method * - * @access public * @return void */ public function testHabtmLimitOptimization() { @@ -5354,7 +5329,6 @@ class ModelReadTest extends BaseModelTest { /** * testHasManyLimitOptimization method * - * @access public * @return void */ public function testHasManyLimitOptimization() { @@ -5469,7 +5443,6 @@ class ModelReadTest extends BaseModelTest { /** * testFindAllRecursiveSelfJoin method * - * @access public * @return void */ public function testFindAllRecursiveSelfJoin() { @@ -5644,7 +5617,6 @@ class ModelReadTest extends BaseModelTest { /** * testReadFakeThread method * - * @access public * @return void */ public function testReadFakeThread() { @@ -5709,7 +5681,6 @@ class ModelReadTest extends BaseModelTest { /** * testFindFakeThread method * - * @access public * @return void */ public function testFindFakeThread() { @@ -5774,7 +5745,6 @@ class ModelReadTest extends BaseModelTest { /** * testFindAllFakeThread method * - * @access public * @return void */ public function testFindAllFakeThread() { @@ -5995,7 +5965,6 @@ class ModelReadTest extends BaseModelTest { /** * testConditionalNumerics method * - * @access public * @return void */ public function testConditionalNumerics() { @@ -6013,7 +5982,6 @@ class ModelReadTest extends BaseModelTest { /** * test buildQuery() * - * @access public * @return void */ public function testBuildQuery() { @@ -6041,7 +6009,6 @@ class ModelReadTest extends BaseModelTest { /** * test find('all') method * - * @access public * @return void */ public function testFindAll() { @@ -6271,7 +6238,6 @@ class ModelReadTest extends BaseModelTest { /** * test find('list') method * - * @access public * @return void */ public function testGenerateFindList() { @@ -6547,7 +6513,6 @@ class ModelReadTest extends BaseModelTest { /** * testFindField method * - * @access public * @return void */ public function testFindField() { @@ -6577,7 +6542,6 @@ class ModelReadTest extends BaseModelTest { /** * testFindUnique method * - * @access public * @return void */ public function testFindUnique() { @@ -6600,7 +6564,6 @@ class ModelReadTest extends BaseModelTest { /** * test find('count') method * - * @access public * @return void */ public function testFindCount() { @@ -6663,7 +6626,6 @@ class ModelReadTest extends BaseModelTest { /** * Test find(count) with Db::expression * - * @access public * @return void */ public function testFindCountWithDbExpressions() { @@ -6687,7 +6649,6 @@ class ModelReadTest extends BaseModelTest { /** * testFindMagic method * - * @access public * @return void */ public function testFindMagic() { @@ -6719,7 +6680,6 @@ class ModelReadTest extends BaseModelTest { /** * testRead method * - * @access public * @return void */ public function testRead() { @@ -6800,7 +6760,6 @@ class ModelReadTest extends BaseModelTest { /** * testRecursiveRead method * - * @access public * @return void */ public function testRecursiveRead() { @@ -7226,7 +7185,6 @@ class ModelReadTest extends BaseModelTest { /** * testRecursiveFindAllWithLimit method * - * @access public * @return void */ public function testRecursiveFindAllWithLimit() { @@ -7409,7 +7367,6 @@ class ModelReadTest extends BaseModelTest { * Test correct fetching of virtual fields * currently is not possible to do Relation.virtualField * - * @access public * @return void */ public function testVirtualFields() { diff --git a/lib/Cake/Test/Case/Model/ModelTestBase.php b/lib/Cake/Test/Case/Model/ModelTestBase.php index 8554b211f..0f7109571 100644 --- a/lib/Cake/Test/Case/Model/ModelTestBase.php +++ b/lib/Cake/Test/Case/Model/ModelTestBase.php @@ -34,7 +34,6 @@ abstract class BaseModelTest extends CakeTestCase { * autoFixtures property * * @var bool false - * @access public */ public $autoFixtures = false; @@ -42,14 +41,12 @@ abstract class BaseModelTest extends CakeTestCase { * Whether backup global state for each test method or not * * @var bool false - * @access public */ public $backupGlobals = false; /** * fixtures property * * @var array - * @access public */ public $fixtures = array( 'core.category', 'core.category_thread', 'core.user', 'core.my_category', 'core.my_product', @@ -78,7 +75,6 @@ abstract class BaseModelTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -89,7 +85,6 @@ abstract class BaseModelTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { diff --git a/lib/Cake/Test/Case/Model/ModelValidationTest.php b/lib/Cake/Test/Case/Model/ModelValidationTest.php index 14201ae53..99dd2a9d7 100644 --- a/lib/Cake/Test/Case/Model/ModelValidationTest.php +++ b/lib/Cake/Test/Case/Model/ModelValidationTest.php @@ -30,7 +30,6 @@ class ModelValidationTest extends BaseModelTest { /** * Tests validation parameter order in custom validation methods * - * @access public * @return void */ public function testValidationParams() { @@ -122,7 +121,6 @@ class ModelValidationTest extends BaseModelTest { /** * Tests validation parameter fieldList in invalidFields * - * @access public * @return void */ public function testInvalidFieldsWithFieldListParams() { @@ -194,7 +192,6 @@ class ModelValidationTest extends BaseModelTest { /** * testValidates method * - * @access public * @return void */ public function testValidates() { diff --git a/lib/Cake/Test/Case/Model/ModelWriteTest.php b/lib/Cake/Test/Case/Model/ModelWriteTest.php index bb495cb8e..6cfbcfb41 100644 --- a/lib/Cake/Test/Case/Model/ModelWriteTest.php +++ b/lib/Cake/Test/Case/Model/ModelWriteTest.php @@ -84,7 +84,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveDateAsFirstEntry method * - * @access public * @return void */ public function testSaveDateAsFirstEntry() { @@ -116,7 +115,6 @@ class ModelWriteTest extends BaseModelTest { /** * testUnderscoreFieldSave method * - * @access public * @return void */ public function testUnderscoreFieldSave() { @@ -142,7 +140,6 @@ class ModelWriteTest extends BaseModelTest { /** * testAutoSaveUuid method * - * @access public * @return void */ public function testAutoSaveUuid() { @@ -186,7 +183,6 @@ class ModelWriteTest extends BaseModelTest { /** * testZeroDefaultFieldValue method * - * @access public * @return void */ public function testZeroDefaultFieldValue() { @@ -205,7 +201,6 @@ class ModelWriteTest extends BaseModelTest { /** * Tests validation parameter order in custom validation methods * - * @access public * @return void */ public function testAllowSimulatedFields() { @@ -265,7 +260,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveWithCounterCache method * - * @access public * @return void */ public function testSaveWithCounterCache() { @@ -302,7 +296,6 @@ class ModelWriteTest extends BaseModelTest { /** * Tests that counter caches are updated when records are added * - * @access public * @return void */ public function testCounterCacheIncrease() { @@ -329,7 +322,6 @@ class ModelWriteTest extends BaseModelTest { /** * Tests that counter caches are updated when records are deleted * - * @access public * @return void */ public function testCounterCacheDecrease() { @@ -351,7 +343,6 @@ class ModelWriteTest extends BaseModelTest { /** * Tests that counter caches are updated when foreign keys of counted records change * - * @access public * @return void */ public function testCounterCacheUpdated() { @@ -375,7 +366,6 @@ class ModelWriteTest extends BaseModelTest { * Test counter cache with models that use a non-standard (i.e. not using 'id') * as their primary key. * - * @access public * @return void */ public function testCounterCacheWithNonstandardPrimaryKey() { @@ -430,7 +420,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveWithCounterCacheScope method * - * @access public * @return void */ public function testSaveWithCounterCacheScope() { @@ -572,7 +561,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveField method * - * @access public * @return void */ public function testSaveField() { @@ -642,7 +630,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveWithCreate method * - * @access public * @return void */ public function testSaveWithCreate() { @@ -891,7 +878,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveWithSet method * - * @access public * @return void */ public function testSaveWithSet() { @@ -1019,7 +1005,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveWithNonExistentFields method * - * @access public * @return void */ public function testSaveWithNonExistentFields() { @@ -1071,7 +1056,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveFromXml method * - * @access public * @return void */ public function testSaveFromXml() { @@ -1099,7 +1083,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveHabtm method * - * @access public * @return void */ public function testSaveHabtm() { @@ -1577,7 +1560,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveHabtmCustomKeys method * - * @access public * @return void */ public function testSaveHabtmCustomKeys() { @@ -1676,7 +1658,6 @@ class ModelWriteTest extends BaseModelTest { /** * testHabtmSaveKeyResolution method * - * @access public * @return void */ public function testHabtmSaveKeyResolution() { @@ -1766,7 +1747,6 @@ class ModelWriteTest extends BaseModelTest { /** * testCreationOfEmptyRecord method * - * @access public * @return void */ public function testCreationOfEmptyRecord() { @@ -1786,7 +1766,6 @@ class ModelWriteTest extends BaseModelTest { /** * testCreateWithPKFiltering method * - * @access public * @return void */ public function testCreateWithPKFiltering() { @@ -1883,7 +1862,6 @@ class ModelWriteTest extends BaseModelTest { /** * testCreationWithMultipleData method * - * @access public * @return void */ public function testCreationWithMultipleData() { @@ -2055,7 +2033,6 @@ class ModelWriteTest extends BaseModelTest { /** * testCreationWithMultipleDataSameModel method * - * @access public * @return void */ public function testCreationWithMultipleDataSameModel() { @@ -2114,7 +2091,6 @@ class ModelWriteTest extends BaseModelTest { /** * testCreationWithMultipleDataSameModelManualInstances method * - * @access public * @return void */ public function testCreationWithMultipleDataSameModelManualInstances() { @@ -2153,7 +2129,6 @@ class ModelWriteTest extends BaseModelTest { /** * testRecordExists method * - * @access public * @return void */ public function testRecordExists() { @@ -2181,7 +2156,6 @@ class ModelWriteTest extends BaseModelTest { /** * testUpdateExisting method * - * @access public * @return void */ public function testUpdateExisting() { @@ -2250,7 +2224,6 @@ class ModelWriteTest extends BaseModelTest { /** * testUpdateMultiple method * - * @access public * @return void */ public function testUpdateMultiple() { @@ -2284,7 +2257,6 @@ class ModelWriteTest extends BaseModelTest { /** * testHabtmUuidWithUuidId method * - * @access public * @return void */ public function testHabtmUuidWithUuidId() { @@ -2354,7 +2326,6 @@ class ModelWriteTest extends BaseModelTest { /** * testHabtmUuidWithNumericId method * - * @access public * @return void */ public function testHabtmUuidWithNumericId() { @@ -2373,7 +2344,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveMultipleHabtm method * - * @access public * @return void */ public function testSaveMultipleHabtm() { @@ -2492,7 +2462,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveAll method * - * @access public * @return void */ public function testSaveAll() { @@ -2632,7 +2601,6 @@ class ModelWriteTest extends BaseModelTest { /** * Test SaveAll with Habtm relations * - * @access public * @return void */ public function testSaveAllHabtm() { @@ -2664,7 +2632,6 @@ class ModelWriteTest extends BaseModelTest { /** * Test SaveAll with Habtm relations and extra join table fields * - * @access public * @return void */ public function testSaveAllHabtmWithExtraJoinTableFields() { @@ -2708,7 +2675,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveAllHasOne method * - * @access public * @return void */ public function testSaveAllHasOne() { @@ -2761,7 +2727,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveAllBelongsTo method * - * @access public * @return void */ public function testSaveAllBelongsTo() { @@ -2801,7 +2766,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveAllHasOneValidation method * - * @access public * @return void */ public function testSaveAllHasOneValidation() { @@ -2848,7 +2812,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveAllAtomic method * - * @access public * @return void */ public function testSaveAllAtomic() { @@ -2923,7 +2886,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveAllHasMany method * - * @access public * @return void */ public function testSaveAllHasMany() { @@ -3000,7 +2962,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveAllHasManyValidation method * - * @access public * @return void */ public function testSaveAllHasManyValidation() { @@ -3134,7 +3095,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveAllTransaction method * - * @access public * @return void */ public function testSaveAllTransaction() { @@ -3331,7 +3291,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveAllValidation method * - * @access public * @return void */ public function testSaveAllValidation() { @@ -3511,7 +3470,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveAllValidationOnly method * - * @access public * @return void */ public function testSaveAllValidationOnly() { @@ -3565,7 +3523,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveAllValidateFirst method * - * @access public * @return void */ public function testSaveAllValidateFirst() { @@ -3704,7 +3661,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveAllHasManyValidationOnly method * - * @access public * @return void */ public function testSaveAllHasManyValidationOnly() { @@ -3782,7 +3738,6 @@ class ModelWriteTest extends BaseModelTest { * test that saveAll behaves like plain save() when suplied empty data * * @link http://cakephp.lighthouseapp.com/projects/42648/tickets/277-test-saveall-with-validation-returns-incorrect-boolean-when-saving-empty-data - * @access public * @return void */ public function testSaveAllEmptyData() { @@ -3801,7 +3756,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveAssociated method * - * @access public * @return void */ public function testSaveAssociated() { @@ -3897,7 +3851,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveMany method * - * @access public * @return void */ public function testSaveMany() { @@ -3953,7 +3906,6 @@ class ModelWriteTest extends BaseModelTest { /** * Test SaveAssociated with Habtm relations * - * @access public * @return void */ public function testSaveAssociatedHabtm() { @@ -3985,7 +3937,6 @@ class ModelWriteTest extends BaseModelTest { /** * Test SaveAssociated with Habtm relations and extra join table fields * - * @access public * @return void */ public function testSaveAssociatedHabtmWithExtraJoinTableFields() { @@ -4029,7 +3980,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveAssociatedHasOne method * - * @access public * @return void */ public function testSaveAssociatedHasOne() { @@ -4082,7 +4032,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveAssociatedBelongsTo method * - * @access public * @return void */ public function testSaveAssociatedBelongsTo() { @@ -4122,7 +4071,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveAssociatedHasOneValidation method * - * @access public * @return void */ public function testSaveAssociatedHasOneValidation() { @@ -4159,7 +4107,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveAssociatedAtomic method * - * @access public * @return void */ public function testSaveAssociatedAtomic() { @@ -4198,7 +4145,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveManyAtomic method * - * @access public * @return void */ public function testSaveManyAtomic() { @@ -4246,7 +4192,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveAssociatedHasMany method * - * @access public * @return void */ public function testSaveAssociatedHasMany() { @@ -4323,7 +4268,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveAssociatedHasManyValidation method * - * @access public * @return void */ public function testSaveAssociatedHasManyValidation() { @@ -4457,7 +4401,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveManyTransaction method * - * @access public * @return void */ public function testSaveManyTransaction() { @@ -4654,7 +4597,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveManyValidation method * - * @access public * @return void */ public function testSaveManyValidation() { @@ -4834,7 +4776,6 @@ class ModelWriteTest extends BaseModelTest { /** * testValidateMany method * - * @access public * @return void */ public function testValidateMany() { @@ -4868,7 +4809,6 @@ class ModelWriteTest extends BaseModelTest { /** * testSaveAssociatedValidateFirst method * - * @access public * @return void */ public function testSaveAssociatedValidateFirst() { @@ -5007,7 +4947,6 @@ class ModelWriteTest extends BaseModelTest { /** * testValidateAssociated method * - * @access public * @return void */ public function testValidateAssociated() { @@ -5096,7 +5035,6 @@ class ModelWriteTest extends BaseModelTest { * test that saveMany behaves like plain save() when suplied empty data * * @link http://cakephp.lighthouseapp.com/projects/42648/tickets/277-test-saveall-with-validation-returns-incorrect-boolean-when-saving-empty-data - * @access public * @return void */ public function testSaveManyEmptyData() { @@ -5116,7 +5054,6 @@ class ModelWriteTest extends BaseModelTest { * test that saveAssociated behaves like plain save() when suplied empty data * * @link http://cakephp.lighthouseapp.com/projects/42648/tickets/277-test-saveall-with-validation-returns-incorrect-boolean-when-saving-empty-data - * @access public * @return void */ public function testSaveAssociatedEmptyData() { @@ -5135,7 +5072,6 @@ class ModelWriteTest extends BaseModelTest { /** * testUpdateWithCalculation method * - * @access public * @return void */ public function testUpdateWithCalculation() { @@ -5165,7 +5101,6 @@ class ModelWriteTest extends BaseModelTest { /** * TestFindAllWithoutForeignKey * - * @access public * @return void */ public function testFindAllForeignKey() { @@ -5243,7 +5178,6 @@ class ModelWriteTest extends BaseModelTest { /** * testUpdateAllWithJoins * - * @access public * @return void */ public function testUpdateAllWithJoins() { @@ -5291,7 +5225,6 @@ class ModelWriteTest extends BaseModelTest { /** * testUpdateAllWithoutForeignKey * - * @access public * @return void */ function testUpdateAllWithoutForeignKey() { diff --git a/lib/Cake/Test/Case/Model/models.php b/lib/Cake/Test/Case/Model/models.php index 918c53933..8afedf63f 100644 --- a/lib/Cake/Test/Case/Model/models.php +++ b/lib/Cake/Test/Case/Model/models.php @@ -32,7 +32,6 @@ class Test extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -40,7 +39,6 @@ class Test extends CakeTestModel { * name property * * @var string 'Test' - * @access public */ public $name = 'Test'; @@ -48,7 +46,6 @@ class Test extends CakeTestModel { * schema property * * @var array - * @access protected */ protected $_schema = array( 'id'=> array('type' => 'integer', 'null' => '', 'default' => '1', 'length' => '8', 'key'=>'primary'), @@ -71,7 +68,6 @@ class TestAlias extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -79,7 +75,6 @@ class TestAlias extends CakeTestModel { * name property * * @var string 'TestAlias' - * @access public */ public $name = 'TestAlias'; @@ -87,7 +82,6 @@ class TestAlias extends CakeTestModel { * alias property * * @var string 'TestAlias' - * @access public */ public $alias = 'TestAlias'; @@ -95,7 +89,6 @@ class TestAlias extends CakeTestModel { * schema property * * @var array - * @access protected */ protected $_schema = array( 'id'=> array('type' => 'integer', 'null' => '', 'default' => '1', 'length' => '8', 'key'=>'primary'), @@ -118,7 +111,6 @@ class TestValidate extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -126,7 +118,6 @@ class TestValidate extends CakeTestModel { * name property * * @var string 'TestValidate' - * @access public */ public $name = 'TestValidate'; @@ -134,7 +125,6 @@ class TestValidate extends CakeTestModel { * schema property * * @var array - * @access protected */ protected $_schema = array( 'id' => array('type' => 'integer', 'null' => '', 'default' => '', 'length' => '8'), @@ -150,7 +140,6 @@ class TestValidate extends CakeTestModel { * * @param mixed $value * @param mixed $options - * @access public * @return void */ public function validateNumber($value, $options) { @@ -163,7 +152,6 @@ class TestValidate extends CakeTestModel { * validateTitle method * * @param mixed $value - * @access public * @return void */ public function validateTitle($value) { @@ -182,7 +170,6 @@ class User extends CakeTestModel { * name property * * @var string 'User' - * @access public */ public $name = 'User'; @@ -190,7 +177,6 @@ class User extends CakeTestModel { * validate property * * @var array - * @access public */ public $validate = array('user' => 'notEmpty', 'password' => 'notEmpty'); } @@ -206,7 +192,6 @@ class Article extends CakeTestModel { * name property * * @var string 'Article' - * @access public */ public $name = 'Article'; @@ -214,7 +199,6 @@ class Article extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('User'); @@ -222,7 +206,6 @@ class Article extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array('Comment' => array('dependent' => true)); @@ -230,7 +213,6 @@ class Article extends CakeTestModel { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('Tag'); @@ -238,7 +220,6 @@ class Article extends CakeTestModel { * validate property * * @var array - * @access public */ public $validate = array('user_id' => 'numeric', 'title' => array('allowEmpty' => false, 'rule' => 'notEmpty'), 'body' => 'notEmpty'); @@ -246,14 +227,12 @@ class Article extends CakeTestModel { * beforeSaveReturn property * * @var bool true - * @access public */ public $beforeSaveReturn = true; /** * beforeSave method * - * @access public * @return void */ public function beforeSave($options = array()) { @@ -264,7 +243,6 @@ class Article extends CakeTestModel { * titleDuplicate method * * @param mixed $title - * @access public * @return void */ static function titleDuplicate ($title) { @@ -304,7 +282,6 @@ class NumericArticle extends CakeTestModel { * name property * * @var string 'NumericArticle' - * @access public */ public $name = 'NumericArticle'; @@ -312,7 +289,6 @@ class NumericArticle extends CakeTestModel { * useTable property * * @var string 'numeric_articles' - * @access public */ public $useTable = 'numeric_articles'; } @@ -328,7 +304,6 @@ class Article10 extends CakeTestModel { * name property * * @var string 'Article10' - * @access public */ public $name = 'Article10'; @@ -336,7 +311,6 @@ class Article10 extends CakeTestModel { * useTable property * * @var string 'articles' - * @access public */ public $useTable = 'articles'; @@ -344,7 +318,6 @@ class Article10 extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array('Comment' => array('dependent' => true, 'exclusive' => true)); } @@ -360,7 +333,6 @@ class ArticleFeatured extends CakeTestModel { * name property * * @var string 'ArticleFeatured' - * @access public */ public $name = 'ArticleFeatured'; @@ -368,7 +340,6 @@ class ArticleFeatured extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('User', 'Category'); @@ -376,7 +347,6 @@ class ArticleFeatured extends CakeTestModel { * hasOne property * * @var array - * @access public */ public $hasOne = array('Featured'); @@ -384,7 +354,6 @@ class ArticleFeatured extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array('Comment' => array('className' => 'Comment', 'dependent' => true)); @@ -392,7 +361,6 @@ class ArticleFeatured extends CakeTestModel { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('Tag'); @@ -400,7 +368,6 @@ class ArticleFeatured extends CakeTestModel { * validate property * * @var array - * @access public */ public $validate = array('user_id' => 'numeric', 'title' => 'notEmpty', 'body' => 'notEmpty'); } @@ -416,7 +383,6 @@ class Featured extends CakeTestModel { * name property * * @var string 'Featured' - * @access public */ public $name = 'Featured'; @@ -424,7 +390,6 @@ class Featured extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('ArticleFeatured', 'Category'); } @@ -440,7 +405,6 @@ class Tag extends CakeTestModel { * name property * * @var string 'Tag' - * @access public */ public $name = 'Tag'; } @@ -456,7 +420,6 @@ class ArticlesTag extends CakeTestModel { * name property * * @var string 'ArticlesTag' - * @access public */ public $name = 'ArticlesTag'; } @@ -472,7 +435,6 @@ class ArticleFeaturedsTag extends CakeTestModel { * name property * * @var string 'ArticleFeaturedsTag' - * @access public */ public $name = 'ArticleFeaturedsTag'; } @@ -488,7 +450,6 @@ class Comment extends CakeTestModel { * name property * * @var string 'Comment' - * @access public */ public $name = 'Comment'; @@ -496,7 +457,6 @@ class Comment extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('Article', 'User'); @@ -504,7 +464,6 @@ class Comment extends CakeTestModel { * hasOne property * * @var array - * @access public */ public $hasOne = array('Attachment' => array('dependent' => true)); } @@ -520,7 +479,6 @@ class ModifiedComment extends CakeTestModel { * name property * * @var string 'Comment' - * @access public */ public $name = 'Comment'; @@ -528,7 +486,6 @@ class ModifiedComment extends CakeTestModel { * useTable property * * @var string 'comments' - * @access public */ public $useTable = 'comments'; @@ -536,7 +493,6 @@ class ModifiedComment extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('Article'); @@ -564,7 +520,6 @@ class AgainModifiedComment extends CakeTestModel { * name property * * @var string 'Comment' - * @access public */ public $name = 'Comment'; @@ -572,7 +527,6 @@ class AgainModifiedComment extends CakeTestModel { * useTable property * * @var string 'comments' - * @access public */ public $useTable = 'comments'; @@ -580,7 +534,6 @@ class AgainModifiedComment extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('Article'); @@ -674,7 +627,6 @@ class Attachment extends CakeTestModel { * name property * * @var string 'Attachment' - * @access public */ public $name = 'Attachment'; } @@ -690,7 +642,6 @@ class Category extends CakeTestModel { * name property * * @var string 'Category' - * @access public */ public $name = 'Category'; } @@ -706,7 +657,6 @@ class CategoryThread extends CakeTestModel { * name property * * @var string 'CategoryThread' - * @access public */ public $name = 'CategoryThread'; @@ -714,7 +664,6 @@ class CategoryThread extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('ParentCategory' => array('className' => 'CategoryThread', 'foreignKey' => 'parent_id')); } @@ -730,7 +679,6 @@ class Apple extends CakeTestModel { * name property * * @var string 'Apple' - * @access public */ public $name = 'Apple'; @@ -738,7 +686,6 @@ class Apple extends CakeTestModel { * validate property * * @var array - * @access public */ public $validate = array('name' => 'notEmpty'); @@ -746,7 +693,6 @@ class Apple extends CakeTestModel { * hasOne property * * @var array - * @access public */ public $hasOne = array('Sample'); @@ -754,7 +700,6 @@ class Apple extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array('Child' => array('className' => 'Apple', 'dependent' => true)); @@ -762,7 +707,6 @@ class Apple extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('Parent' => array('className' => 'Apple', 'foreignKey' => 'apple_id')); } @@ -778,7 +722,6 @@ class Sample extends CakeTestModel { * name property * * @var string 'Sample' - * @access public */ public $name = 'Sample'; @@ -786,7 +729,6 @@ class Sample extends CakeTestModel { * belongsTo property * * @var string 'Apple' - * @access public */ public $belongsTo = 'Apple'; } @@ -802,7 +744,6 @@ class AnotherArticle extends CakeTestModel { * name property * * @var string 'AnotherArticle' - * @access public */ public $name = 'AnotherArticle'; @@ -810,7 +751,6 @@ class AnotherArticle extends CakeTestModel { * hasMany property * * @var string 'Home' - * @access public */ public $hasMany = 'Home'; } @@ -826,7 +766,6 @@ class Advertisement extends CakeTestModel { * name property * * @var string 'Advertisement' - * @access public */ public $name = 'Advertisement'; @@ -834,7 +773,6 @@ class Advertisement extends CakeTestModel { * hasMany property * * @var string 'Home' - * @access public */ public $hasMany = 'Home'; } @@ -850,7 +788,6 @@ class Home extends CakeTestModel { * name property * * @var string 'Home' - * @access public */ public $name = 'Home'; @@ -858,7 +795,6 @@ class Home extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('AnotherArticle', 'Advertisement'); } @@ -874,7 +810,6 @@ class Post extends CakeTestModel { * name property * * @var string 'Post' - * @access public */ public $name = 'Post'; @@ -882,7 +817,6 @@ class Post extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('Author'); @@ -910,7 +844,6 @@ class Author extends CakeTestModel { * name property * * @var string 'Author' - * @access public */ public $name = 'Author'; @@ -918,7 +851,6 @@ class Author extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array('Post'); @@ -926,7 +858,6 @@ class Author extends CakeTestModel { * afterFind method * * @param mixed $results - * @access public * @return void */ public function afterFind($results, $primary = false) { @@ -946,7 +877,6 @@ class ModifiedAuthor extends Author { * name property * * @var string 'Author' - * @access public */ public $name = 'Author'; @@ -954,7 +884,6 @@ class ModifiedAuthor extends Author { * afterFind method * * @param mixed $results - * @access public * @return void */ public function afterFind($results, $primary = false) { @@ -976,7 +905,6 @@ class Project extends CakeTestModel { * name property * * @var string 'Project' - * @access public */ public $name = 'Project'; @@ -984,7 +912,6 @@ class Project extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array('Thread'); } @@ -1000,7 +927,6 @@ class Thread extends CakeTestModel { * name property * * @var string 'Thread' - * @access public */ public $name = 'Thread'; @@ -1008,7 +934,6 @@ class Thread extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $belongsTo = array('Project'); @@ -1016,7 +941,6 @@ class Thread extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array('Message'); } @@ -1032,7 +956,6 @@ class Message extends CakeTestModel { * name property * * @var string 'Message' - * @access public */ public $name = 'Message'; @@ -1040,7 +963,6 @@ class Message extends CakeTestModel { * hasOne property * * @var array - * @access public */ public $hasOne = array('Bid'); } @@ -1056,7 +978,6 @@ class Bid extends CakeTestModel { * name property * * @var string 'Bid' - * @access public */ public $name = 'Bid'; @@ -1064,7 +985,6 @@ class Bid extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('Message'); } @@ -1080,7 +1000,6 @@ class NodeAfterFind extends CakeTestModel { * name property * * @var string 'NodeAfterFind' - * @access public */ public $name = 'NodeAfterFind'; @@ -1088,7 +1007,6 @@ class NodeAfterFind extends CakeTestModel { * validate property * * @var array - * @access public */ public $validate = array('name' => 'notEmpty'); @@ -1096,7 +1014,6 @@ class NodeAfterFind extends CakeTestModel { * useTable property * * @var string 'apples' - * @access public */ public $useTable = 'apples'; @@ -1104,7 +1021,6 @@ class NodeAfterFind extends CakeTestModel { * hasOne property * * @var array - * @access public */ public $hasOne = array('Sample' => array('className' => 'NodeAfterFindSample')); @@ -1112,7 +1028,6 @@ class NodeAfterFind extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array('Child' => array('className' => 'NodeAfterFind', 'dependent' => true)); @@ -1120,7 +1035,6 @@ class NodeAfterFind extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('Parent' => array('className' => 'NodeAfterFind', 'foreignKey' => 'apple_id')); @@ -1128,7 +1042,6 @@ class NodeAfterFind extends CakeTestModel { * afterFind method * * @param mixed $results - * @access public * @return void */ public function afterFind($results, $primary = false) { @@ -1147,7 +1060,6 @@ class NodeAfterFindSample extends CakeTestModel { * name property * * @var string 'NodeAfterFindSample' - * @access public */ public $name = 'NodeAfterFindSample'; @@ -1155,7 +1067,6 @@ class NodeAfterFindSample extends CakeTestModel { * useTable property * * @var string 'samples' - * @access public */ public $useTable = 'samples'; @@ -1163,7 +1074,6 @@ class NodeAfterFindSample extends CakeTestModel { * belongsTo property * * @var string 'NodeAfterFind' - * @access public */ public $belongsTo = 'NodeAfterFind'; } @@ -1179,7 +1089,6 @@ class NodeNoAfterFind extends CakeTestModel { * name property * * @var string 'NodeAfterFind' - * @access public */ public $name = 'NodeAfterFind'; @@ -1187,7 +1096,6 @@ class NodeNoAfterFind extends CakeTestModel { * validate property * * @var array - * @access public */ public $validate = array('name' => 'notEmpty'); @@ -1195,7 +1103,6 @@ class NodeNoAfterFind extends CakeTestModel { * useTable property * * @var string 'apples' - * @access public */ public $useTable = 'apples'; @@ -1203,7 +1110,6 @@ class NodeNoAfterFind extends CakeTestModel { * hasOne property * * @var array - * @access public */ public $hasOne = array('Sample' => array('className' => 'NodeAfterFindSample')); @@ -1211,7 +1117,6 @@ class NodeNoAfterFind extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array('Child' => array('className' => 'NodeAfterFind', 'dependent' => true)); @@ -1219,7 +1124,6 @@ class NodeNoAfterFind extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('Parent' => array('className' => 'NodeAfterFind', 'foreignKey' => 'apple_id')); } @@ -1235,7 +1139,6 @@ class Node extends CakeTestModel{ * name property * * @var string 'Node' - * @access public */ public $name = 'Node'; @@ -1243,7 +1146,6 @@ class Node extends CakeTestModel{ * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array( 'ParentNode' => array( @@ -1267,7 +1169,6 @@ class Dependency extends CakeTestModel { * name property * * @var string 'Dependency' - * @access public */ public $name = 'Dependency'; } @@ -1283,7 +1184,6 @@ class ModelA extends CakeTestModel { * name property * * @var string 'ModelA' - * @access public */ public $name = 'ModelA'; @@ -1291,7 +1191,6 @@ class ModelA extends CakeTestModel { * useTable property * * @var string 'apples' - * @access public */ public $useTable = 'apples'; @@ -1299,7 +1198,6 @@ class ModelA extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array('ModelB', 'ModelC'); } @@ -1315,7 +1213,6 @@ class ModelB extends CakeTestModel { * name property * * @var string 'ModelB' - * @access public */ public $name = 'ModelB'; @@ -1323,7 +1220,6 @@ class ModelB extends CakeTestModel { * useTable property * * @var string 'messages' - * @access public */ public $useTable = 'messages'; @@ -1331,7 +1227,6 @@ class ModelB extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array('ModelD'); } @@ -1347,7 +1242,6 @@ class ModelC extends CakeTestModel { * name property * * @var string 'ModelC' - * @access public */ public $name = 'ModelC'; @@ -1355,7 +1249,6 @@ class ModelC extends CakeTestModel { * useTable property * * @var string 'bids' - * @access public */ public $useTable = 'bids'; @@ -1363,7 +1256,6 @@ class ModelC extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array('ModelD'); } @@ -1379,7 +1271,6 @@ class ModelD extends CakeTestModel { * name property * * @var string 'ModelD' - * @access public */ public $name = 'ModelD'; @@ -1387,7 +1278,6 @@ class ModelD extends CakeTestModel { * useTable property * * @var string 'threads' - * @access public */ public $useTable = 'threads'; } @@ -1403,7 +1293,6 @@ class Something extends CakeTestModel { * name property * * @var string 'Something' - * @access public */ public $name = 'Something'; @@ -1411,7 +1300,6 @@ class Something extends CakeTestModel { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('SomethingElse' => array('with' => array('JoinThing' => array('doomed')))); } @@ -1427,7 +1315,6 @@ class SomethingElse extends CakeTestModel { * name property * * @var string 'SomethingElse' - * @access public */ public $name = 'SomethingElse'; @@ -1435,7 +1322,6 @@ class SomethingElse extends CakeTestModel { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('Something' => array('with' => 'JoinThing')); } @@ -1451,7 +1337,6 @@ class JoinThing extends CakeTestModel { * name property * * @var string 'JoinThing' - * @access public */ public $name = 'JoinThing'; @@ -1459,7 +1344,6 @@ class JoinThing extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('Something', 'SomethingElse'); } @@ -1475,7 +1359,6 @@ class Portfolio extends CakeTestModel { * name property * * @var string 'Portfolio' - * @access public */ public $name = 'Portfolio'; @@ -1483,7 +1366,6 @@ class Portfolio extends CakeTestModel { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('Item'); } @@ -1499,7 +1381,6 @@ class Item extends CakeTestModel { * name property * * @var string 'Item' - * @access public */ public $name = 'Item'; @@ -1507,7 +1388,6 @@ class Item extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('Syfile' => array('counterCache' => true)); @@ -1515,7 +1395,6 @@ class Item extends CakeTestModel { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('Portfolio' => array('unique' => false)); } @@ -1531,7 +1410,6 @@ class ItemsPortfolio extends CakeTestModel { * name property * * @var string 'ItemsPortfolio' - * @access public */ public $name = 'ItemsPortfolio'; } @@ -1547,7 +1425,6 @@ class Syfile extends CakeTestModel { * name property * * @var string 'Syfile' - * @access public */ public $name = 'Syfile'; @@ -1555,7 +1432,6 @@ class Syfile extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('Image'); } @@ -1571,7 +1447,6 @@ class Image extends CakeTestModel { * name property * * @var string 'Image' - * @access public */ public $name = 'Image'; } @@ -1587,7 +1462,6 @@ class DeviceType extends CakeTestModel { * name property * * @var string 'DeviceType' - * @access public */ public $name = 'DeviceType'; @@ -1595,7 +1469,6 @@ class DeviceType extends CakeTestModel { * order property * * @var array - * @access public */ public $order = array('DeviceType.order' => 'ASC'); @@ -1603,7 +1476,6 @@ class DeviceType extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array( 'DeviceTypeCategory', 'FeatureSet', 'ExteriorTypeCategory', @@ -1615,7 +1487,6 @@ class DeviceType extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array('Device' => array('order' => array('Device.id' => 'ASC'))); } @@ -1631,7 +1502,6 @@ class DeviceTypeCategory extends CakeTestModel { * name property * * @var string 'DeviceTypeCategory' - * @access public */ public $name = 'DeviceTypeCategory'; } @@ -1647,7 +1517,6 @@ class FeatureSet extends CakeTestModel { * name property * * @var string 'FeatureSet' - * @access public */ public $name = 'FeatureSet'; } @@ -1663,7 +1532,6 @@ class ExteriorTypeCategory extends CakeTestModel { * name property * * @var string 'ExteriorTypeCategory' - * @access public */ public $name = 'ExteriorTypeCategory'; @@ -1671,7 +1539,6 @@ class ExteriorTypeCategory extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('Image' => array('className' => 'Device')); } @@ -1687,7 +1554,6 @@ class Document extends CakeTestModel { * name property * * @var string 'Document' - * @access public */ public $name = 'Document'; @@ -1695,7 +1561,6 @@ class Document extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('DocumentDirectory'); } @@ -1711,7 +1576,6 @@ class Device extends CakeTestModel { * name property * * @var string 'Device' - * @access public */ public $name = 'Device'; } @@ -1727,7 +1591,6 @@ class DocumentDirectory extends CakeTestModel { * name property * * @var string 'DocumentDirectory' - * @access public */ public $name = 'DocumentDirectory'; } @@ -1743,7 +1606,6 @@ class PrimaryModel extends CakeTestModel { * name property * * @var string 'PrimaryModel' - * @access public */ public $name = 'PrimaryModel'; } @@ -1759,7 +1621,6 @@ class SecondaryModel extends CakeTestModel { * name property * * @var string 'SecondaryModel' - * @access public */ public $name = 'SecondaryModel'; } @@ -1775,7 +1636,6 @@ class JoinA extends CakeTestModel { * name property * * @var string 'JoinA' - * @access public */ public $name = 'JoinA'; @@ -1783,7 +1643,6 @@ class JoinA extends CakeTestModel { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('JoinB', 'JoinC'); } @@ -1799,7 +1658,6 @@ class JoinB extends CakeTestModel { * name property * * @var string 'JoinB' - * @access public */ public $name = 'JoinB'; @@ -1807,7 +1665,6 @@ class JoinB extends CakeTestModel { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('JoinA'); } @@ -1823,7 +1680,6 @@ class JoinC extends CakeTestModel { * name property * * @var string 'JoinC' - * @access public */ public $name = 'JoinC'; @@ -1831,7 +1687,6 @@ class JoinC extends CakeTestModel { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('JoinA'); } @@ -1847,7 +1702,6 @@ class ThePaper extends CakeTestModel { * name property * * @var string 'ThePaper' - * @access public */ public $name = 'ThePaper'; @@ -1855,7 +1709,6 @@ class ThePaper extends CakeTestModel { * useTable property * * @var string 'apples' - * @access public */ public $useTable = 'apples'; @@ -1863,7 +1716,6 @@ class ThePaper extends CakeTestModel { * hasOne property * * @var array - * @access public */ public $hasOne = array('Itself' => array('className' => 'ThePaper', 'foreignKey' => 'apple_id')); @@ -1871,7 +1723,6 @@ class ThePaper extends CakeTestModel { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('Monkey' => array('joinTable' => 'the_paper_monkies', 'order' => 'id')); } @@ -1887,7 +1738,6 @@ class Monkey extends CakeTestModel { * name property * * @var string 'Monkey' - * @access public */ public $name = 'Monkey'; @@ -1895,7 +1745,6 @@ class Monkey extends CakeTestModel { * useTable property * * @var string 'devices' - * @access public */ public $useTable = 'devices'; } @@ -1911,7 +1760,6 @@ class AssociationTest1 extends CakeTestModel { * useTable property * * @var string 'join_as' - * @access public */ public $useTable = 'join_as'; @@ -1919,7 +1767,6 @@ class AssociationTest1 extends CakeTestModel { * name property * * @var string 'AssociationTest1' - * @access public */ public $name = 'AssociationTest1'; @@ -1927,7 +1774,6 @@ class AssociationTest1 extends CakeTestModel { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('AssociationTest2' => array( 'unique' => false, 'joinTable' => 'join_as_join_bs', 'foreignKey' => false @@ -1945,7 +1791,6 @@ class AssociationTest2 extends CakeTestModel { * useTable property * * @var string 'join_bs' - * @access public */ public $useTable = 'join_bs'; @@ -1953,7 +1798,6 @@ class AssociationTest2 extends CakeTestModel { * name property * * @var string 'AssociationTest2' - * @access public */ public $name = 'AssociationTest2'; @@ -1961,7 +1805,6 @@ class AssociationTest2 extends CakeTestModel { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('AssociationTest1' => array( 'unique' => false, 'joinTable' => 'join_as_join_bs' @@ -2038,7 +1881,6 @@ class Uuid extends CakeTestModel { * name property * * @var string 'Uuid' - * @access public */ public $name = 'Uuid'; } @@ -2054,7 +1896,6 @@ class DataTest extends CakeTestModel { * name property * * @var string 'DataTest' - * @access public */ public $name = 'DataTest'; } @@ -2070,7 +1911,6 @@ class TheVoid extends CakeTestModel { * name property * * @var string 'TheVoid' - * @access public */ public $name = 'TheVoid'; @@ -2078,7 +1918,6 @@ class TheVoid extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; } @@ -2094,7 +1933,6 @@ class ValidationTest1 extends CakeTestModel { * name property * * @var string 'ValidationTest' - * @access public */ public $name = 'ValidationTest1'; @@ -2102,7 +1940,6 @@ class ValidationTest1 extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -2110,7 +1947,6 @@ class ValidationTest1 extends CakeTestModel { * schema property * * @var array - * @access protected */ protected $_schema = array(); @@ -2118,7 +1954,6 @@ class ValidationTest1 extends CakeTestModel { * validate property * * @var array - * @access public */ public $validate = array( 'title' => 'notEmpty', @@ -2134,7 +1969,6 @@ class ValidationTest1 extends CakeTestModel { * customValidationMethod method * * @param mixed $data - * @access public * @return void */ public function customValidationMethod($data) { @@ -2144,7 +1978,6 @@ class ValidationTest1 extends CakeTestModel { /** * Custom validator with parameters + default values * - * @access public * @return array */ public function customValidatorWithParams($data, $validator, $or = true, $ignore_on_same = 'id') { @@ -2156,7 +1989,6 @@ class ValidationTest1 extends CakeTestModel { /** * Custom validator with messaage * - * @access public * @return array */ public function customValidatorWithMessage($data) { @@ -2185,7 +2017,6 @@ class ValidationTest2 extends CakeTestModel { * name property * * @var string 'ValidationTest2' - * @access public */ public $name = 'ValidationTest2'; @@ -2193,7 +2024,6 @@ class ValidationTest2 extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -2201,7 +2031,6 @@ class ValidationTest2 extends CakeTestModel { * validate property * * @var array - * @access public */ public $validate = array( 'title' => 'notEmpty', @@ -2217,7 +2046,6 @@ class ValidationTest2 extends CakeTestModel { * customValidationMethod method * * @param mixed $data - * @access public * @return void */ public function customValidationMethod($data) { @@ -2227,7 +2055,6 @@ class ValidationTest2 extends CakeTestModel { /** * schema method * - * @access public * @return void */ public function schema($field = false) { @@ -2246,7 +2073,6 @@ class Person extends CakeTestModel { * name property * * @var string 'Person' - * @access public */ public $name = 'Person'; @@ -2254,7 +2080,6 @@ class Person extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array( 'Mother' => array( @@ -2276,7 +2101,6 @@ class UnderscoreField extends CakeTestModel { * name property * * @var string 'UnderscoreField' - * @access public */ public $name = 'UnderscoreField'; } @@ -2292,7 +2116,6 @@ class Product extends CakeTestModel { * name property * * @var string 'Product' - * @access public */ public $name = 'Product'; } @@ -2308,7 +2131,6 @@ class Story extends CakeTestModel { * name property * * @var string 'Story' - * @access public */ public $name = 'Story'; @@ -2316,7 +2138,6 @@ class Story extends CakeTestModel { * primaryKey property * * @var string 'story' - * @access public */ public $primaryKey = 'story'; @@ -2324,7 +2145,6 @@ class Story extends CakeTestModel { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('Tag' => array('foreignKey' => 'story')); @@ -2332,7 +2152,6 @@ class Story extends CakeTestModel { * validate property * * @var array - * @access public */ public $validate = array('title' => 'notEmpty'); } @@ -2348,7 +2167,6 @@ class Cd extends CakeTestModel { * name property * * @var string 'Cd' - * @access public */ public $name = 'Cd'; @@ -2356,7 +2174,6 @@ class Cd extends CakeTestModel { * hasOne property * * @var array - * @access public */ public $hasOne = array('OverallFavorite' => array('foreignKey' => 'model_id', 'dependent' => true, 'conditions' => array('model_type' => 'Cd'))); } @@ -2372,7 +2189,6 @@ class Book extends CakeTestModel { * name property * * @var string 'Book' - * @access public */ public $name = 'Book'; @@ -2380,7 +2196,6 @@ class Book extends CakeTestModel { * hasOne property * * @var array - * @access public */ public $hasOne = array('OverallFavorite' => array('foreignKey' => 'model_id', 'dependent' => true, 'conditions' => 'OverallFavorite.model_type = \'Book\'')); } @@ -2396,7 +2211,6 @@ class OverallFavorite extends CakeTestModel { * name property * * @var string 'OverallFavorite' - * @access public */ public $name = 'OverallFavorite'; } @@ -2412,7 +2226,6 @@ class MyUser extends CakeTestModel { * name property * * @var string 'MyUser' - * @access public */ public $name = 'MyUser'; @@ -2420,7 +2233,6 @@ class MyUser extends CakeTestModel { * undocumented variable * * @var string - * @access public */ public $hasAndBelongsToMany = array('MyCategory'); } @@ -2436,7 +2248,6 @@ class MyCategory extends CakeTestModel { * name property * * @var string 'MyCategory' - * @access public */ public $name = 'MyCategory'; @@ -2444,7 +2255,6 @@ class MyCategory extends CakeTestModel { * undocumented variable * * @var string - * @access public */ public $hasAndBelongsToMany = array('MyProduct', 'MyUser'); } @@ -2460,7 +2270,6 @@ class MyProduct extends CakeTestModel { * name property * * @var string 'MyProduct' - * @access public */ public $name = 'MyProduct'; @@ -2468,7 +2277,6 @@ class MyProduct extends CakeTestModel { * undocumented variable * * @var string - * @access public */ public $hasAndBelongsToMany = array('MyCategory'); } @@ -2484,7 +2292,6 @@ class MyCategoriesMyUser extends CakeTestModel { * name property * * @var string 'MyCategoriesMyUser' - * @access public */ public $name = 'MyCategoriesMyUser'; } @@ -2500,7 +2307,6 @@ class MyCategoriesMyProduct extends CakeTestModel { * name property * * @var string 'MyCategoriesMyProduct' - * @access public */ public $name = 'MyCategoriesMyProduct'; } @@ -2517,7 +2323,6 @@ class NumberTree extends CakeTestModel { * name property * * @var string 'NumberTree' - * @access public */ public $name = 'NumberTree'; @@ -2525,7 +2330,6 @@ class NumberTree extends CakeTestModel { * actsAs property * * @var array - * @access public */ public $actsAs = array('Tree'); @@ -2538,7 +2342,6 @@ class NumberTree extends CakeTestModel { * @param mixed $parent_id * @param string $prefix * @param bool $hierachial - * @access public * @return void */ public function initialize($levelLimit = 3, $childLimit = 3, $currentLevel = null, $parent_id = null, $prefix = '1', $hierachial = true) { @@ -2583,7 +2386,6 @@ class NumberTreeTwo extends NumberTree { * name property * * @var string 'NumberTree' - * @access public */ public $name = 'NumberTreeTwo'; @@ -2591,7 +2393,6 @@ class NumberTreeTwo extends NumberTree { * actsAs property * * @var array - * @access public */ public $actsAs = array(); } @@ -2607,7 +2408,6 @@ class FlagTree extends NumberTree { * name property * * @var string 'FlagTree' - * @access public */ public $name = 'FlagTree'; } @@ -2623,7 +2423,6 @@ class UnconventionalTree extends NumberTree { * name property * * @var string 'FlagTree' - * @access public */ public $name = 'UnconventionalTree'; public $actsAs = array( @@ -2646,7 +2445,6 @@ class UuidTree extends NumberTree { * name property * * @var string 'FlagTree' - * @access public */ public $name = 'UuidTree'; } @@ -2662,7 +2460,6 @@ class Campaign extends CakeTestModel { * name property * * @var string 'Campaign' - * @access public */ public $name = 'Campaign'; @@ -2670,7 +2467,6 @@ class Campaign extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array('Ad' => array('fields' => array('id','campaign_id','name'))); } @@ -2686,7 +2482,6 @@ class Ad extends CakeTestModel { * name property * * @var string 'Ad' - * @access public */ public $name = 'Ad'; @@ -2694,7 +2489,6 @@ class Ad extends CakeTestModel { * actsAs property * * @var array - * @access public */ public $actsAs = array('Tree'); @@ -2702,7 +2496,6 @@ class Ad extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('Campaign'); } @@ -2718,7 +2511,6 @@ class AfterTree extends NumberTree { * name property * * @var string 'AfterTree' - * @access public */ public $name = 'AfterTree'; @@ -2726,7 +2518,6 @@ class AfterTree extends NumberTree { * actsAs property * * @var array - * @access public */ public $actsAs = array('Tree'); @@ -2748,7 +2539,6 @@ class Content extends CakeTestModel { * name property * * @var string 'Content' - * @access public */ public $name = 'Content'; @@ -2756,7 +2546,6 @@ class Content extends CakeTestModel { * useTable property * * @var string 'Content' - * @access public */ public $useTable = 'Content'; @@ -2764,7 +2553,6 @@ class Content extends CakeTestModel { * primaryKey property * * @var string 'iContentId' - * @access public */ public $primaryKey = 'iContentId'; @@ -2772,7 +2560,6 @@ class Content extends CakeTestModel { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('Account' => array('className' => 'Account', 'with' => 'ContentAccount', 'joinTable' => 'ContentAccounts', 'foreignKey' => 'iContentId', 'associationForeignKey', 'iAccountId')); } @@ -2788,7 +2575,6 @@ class Account extends CakeTestModel { * name property * * @var string 'Account' - * @access public */ public $name = 'Account'; @@ -2796,7 +2582,6 @@ class Account extends CakeTestModel { * useTable property * * @var string 'Account' - * @access public */ public $useTable = 'Accounts'; @@ -2804,7 +2589,6 @@ class Account extends CakeTestModel { * primaryKey property * * @var string 'iAccountId' - * @access public */ public $primaryKey = 'iAccountId'; } @@ -2820,7 +2604,6 @@ class ContentAccount extends CakeTestModel { * name property * * @var string 'Account' - * @access public */ public $name = 'ContentAccount'; @@ -2828,7 +2611,6 @@ class ContentAccount extends CakeTestModel { * useTable property * * @var string 'Account' - * @access public */ public $useTable = 'ContentAccounts'; @@ -2836,7 +2618,6 @@ class ContentAccount extends CakeTestModel { * primaryKey property * * @var string 'iAccountId' - * @access public */ public $primaryKey = 'iContentAccountsId'; } @@ -2880,7 +2661,6 @@ class TestPluginArticle extends CakeTestModel { * name property * * @var string 'TestPluginArticle' - * @access public */ public $name = 'TestPluginArticle'; @@ -2888,7 +2668,6 @@ class TestPluginArticle extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('User'); @@ -2896,7 +2675,6 @@ class TestPluginArticle extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array( 'TestPluginComment' => array( @@ -2918,7 +2696,6 @@ class TestPluginComment extends CakeTestModel { * name property * * @var string 'TestPluginComment' - * @access public */ public $name = 'TestPluginComment'; @@ -2926,7 +2703,6 @@ class TestPluginComment extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array( 'TestPluginArticle' => array( @@ -2948,7 +2724,6 @@ class Uuidportfolio extends CakeTestModel { * name property * * @var string 'Uuidportfolio' - * @access public */ public $name = 'Uuidportfolio'; @@ -2956,7 +2731,6 @@ class Uuidportfolio extends CakeTestModel { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('Uuiditem'); } @@ -2972,7 +2746,6 @@ class Uuiditem extends CakeTestModel { * name property * * @var string 'Item' - * @access public */ public $name = 'Uuiditem'; @@ -2980,7 +2753,6 @@ class Uuiditem extends CakeTestModel { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('Uuidportfolio' => array('with' => 'UuiditemsUuidportfolioNumericid')); @@ -2997,7 +2769,6 @@ class UuiditemsUuidportfolio extends CakeTestModel { * name property * * @var string 'ItemsPortfolio' - * @access public */ public $name = 'UuiditemsUuidportfolio'; } @@ -3013,7 +2784,6 @@ class UuiditemsUuidportfolioNumericid extends CakeTestModel { * name property * * @var string - * @access public */ public $name = 'UuiditemsUuidportfolioNumericid'; } @@ -3029,7 +2799,6 @@ class TranslateTestModel extends CakeTestModel { * name property * * @var string 'TranslateTestModel' - * @access public */ public $name = 'TranslateTestModel'; @@ -3037,7 +2806,6 @@ class TranslateTestModel extends CakeTestModel { * useTable property * * @var string 'i18n' - * @access public */ public $useTable = 'i18n'; @@ -3045,7 +2813,6 @@ class TranslateTestModel extends CakeTestModel { * displayField property * * @var string 'field' - * @access public */ public $displayField = 'field'; } @@ -3060,21 +2827,18 @@ class TranslateWithPrefix extends CakeTestModel { * name property * * @var string 'TranslateTestModel' - * @access public */ public $name = 'TranslateWithPrefix'; /** * tablePrefix property * * @var string 'i18n' - * @access public */ public $tablePrefix = 'i18n_'; /** * displayField property * * @var string 'field' - * @access public */ public $displayField = 'field'; } @@ -3089,7 +2853,6 @@ class TranslatedItem extends CakeTestModel { * name property * * @var string 'TranslatedItem' - * @access public */ public $name = 'TranslatedItem'; @@ -3097,7 +2860,6 @@ class TranslatedItem extends CakeTestModel { * cacheQueries property * * @var bool false - * @access public */ public $cacheQueries = false; @@ -3105,7 +2867,6 @@ class TranslatedItem extends CakeTestModel { * actsAs property * * @var array - * @access public */ public $actsAs = array('Translate' => array('content', 'title')); @@ -3113,7 +2874,6 @@ class TranslatedItem extends CakeTestModel { * translateModel property * * @var string 'TranslateTestModel' - * @access public */ public $translateModel = 'TranslateTestModel'; } @@ -3128,28 +2888,24 @@ class TranslatedItem2 extends CakeTestModel { * name property * * @var string 'TranslatedItem' - * @access public */ public $name = 'TranslatedItem'; /** * cacheQueries property * * @var bool false - * @access public */ public $cacheQueries = false; /** * actsAs property * * @var array - * @access public */ public $actsAs = array('Translate' => array('content', 'title')); /** * translateModel property * * @var string 'TranslateTestModel' - * @access public */ public $translateModel = 'TranslateWithPrefix'; } @@ -3164,7 +2920,6 @@ class TranslatedItemWithTable extends CakeTestModel { * name property * * @var string 'TranslatedItemWithTable' - * @access public */ public $name = 'TranslatedItemWithTable'; @@ -3172,7 +2927,6 @@ class TranslatedItemWithTable extends CakeTestModel { * useTable property * * @var string 'translated_items' - * @access public */ public $useTable = 'translated_items'; @@ -3180,7 +2934,6 @@ class TranslatedItemWithTable extends CakeTestModel { * cacheQueries property * * @var bool false - * @access public */ public $cacheQueries = false; @@ -3188,7 +2941,6 @@ class TranslatedItemWithTable extends CakeTestModel { * actsAs property * * @var array - * @access public */ public $actsAs = array('Translate' => array('content', 'title')); @@ -3196,7 +2948,6 @@ class TranslatedItemWithTable extends CakeTestModel { * translateModel property * * @var string 'TranslateTestModel' - * @access public */ public $translateModel = 'TranslateTestModel'; @@ -3204,7 +2955,6 @@ class TranslatedItemWithTable extends CakeTestModel { * translateTable property * * @var string 'another_i18n' - * @access public */ public $translateTable = 'another_i18n'; } @@ -3220,7 +2970,6 @@ class TranslateArticleModel extends CakeTestModel { * name property * * @var string 'TranslateArticleModel' - * @access public */ public $name = 'TranslateArticleModel'; @@ -3228,7 +2977,6 @@ class TranslateArticleModel extends CakeTestModel { * useTable property * * @var string 'article_i18n' - * @access public */ public $useTable = 'article_i18n'; @@ -3236,7 +2984,6 @@ class TranslateArticleModel extends CakeTestModel { * displayField property * * @var string 'field' - * @access public */ public $displayField = 'field'; } @@ -3252,7 +2999,6 @@ class TranslatedArticle extends CakeTestModel { * name property * * @var string 'TranslatedArticle' - * @access public */ public $name = 'TranslatedArticle'; @@ -3260,7 +3006,6 @@ class TranslatedArticle extends CakeTestModel { * cacheQueries property * * @var bool false - * @access public */ public $cacheQueries = false; @@ -3268,7 +3013,6 @@ class TranslatedArticle extends CakeTestModel { * actsAs property * * @var array - * @access public */ public $actsAs = array('Translate' => array('title', 'body')); @@ -3276,7 +3020,6 @@ class TranslatedArticle extends CakeTestModel { * translateModel property * * @var string 'TranslateArticleModel' - * @access public */ public $translateModel = 'TranslateArticleModel'; @@ -3284,7 +3027,6 @@ class TranslatedArticle extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('User'); } @@ -3472,7 +3214,6 @@ class TestModel extends CakeTestModel { * name property * * @var string 'TestModel' - * @access public */ public $name = 'TestModel'; @@ -3480,7 +3221,6 @@ class TestModel extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -3488,7 +3228,6 @@ class TestModel extends CakeTestModel { * schema property * * @var array - * @access protected */ protected $_schema = array( 'id' => array('type' => 'integer', 'null' => '', 'default' => '', 'length' => '8'), @@ -3518,7 +3257,6 @@ class TestModel extends CakeTestModel { * @param mixed $fields * @param mixed $order * @param mixed $recursive - * @access public * @return void */ public function find($conditions = null, $fields = null, $order = null, $recursive = null) { @@ -3532,7 +3270,6 @@ class TestModel extends CakeTestModel { * @param mixed $fields * @param mixed $order * @param mixed $recursive - * @access public * @return void */ public function findAll($conditions = null, $fields = null, $order = null, $recursive = null) { @@ -3551,7 +3288,6 @@ class TestModel2 extends CakeTestModel { * name property * * @var string 'TestModel2' - * @access public */ public $name = 'TestModel2'; @@ -3559,7 +3295,6 @@ class TestModel2 extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; } @@ -3575,7 +3310,6 @@ class TestModel3 extends CakeTestModel { * name property * * @var string 'TestModel3' - * @access public */ public $name = 'TestModel3'; @@ -3583,7 +3317,6 @@ class TestModel3 extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; } @@ -3599,7 +3332,6 @@ class TestModel4 extends CakeTestModel { * name property * * @var string 'TestModel4' - * @access public */ public $name = 'TestModel4'; @@ -3607,7 +3339,6 @@ class TestModel4 extends CakeTestModel { * table property * * @var string 'test_model4' - * @access public */ public $table = 'test_model4'; @@ -3615,7 +3346,6 @@ class TestModel4 extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -3623,7 +3353,6 @@ class TestModel4 extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array( 'TestModel4Parent' => array( @@ -3636,7 +3365,6 @@ class TestModel4 extends CakeTestModel { * hasOne property * * @var array - * @access public */ public $hasOne = array( 'TestModel5' => array( @@ -3649,7 +3377,6 @@ class TestModel4 extends CakeTestModel { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('TestModel7' => array( 'className' => 'TestModel7', @@ -3662,7 +3389,6 @@ class TestModel4 extends CakeTestModel { /** * schema method * - * @access public * @return void */ public function schema($field = false) { @@ -3689,7 +3415,6 @@ class TestModel4TestModel7 extends CakeTestModel { * name property * * @var string 'TestModel4TestModel7' - * @access public */ public $name = 'TestModel4TestModel7'; @@ -3697,7 +3422,6 @@ class TestModel4TestModel7 extends CakeTestModel { * table property * * @var string 'test_model4_test_model7' - * @access public */ public $table = 'test_model4_test_model7'; @@ -3705,14 +3429,12 @@ class TestModel4TestModel7 extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; /** * schema method * - * @access public * @return void */ public function schema($field = false) { @@ -3737,7 +3459,6 @@ class TestModel5 extends CakeTestModel { * name property * * @var string 'TestModel5' - * @access public */ public $name = 'TestModel5'; @@ -3745,7 +3466,6 @@ class TestModel5 extends CakeTestModel { * table property * * @var string 'test_model5' - * @access public */ public $table = 'test_model5'; @@ -3753,7 +3473,6 @@ class TestModel5 extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -3761,7 +3480,6 @@ class TestModel5 extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('TestModel4' => array( 'className' => 'TestModel4', @@ -3772,7 +3490,6 @@ class TestModel5 extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array('TestModel6' => array( 'className' => 'TestModel6', @@ -3782,7 +3499,6 @@ class TestModel5 extends CakeTestModel { /** * schema method * - * @access public * @return void */ public function schema($field = false) { @@ -3810,7 +3526,6 @@ class TestModel6 extends CakeTestModel { * name property * * @var string 'TestModel6' - * @access public */ public $name = 'TestModel6'; @@ -3818,7 +3533,6 @@ class TestModel6 extends CakeTestModel { * table property * * @var string 'test_model6' - * @access public */ public $table = 'test_model6'; @@ -3826,7 +3540,6 @@ class TestModel6 extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -3834,7 +3547,6 @@ class TestModel6 extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('TestModel5' => array( 'className' => 'TestModel5', @@ -3844,7 +3556,6 @@ class TestModel6 extends CakeTestModel { /** * schema method * - * @access public * @return void */ public function schema($field = false) { @@ -3872,7 +3583,6 @@ class TestModel7 extends CakeTestModel { * name property * * @var string 'TestModel7' - * @access public */ public $name = 'TestModel7'; @@ -3880,7 +3590,6 @@ class TestModel7 extends CakeTestModel { * table property * * @var string 'test_model7' - * @access public */ public $table = 'test_model7'; @@ -3888,14 +3597,12 @@ class TestModel7 extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; /** * schema method * - * @access public * @return void */ public function schema($field = false) { @@ -3922,7 +3629,6 @@ class TestModel8 extends CakeTestModel { * name property * * @var string 'TestModel8' - * @access public */ public $name = 'TestModel8'; @@ -3930,7 +3636,6 @@ class TestModel8 extends CakeTestModel { * table property * * @var string 'test_model8' - * @access public */ public $table = 'test_model8'; @@ -3938,7 +3643,6 @@ class TestModel8 extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -3946,7 +3650,6 @@ class TestModel8 extends CakeTestModel { * hasOne property * * @var array - * @access public */ public $hasOne = array( 'TestModel9' => array( @@ -3959,7 +3662,6 @@ class TestModel8 extends CakeTestModel { /** * schema method * - * @access public * @return void */ public function schema($field = false) { @@ -3987,7 +3689,6 @@ class TestModel9 extends CakeTestModel { * name property * * @var string 'TestModel9' - * @access public */ public $name = 'TestModel9'; @@ -3995,7 +3696,6 @@ class TestModel9 extends CakeTestModel { * table property * * @var string 'test_model9' - * @access public */ public $table = 'test_model9'; @@ -4003,7 +3703,6 @@ class TestModel9 extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -4011,7 +3710,6 @@ class TestModel9 extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('TestModel8' => array( 'className' => 'TestModel8', @@ -4022,7 +3720,6 @@ class TestModel9 extends CakeTestModel { /** * schema method * - * @access public * @return void */ public function schema($field = false) { @@ -4050,7 +3747,6 @@ class Level extends CakeTestModel { * name property * * @var string 'Level' - * @access public */ public $name = 'Level'; @@ -4058,7 +3754,6 @@ class Level extends CakeTestModel { * table property * * @var string 'level' - * @access public */ public $table = 'level'; @@ -4066,7 +3761,6 @@ class Level extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -4074,7 +3768,6 @@ class Level extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array( 'Group'=> array( @@ -4088,7 +3781,6 @@ class Level extends CakeTestModel { /** * schema method * - * @access public * @return void */ public function schema($field = false) { @@ -4113,7 +3805,6 @@ class Group extends CakeTestModel { * name property * * @var string 'Group' - * @access public */ public $name = 'Group'; @@ -4121,7 +3812,6 @@ class Group extends CakeTestModel { * table property * * @var string 'group' - * @access public */ public $table = 'group'; @@ -4129,7 +3819,6 @@ class Group extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -4137,7 +3826,6 @@ class Group extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('Level'); @@ -4145,14 +3833,12 @@ class Group extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array('Category2', 'User2'); /** * schema method * - * @access public * @return void */ public function schema($field = false) { @@ -4179,7 +3865,6 @@ class User2 extends CakeTestModel { * name property * * @var string 'User2' - * @access public */ public $name = 'User2'; @@ -4187,7 +3872,6 @@ class User2 extends CakeTestModel { * table property * * @var string 'user' - * @access public */ public $table = 'user'; @@ -4195,7 +3879,6 @@ class User2 extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -4203,7 +3886,6 @@ class User2 extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array( 'Group' => array( @@ -4218,7 +3900,6 @@ class User2 extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array( 'Article2' => array( @@ -4229,7 +3910,6 @@ class User2 extends CakeTestModel { /** * schema method * - * @access public * @return void */ public function schema($field = false) { @@ -4256,7 +3936,6 @@ class Category2 extends CakeTestModel { * name property * * @var string 'Category2' - * @access public */ public $name = 'Category2'; @@ -4264,7 +3943,6 @@ class Category2 extends CakeTestModel { * table property * * @var string 'category' - * @access public */ public $table = 'category'; @@ -4272,7 +3950,6 @@ class Category2 extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -4280,7 +3957,6 @@ class Category2 extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array( 'Group' => array( @@ -4297,7 +3973,6 @@ class Category2 extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array( 'ChildCat' => array( @@ -4314,7 +3989,6 @@ class Category2 extends CakeTestModel { /** * schema method * - * @access public * @return void */ public function schema($field = false) { @@ -4344,7 +4018,6 @@ class Article2 extends CakeTestModel { * name property * * @var string 'Article2' - * @access public */ public $name = 'Article2'; @@ -4352,7 +4025,6 @@ class Article2 extends CakeTestModel { * table property * * @var string 'article' - * @access public */ public $table = 'articles'; @@ -4360,7 +4032,6 @@ class Article2 extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -4368,7 +4039,6 @@ class Article2 extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array( 'Category2' => array('className' => 'Category2'), @@ -4378,7 +4048,6 @@ class Article2 extends CakeTestModel { /** * schema method * - * @access public * @return void */ public function schema($field = false) { @@ -4420,7 +4089,6 @@ class CategoryFeatured2 extends CakeTestModel { * name property * * @var string 'CategoryFeatured2' - * @access public */ public $name = 'CategoryFeatured2'; @@ -4428,7 +4096,6 @@ class CategoryFeatured2 extends CakeTestModel { * table property * * @var string 'category_featured' - * @access public */ public $table = 'category_featured'; @@ -4436,14 +4103,12 @@ class CategoryFeatured2 extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; /** * schema method * - * @access public * @return void */ public function schema($field = false) { @@ -4471,7 +4136,6 @@ class Featured2 extends CakeTestModel { * name property * * @var string 'Featured2' - * @access public */ public $name = 'Featured2'; @@ -4479,7 +4143,6 @@ class Featured2 extends CakeTestModel { * table property * * @var string 'featured2' - * @access public */ public $table = 'featured2'; @@ -4487,7 +4150,6 @@ class Featured2 extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -4495,7 +4157,6 @@ class Featured2 extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array( 'CategoryFeatured2' => array( @@ -4506,7 +4167,6 @@ class Featured2 extends CakeTestModel { /** * schema method * - * @access public * @return void */ public function schema($field = false) { @@ -4533,7 +4193,6 @@ class Comment2 extends CakeTestModel { * name property * * @var string 'Comment2' - * @access public */ public $name = 'Comment2'; @@ -4541,7 +4200,6 @@ class Comment2 extends CakeTestModel { * table property * * @var string 'comment' - * @access public */ public $table = 'comment'; @@ -4549,7 +4207,6 @@ class Comment2 extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('ArticleFeatured2', 'User2'); @@ -4557,14 +4214,12 @@ class Comment2 extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; /** * schema method * - * @access public * @return void */ public function schema($field = false) { @@ -4591,7 +4246,6 @@ class ArticleFeatured2 extends CakeTestModel { * name property * * @var string 'ArticleFeatured2' - * @access public */ public $name = 'ArticleFeatured2'; @@ -4599,7 +4253,6 @@ class ArticleFeatured2 extends CakeTestModel { * table property * * @var string 'article_featured' - * @access public */ public $table = 'article_featured'; @@ -4607,7 +4260,6 @@ class ArticleFeatured2 extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -4615,7 +4267,6 @@ class ArticleFeatured2 extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array( 'CategoryFeatured2' => array('className' => 'CategoryFeatured2'), @@ -4626,7 +4277,6 @@ class ArticleFeatured2 extends CakeTestModel { * hasOne property * * @var array - * @access public */ public $hasOne = array( 'Featured2' => array('className' => 'Featured2') @@ -4636,7 +4286,6 @@ class ArticleFeatured2 extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array( 'Comment2' => array('className'=>'Comment2', 'dependent' => true) @@ -4645,7 +4294,6 @@ class ArticleFeatured2 extends CakeTestModel { /** * schema method * - * @access public * @return void */ public function schema($field = false) { @@ -4677,7 +4325,6 @@ class MysqlTestModel extends Model { * name property * * @var string 'MysqlTestModel' - * @access public */ public $name = 'MysqlTestModel'; @@ -4685,7 +4332,6 @@ class MysqlTestModel extends Model { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -4696,7 +4342,6 @@ class MysqlTestModel extends Model { * @param mixed $fields * @param mixed $order * @param mixed $recursive - * @access public * @return void */ public function find($conditions = null, $fields = null, $order = null, $recursive = null) { @@ -4710,7 +4355,6 @@ class MysqlTestModel extends Model { * @param mixed $fields * @param mixed $order * @param mixed $recursive - * @access public * @return void */ public function findAll($conditions = null, $fields = null, $order = null, $recursive = null) { @@ -4720,7 +4364,6 @@ class MysqlTestModel extends Model { /** * schema method * - * @access public * @return void */ public function schema($field = false) { diff --git a/lib/Cake/Test/Case/Network/CakeRequestTest.php b/lib/Cake/Test/Case/Network/CakeRequestTest.php index 00603bd88..6aa94708b 100644 --- a/lib/Cake/Test/Case/Network/CakeRequestTest.php +++ b/lib/Cake/Test/Case/Network/CakeRequestTest.php @@ -1512,7 +1512,6 @@ XML; * * @param mixed $env * @return void - * @access private */ function __loadEnvironment($env) { if (isset($env['App'])) { diff --git a/lib/Cake/Test/Case/Network/CakeSocketTest.php b/lib/Cake/Test/Case/Network/CakeSocketTest.php index 1210781c6..76dc6aca0 100644 --- a/lib/Cake/Test/Case/Network/CakeSocketTest.php +++ b/lib/Cake/Test/Case/Network/CakeSocketTest.php @@ -29,7 +29,6 @@ class CakeSocketTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -40,7 +39,6 @@ class CakeSocketTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -51,7 +49,6 @@ class CakeSocketTest extends CakeTestCase { /** * testConstruct method * - * @access public * @return void */ public function testConstruct() { @@ -83,7 +80,6 @@ class CakeSocketTest extends CakeTestCase { /** * testSocketConnection method * - * @access public * @return void */ public function testSocketConnection() { @@ -129,7 +125,6 @@ class CakeSocketTest extends CakeTestCase { /** * testSocketHost method * - * @access public * @return void */ public function testSocketHost() { @@ -151,7 +146,6 @@ class CakeSocketTest extends CakeTestCase { /** * testSocketWriting method * - * @access public * @return void */ public function testSocketWriting() { @@ -162,7 +156,6 @@ class CakeSocketTest extends CakeTestCase { /** * testSocketReading method * - * @access public * @return void */ public function testSocketReading() { @@ -195,7 +188,6 @@ class CakeSocketTest extends CakeTestCase { /** * testLastError method * - * @access public * @return void */ public function testLastError() { @@ -207,7 +199,6 @@ class CakeSocketTest extends CakeTestCase { /** * testReset method * - * @access public * @return void */ public function testReset() { diff --git a/lib/Cake/Test/Case/Routing/DispatcherTest.php b/lib/Cake/Test/Case/Routing/DispatcherTest.php index 31edecea6..0418928e9 100644 --- a/lib/Cake/Test/Case/Routing/DispatcherTest.php +++ b/lib/Cake/Test/Case/Routing/DispatcherTest.php @@ -75,7 +75,6 @@ class MyPluginController extends MyPluginAppController { * name property * * @var string 'MyPlugin' - * @access public */ public $name = 'MyPlugin'; @@ -83,7 +82,6 @@ class MyPluginController extends MyPluginAppController { * uses property * * @var array - * @access public */ public $uses = array(); @@ -127,7 +125,6 @@ class SomePagesController extends AppController { * name property * * @var string 'SomePages' - * @access public */ public $name = 'SomePages'; @@ -135,7 +132,6 @@ class SomePagesController extends AppController { * uses property * * @var array - * @access public */ public $uses = array(); @@ -180,7 +176,6 @@ class OtherPagesController extends MyPluginAppController { * name property * * @var string 'OtherPages' - * @access public */ public $name = 'OtherPages'; @@ -188,7 +183,6 @@ class OtherPagesController extends MyPluginAppController { * uses property * * @var array - * @access public */ public $uses = array(); @@ -223,7 +217,6 @@ class TestDispatchPagesController extends AppController { * name property * * @var string 'TestDispatchPages' - * @access public */ public $name = 'TestDispatchPages'; @@ -231,7 +224,6 @@ class TestDispatchPagesController extends AppController { * uses property * * @var array - * @access public */ public $uses = array(); @@ -273,7 +265,6 @@ class ArticlesTestController extends ArticlesTestAppController { * name property * * @var string 'ArticlesTest' - * @access public */ public $name = 'ArticlesTest'; @@ -281,7 +272,6 @@ class ArticlesTestController extends ArticlesTestAppController { * uses property * * @var array - * @access public */ public $uses = array(); @@ -314,7 +304,6 @@ class SomePostsController extends AppController { * name property * * @var string 'SomePosts' - * @access public */ public $name = 'SomePosts'; @@ -322,7 +311,6 @@ class SomePostsController extends AppController { * uses property * * @var array - * @access public */ public $uses = array(); @@ -330,7 +318,6 @@ class SomePostsController extends AppController { * autoRender property * * @var bool false - * @access public */ public $autoRender = false; @@ -378,7 +365,6 @@ class TestCachedPagesController extends Controller { * name property * * @var string 'TestCachedPages' - * @access public */ public $name = 'TestCachedPages'; @@ -386,7 +372,6 @@ class TestCachedPagesController extends Controller { * uses property * * @var array - * @access public */ public $uses = array(); @@ -394,7 +379,6 @@ class TestCachedPagesController extends Controller { * helpers property * * @var array - * @access public */ public $helpers = array('Cache', 'Html'); @@ -402,7 +386,6 @@ class TestCachedPagesController extends Controller { * cacheAction property * * @var array - * @access public */ public $cacheAction = array( 'index' => '+2 sec', @@ -421,7 +404,6 @@ class TestCachedPagesController extends Controller { * viewPath property * * @var string 'posts' - * @access public */ public $viewPath = 'Posts'; @@ -473,7 +455,6 @@ class TimesheetsController extends Controller { * name property * * @var string 'Timesheets' - * @access public */ public $name = 'Timesheets'; @@ -481,7 +462,6 @@ class TimesheetsController extends Controller { * uses property * * @var array - * @access public */ public $uses = array(); @@ -1517,7 +1497,6 @@ class DispatcherTest extends CakeTestCase { * backupEnvironment method * * @return void - * @access private */ function __backupEnvironment() { return array( @@ -1532,7 +1511,6 @@ class DispatcherTest extends CakeTestCase { * reloadEnvironment method * * @return void - * @access private */ function __reloadEnvironment() { foreach ($_GET as $key => $val) { @@ -1552,7 +1530,6 @@ class DispatcherTest extends CakeTestCase { * * @param mixed $env * @return void - * @access private */ function __loadEnvironment($env) { if ($env['reload']) { @@ -1587,7 +1564,6 @@ class DispatcherTest extends CakeTestCase { * * @param mixed $her * @return string - * @access private */ function __cachePath($here) { $path = $here; diff --git a/lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php b/lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php index 51d1c5c27..e38d0188a 100644 --- a/lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php +++ b/lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php @@ -12,7 +12,6 @@ class CakeRouteTestCase extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { diff --git a/lib/Cake/Test/Case/Routing/RouterTest.php b/lib/Cake/Test/Case/Routing/RouterTest.php index 987067688..92cd241e2 100644 --- a/lib/Cake/Test/Case/Routing/RouterTest.php +++ b/lib/Cake/Test/Case/Routing/RouterTest.php @@ -34,7 +34,6 @@ class RouterTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -55,7 +54,6 @@ class RouterTest extends CakeTestCase { /** * testFullBaseURL method * - * @access public * @return void */ public function testFullBaseURL() { @@ -72,7 +70,6 @@ class RouterTest extends CakeTestCase { /** * testRouteDefaultParams method * - * @access public * @return void */ public function testRouteDefaultParams() { @@ -83,7 +80,6 @@ class RouterTest extends CakeTestCase { /** * testResourceRoutes method * - * @access public * @return void */ public function testResourceRoutes() { @@ -133,7 +129,6 @@ class RouterTest extends CakeTestCase { /** * testMultipleResourceRoute method * - * @access public * @return void */ public function testMultipleResourceRoute() { @@ -151,7 +146,6 @@ class RouterTest extends CakeTestCase { /** * testGenerateUrlResourceRoute method * - * @access public * @return void */ public function testGenerateUrlResourceRoute() { @@ -185,7 +179,6 @@ class RouterTest extends CakeTestCase { /** * testUrlNormalization method * - * @access public * @return void */ public function testUrlNormalization() { @@ -257,7 +250,6 @@ class RouterTest extends CakeTestCase { /** * test generation of basic urls. * - * @access public * @return void */ public function testUrlGenerationBasic() { @@ -558,7 +550,6 @@ class RouterTest extends CakeTestCase { /** * Test url generation with an admin prefix * - * @access public * @return void */ public function testUrlGenerationWithAdminPrefix() { @@ -756,7 +747,6 @@ class RouterTest extends CakeTestCase { /** * testUrlGenerationWithExtensions method * - * @access public * @return void */ public function testUrlGenerationWithExtensions() { @@ -781,7 +771,6 @@ class RouterTest extends CakeTestCase { /** * testPluginUrlGeneration method * - * @access public * @return void */ public function testUrlGenerationPlugins() { @@ -864,7 +853,6 @@ class RouterTest extends CakeTestCase { /** * testUrlParsing method * - * @access public * @return void */ public function testUrlParsing() { @@ -1045,7 +1033,6 @@ class RouterTest extends CakeTestCase { /** * testUuidRoutes method * - * @access public * @return void */ public function testUuidRoutes() { @@ -1062,7 +1049,6 @@ class RouterTest extends CakeTestCase { /** * testRouteSymmetry method * - * @access public * @return void */ public function testRouteSymmetry() { @@ -1189,7 +1175,6 @@ class RouterTest extends CakeTestCase { /** * testExtensionParsingSetting method * - * @access public * @return void */ public function testExtensionParsingSetting() { @@ -1202,7 +1187,6 @@ class RouterTest extends CakeTestCase { /** * testExtensionParsing method * - * @access public * @return void */ public function testExtensionParsing() { @@ -1254,7 +1238,6 @@ class RouterTest extends CakeTestCase { /** * testQuerystringGeneration method * - * @access public * @return void */ public function testQuerystringGeneration() { @@ -1284,7 +1267,6 @@ class RouterTest extends CakeTestCase { /** * testConnectNamed method * - * @access public * @return void */ public function testConnectNamed() { @@ -1316,7 +1298,6 @@ class RouterTest extends CakeTestCase { /** * testNamedArgsUrlGeneration method * - * @access public * @return void */ public function testNamedArgsUrlGeneration() { @@ -1378,7 +1359,6 @@ class RouterTest extends CakeTestCase { /** * testNamedArgsUrlParsing method * - * @access public * @return void */ public function testNamedArgsUrlParsing() { @@ -1440,7 +1420,6 @@ class RouterTest extends CakeTestCase { /** * test url generation with legacy (1.2) style prefix routes. * - * @access public * @return void * @todo Remove tests related to legacy style routes. * @see testUrlGenerationWithAutoPrefixes @@ -1655,7 +1634,6 @@ class RouterTest extends CakeTestCase { /** * testRemoveBase method * - * @access public * @return void */ public function testRemoveBase() { @@ -1687,7 +1665,6 @@ class RouterTest extends CakeTestCase { /** * testPagesUrlParsing method * - * @access public * @return void */ public function testPagesUrlParsing() { @@ -1798,7 +1775,6 @@ class RouterTest extends CakeTestCase { /** * testParsingWithPrefixes method * - * @access public * @return void */ public function testParsingWithPrefixes() { @@ -1868,7 +1844,6 @@ class RouterTest extends CakeTestCase { /** * Tests URL generation with flags and prefixes in and out of context * - * @access public * @return void */ public function testUrlWritingWithPrefixes() { @@ -1934,7 +1909,6 @@ class RouterTest extends CakeTestCase { /** * testPassedArgsOrder method * - * @access public * @return void */ public function testPassedArgsOrder() { @@ -1989,7 +1963,6 @@ class RouterTest extends CakeTestCase { /** * testRegexRouteMatching method * - * @access public * @return void */ public function testRegexRouteMatching() { diff --git a/lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php b/lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php index 0546a44af..07b855d6c 100644 --- a/lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php +++ b/lib/Cake/Test/Case/TestSuite/CakeTestCaseTest.php @@ -43,7 +43,6 @@ class CakeTestCaseTest extends CakeTestCase { /** * setUp * - * @access public * @return void */ public function setUp() { @@ -54,7 +53,6 @@ class CakeTestCaseTest extends CakeTestCase { /** * tearDown * - * @access public * @return void */ public function tearDown() { @@ -66,7 +64,6 @@ class CakeTestCaseTest extends CakeTestCase { /** * testAssertGoodTags * - * @access public * @return void */ public function testAssertTagsQuotes() { @@ -124,7 +121,6 @@ class CakeTestCaseTest extends CakeTestCase { /** * testNumericValuesInExpectationForAssertTags * - * @access public * @return void */ public function testNumericValuesInExpectationForAssertTags() { @@ -138,7 +134,6 @@ class CakeTestCaseTest extends CakeTestCase { /** * testBadAssertTags * - * @access public * @return void */ public function testBadAssertTags() { @@ -158,7 +153,6 @@ class CakeTestCaseTest extends CakeTestCase { /** * testLoadFixtures * - * @access public * @return void */ public function testLoadFixtures() { @@ -177,7 +171,6 @@ class CakeTestCaseTest extends CakeTestCase { /** * testLoadFixturesOnDemand * - * @access public * @return void */ public function testLoadFixturesOnDemand() { @@ -194,7 +187,6 @@ class CakeTestCaseTest extends CakeTestCase { /** * testLoadFixturesOnDemand * - * @access public * @return void */ public function testUnoadFixturesAfterFailure() { @@ -211,7 +203,6 @@ class CakeTestCaseTest extends CakeTestCase { /** * testThrowException * - * @access public * @return void */ public function testThrowException() { diff --git a/lib/Cake/Test/Case/TestSuite/CakeTestFixtureTest.php b/lib/Cake/Test/Case/TestSuite/CakeTestFixtureTest.php index 75054f06b..370e7b12c 100644 --- a/lib/Cake/Test/Case/TestSuite/CakeTestFixtureTest.php +++ b/lib/Cake/Test/Case/TestSuite/CakeTestFixtureTest.php @@ -178,7 +178,6 @@ class CakeTestFixtureTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -191,7 +190,6 @@ class CakeTestFixtureTest extends CakeTestCase { /** * tearDown * - * @access public * @return void */ public function tearDown() { @@ -202,7 +200,6 @@ class CakeTestFixtureTest extends CakeTestCase { /** * testInit * - * @access public * @return void */ public function testInit() { @@ -316,7 +313,6 @@ class CakeTestFixtureTest extends CakeTestCase { /** * testImport * - * @access public * @return void */ public function testImport() { @@ -374,7 +370,6 @@ class CakeTestFixtureTest extends CakeTestCase { /** * test create method * - * @access public * @return void */ public function testCreate() { @@ -393,7 +388,6 @@ class CakeTestFixtureTest extends CakeTestCase { /** * test the insert method * - * @access public * @return void */ public function testInsert() { @@ -434,7 +428,6 @@ class CakeTestFixtureTest extends CakeTestCase { /** * test the insert method * - * @access public * @return void */ public function testInsertStrings() { @@ -459,7 +452,6 @@ class CakeTestFixtureTest extends CakeTestCase { /** * Test the drop method * - * @access public * @return void */ public function testDrop() { @@ -483,7 +475,6 @@ class CakeTestFixtureTest extends CakeTestCase { /** * Test the truncate method. * - * @access public * @return void */ public function testTruncate() { diff --git a/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php b/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php index 8c116c6f4..17e542ee0 100644 --- a/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php +++ b/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php @@ -109,7 +109,6 @@ class ControllerTestCaseTest extends CakeTestCase { * fixtures property * * @var array - * @access public */ public $fixtures = array('core.post', 'core.author', 'core.test_plugin_comment'); diff --git a/lib/Cake/Test/Case/Utility/ClassRegistryTest.php b/lib/Cake/Test/Case/Utility/ClassRegistryTest.php index 81bc785db..d9c3fd3bd 100644 --- a/lib/Cake/Test/Case/Utility/ClassRegistryTest.php +++ b/lib/Cake/Test/Case/Utility/ClassRegistryTest.php @@ -29,7 +29,6 @@ class ClassRegisterModel extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; } @@ -45,7 +44,6 @@ class RegisterArticle extends ClassRegisterModel { * name property * * @var string 'RegisterArticle' - * @access public */ public $name = 'RegisterArticle'; } @@ -61,7 +59,6 @@ class RegisterArticleFeatured extends ClassRegisterModel { * name property * * @var string 'RegisterArticleFeatured' - * @access public */ public $name = 'RegisterArticleFeatured'; } @@ -77,7 +74,6 @@ class RegisterArticleTag extends ClassRegisterModel { * name property * * @var string 'RegisterArticleTag' - * @access public */ public $name = 'RegisterArticleTag'; } @@ -93,7 +89,6 @@ class RegistryPluginAppModel extends ClassRegisterModel { * tablePrefix property * * @var string 'something_' - * @access public */ public $tablePrefix = 'something_'; } @@ -109,7 +104,6 @@ class TestRegistryPluginModel extends RegistryPluginAppModel { * name property * * @var string 'TestRegistryPluginModel' - * @access public */ public $name = 'TestRegistryPluginModel'; } @@ -125,7 +119,6 @@ class RegisterCategory extends ClassRegisterModel { * name property * * @var string 'RegisterCategory' - * @access public */ public $name = 'RegisterCategory'; } @@ -140,7 +133,6 @@ class ClassRegistryTest extends CakeTestCase { /** * testAddModel method * - * @access public * @return void */ public function testAddModel() { @@ -198,7 +190,6 @@ class ClassRegistryTest extends CakeTestCase { /** * testClassRegistryFlush method * - * @access public * @return void */ public function testClassRegistryFlush() { @@ -216,7 +207,6 @@ class ClassRegistryTest extends CakeTestCase { /** * testAddMultipleModels method * - * @access public * @return void */ public function testAddMultipleModels() { @@ -258,7 +248,6 @@ class ClassRegistryTest extends CakeTestCase { /** * testPluginAppModel method * - * @access public * @return void */ public function testPluginAppModel() { diff --git a/lib/Cake/Test/Case/Utility/DebuggerTest.php b/lib/Cake/Test/Case/Utility/DebuggerTest.php index fe4ee93e7..806664b40 100644 --- a/lib/Cake/Test/Case/Utility/DebuggerTest.php +++ b/lib/Cake/Test/Case/Utility/DebuggerTest.php @@ -41,7 +41,6 @@ class DebuggerTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -53,7 +52,6 @@ class DebuggerTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -67,7 +65,6 @@ class DebuggerTest extends CakeTestCase { /** * testDocRef method * - * @access public * @return void */ public function testDocRef() { @@ -80,7 +77,6 @@ class DebuggerTest extends CakeTestCase { /** * test Excerpt writing * - * @access public * @return void */ public function testExcerpt() { @@ -104,7 +100,6 @@ class DebuggerTest extends CakeTestCase { /** * testOutput method * - * @access public * @return void */ public function testOutput() { @@ -278,7 +273,6 @@ class DebuggerTest extends CakeTestCase { /** * testTrimPath method * - * @access public * @return void */ public function testTrimPath() { @@ -289,7 +283,6 @@ class DebuggerTest extends CakeTestCase { /** * testExportVar method * - * @access public * @return void */ public function testExportVar() { @@ -329,7 +322,6 @@ class DebuggerTest extends CakeTestCase { /** * testLog method * - * @access public * @return void */ public function testLog() { @@ -356,7 +348,6 @@ class DebuggerTest extends CakeTestCase { /** * testDump method * - * @access public * @return void */ public function testDump() { @@ -383,7 +374,6 @@ class DebuggerTest extends CakeTestCase { /** * test getInstance. * - * @access public * @return void */ public function testGetInstance() { @@ -406,7 +396,6 @@ class DebuggerTest extends CakeTestCase { * If a connection error occurs, the config variable is passed through exportVar * *** our database login credentials such that they are never visible * - * @access public * @return void */ function testNoDbCredentials() { diff --git a/lib/Cake/Test/Case/Utility/FileTest.php b/lib/Cake/Test/Case/Utility/FileTest.php index 9d567f331..a1c61ecd2 100644 --- a/lib/Cake/Test/Case/Utility/FileTest.php +++ b/lib/Cake/Test/Case/Utility/FileTest.php @@ -30,7 +30,6 @@ class FileTest extends CakeTestCase { * File property * * @var mixed null - * @access public */ public $File = null; @@ -59,7 +58,6 @@ class FileTest extends CakeTestCase { /** * testBasic method * - * @access public * @return void */ public function testBasic() { @@ -121,7 +119,6 @@ class FileTest extends CakeTestCase { /** * testRead method * - * @access public * @return void */ public function testRead() { @@ -153,7 +150,6 @@ class FileTest extends CakeTestCase { /** * testOffset method * - * @access public * @return void */ public function testOffset() { @@ -186,7 +182,6 @@ class FileTest extends CakeTestCase { /** * testOpen method * - * @access public * @return void */ public function testOpen() { @@ -211,7 +206,6 @@ class FileTest extends CakeTestCase { /** * testClose method * - * @access public * @return void */ public function testClose() { @@ -229,7 +223,6 @@ class FileTest extends CakeTestCase { /** * testCreate method * - * @access public * @return void */ public function testCreate() { @@ -241,7 +234,6 @@ class FileTest extends CakeTestCase { /** * testOpeningNonExistantFileCreatesIt method * - * @access public * @return void */ public function testOpeningNonExistantFileCreatesIt() { @@ -255,7 +247,6 @@ class FileTest extends CakeTestCase { /** * testPrepare method * - * @access public * @return void */ public function testPrepare() { @@ -276,7 +267,6 @@ class FileTest extends CakeTestCase { /** * testReadable method * - * @access public * @return void */ public function testReadable() { @@ -290,7 +280,6 @@ class FileTest extends CakeTestCase { /** * testWritable method * - * @access public * @return void */ public function testWritable() { @@ -304,7 +293,6 @@ class FileTest extends CakeTestCase { /** * testExecutable method * - * @access public * @return void */ public function testExecutable() { @@ -318,7 +306,6 @@ class FileTest extends CakeTestCase { /** * testLastAccess method * - * @access public * @return void */ public function testLastAccess() { @@ -333,7 +320,6 @@ class FileTest extends CakeTestCase { /** * testLastChange method * - * @access public * @return void */ public function testLastChange() { @@ -350,7 +336,6 @@ class FileTest extends CakeTestCase { /** * testWrite method * - * @access public * @return void */ public function testWrite() { @@ -381,7 +366,6 @@ class FileTest extends CakeTestCase { /** * testAppend method * - * @access public * @return void */ public function testAppend() { @@ -410,7 +394,6 @@ class FileTest extends CakeTestCase { /** * testDelete method * - * @access public * @return void */ public function testDelete() { @@ -435,7 +418,6 @@ class FileTest extends CakeTestCase { /** * testCopy method * - * @access public * @return void */ public function testCopy() { @@ -465,7 +447,6 @@ class FileTest extends CakeTestCase { * getTmpFile method * * @param bool $paintSkip - * @access protected * @return void */ function _getTmpFile($paintSkip = true) { diff --git a/lib/Cake/Test/Case/Utility/FolderTest.php b/lib/Cake/Test/Case/Utility/FolderTest.php index 19b061205..01bb44e0d 100644 --- a/lib/Cake/Test/Case/Utility/FolderTest.php +++ b/lib/Cake/Test/Case/Utility/FolderTest.php @@ -29,7 +29,6 @@ class FolderTest extends CakeTestCase { /** * testBasic method * - * @access public * @return void */ public function testBasic() { @@ -54,7 +53,6 @@ class FolderTest extends CakeTestCase { /** * testInPath method * - * @access public * @return void */ public function testInPath() { @@ -142,7 +140,6 @@ class FolderTest extends CakeTestCase { /** * testOperations method * - * @access public * @return void */ public function testOperations() { @@ -243,7 +240,6 @@ class FolderTest extends CakeTestCase { /** * testRealPathForWebroot method * - * @access public * @return void */ public function testRealPathForWebroot() { @@ -254,7 +250,6 @@ class FolderTest extends CakeTestCase { /** * testZeroAsDirectory method * - * @access public * @return void */ public function testZeroAsDirectory() { @@ -289,7 +284,6 @@ class FolderTest extends CakeTestCase { /** * testFolderRead method * - * @access public * @return void */ public function testFolderRead() { @@ -308,7 +302,6 @@ class FolderTest extends CakeTestCase { /** * testFolderTree method * - * @access public * @return void */ public function testFolderTree() { @@ -357,7 +350,6 @@ class FolderTest extends CakeTestCase { /** * testWindowsPath method * - * @access public * @return void */ public function testWindowsPath() { @@ -370,7 +362,6 @@ class FolderTest extends CakeTestCase { /** * testIsAbsolute method * - * @access public * @return void */ public function testIsAbsolute() { @@ -392,7 +383,6 @@ class FolderTest extends CakeTestCase { /** * testIsSlashTerm method * - * @access public * @return void */ public function testIsSlashTerm() { @@ -405,7 +395,6 @@ class FolderTest extends CakeTestCase { /** * testStatic method * - * @access public * @return void */ public function testSlashTerm() { @@ -416,7 +405,6 @@ class FolderTest extends CakeTestCase { /** * testNormalizePath method * - * @access public * @return void */ public function testNormalizePath() { @@ -436,7 +424,6 @@ class FolderTest extends CakeTestCase { /** * correctSlashFor method * - * @access public * @return void */ public function testCorrectSlashFor() { @@ -456,7 +443,6 @@ class FolderTest extends CakeTestCase { /** * testInCakePath method * - * @access public * @return void */ public function testInCakePath() { @@ -480,7 +466,6 @@ class FolderTest extends CakeTestCase { /** * testFind method * - * @access public * @return void */ public function testFind() { @@ -533,7 +518,6 @@ class FolderTest extends CakeTestCase { /** * testFindRecursive method * - * @access public * @return void */ public function testFindRecursive() { @@ -591,7 +575,6 @@ class FolderTest extends CakeTestCase { /** * testConstructWithNonExistantPath method * - * @access public * @return void */ public function testConstructWithNonExistantPath() { @@ -604,7 +587,6 @@ class FolderTest extends CakeTestCase { /** * testDirSize method * - * @access public * @return void */ public function testDirSize() { @@ -624,7 +606,6 @@ class FolderTest extends CakeTestCase { /** * testDelete method * - * @access public * @return void */ public function testDelete() { @@ -658,7 +639,6 @@ class FolderTest extends CakeTestCase { * are skipped and not merged or overwritten. * * @return void - * @access public */ public function testCopy() { $path = TMP . 'folder_test'; @@ -716,7 +696,6 @@ class FolderTest extends CakeTestCase { * are skipped and not merged or overwritten. * * @return void - * @access public */ public function testMove() { $path = TMP . 'folder_test'; diff --git a/lib/Cake/Test/Case/Utility/InflectorTest.php b/lib/Cake/Test/Case/Utility/InflectorTest.php index f2657ce47..486db3edc 100644 --- a/lib/Cake/Test/Case/Utility/InflectorTest.php +++ b/lib/Cake/Test/Case/Utility/InflectorTest.php @@ -47,7 +47,6 @@ class InflectorTest extends CakeTestCase { /** * testInflectingSingulars method * - * @access public * @return void */ public function testInflectingSingulars() { @@ -114,7 +113,6 @@ class InflectorTest extends CakeTestCase { /** * testInflectingPlurals method * - * @access public * @return void */ public function testInflectingPlurals() { @@ -161,7 +159,6 @@ class InflectorTest extends CakeTestCase { /** * testInflectorSlug method * - * @access public * @return void */ public function testInflectorSlug() { @@ -225,7 +222,6 @@ class InflectorTest extends CakeTestCase { /** * testInflectorSlugWithMap method * - * @access public * @return void */ public function testInflectorSlugWithMap() { @@ -242,7 +238,6 @@ class InflectorTest extends CakeTestCase { /** * testInflectorSlugWithMapOverridingDefault method * - * @access public * @return void */ public function testInflectorSlugWithMapOverridingDefault() { @@ -278,7 +273,6 @@ class InflectorTest extends CakeTestCase { /** * testVariableNaming method * - * @access public * @return void */ public function testVariableNaming() { @@ -291,7 +285,6 @@ class InflectorTest extends CakeTestCase { /** * testClassNaming method * - * @access public * @return void */ public function testClassNaming() { @@ -304,7 +297,6 @@ class InflectorTest extends CakeTestCase { /** * testTableNaming method * - * @access public * @return void */ public function testTableNaming() { @@ -317,7 +309,6 @@ class InflectorTest extends CakeTestCase { /** * testHumanization method * - * @access public * @return void */ public function testHumanization() { @@ -329,7 +320,6 @@ class InflectorTest extends CakeTestCase { /** * testCustomPluralRule method * - * @access public * @return void */ public function testCustomPluralRule() { @@ -354,7 +344,6 @@ class InflectorTest extends CakeTestCase { /** * testCustomSingularRule method * - * @access public * @return void */ public function testCustomSingularRule() { @@ -378,7 +367,6 @@ class InflectorTest extends CakeTestCase { /** * testCustomTransliterationRule method * - * @access public * @return void */ public function testCustomTransliterationRule() { diff --git a/lib/Cake/Test/Case/Utility/SanitizeTest.php b/lib/Cake/Test/Case/Utility/SanitizeTest.php index 96ba73ef8..c0ee195a9 100644 --- a/lib/Cake/Test/Case/Utility/SanitizeTest.php +++ b/lib/Cake/Test/Case/Utility/SanitizeTest.php @@ -29,7 +29,6 @@ class SanitizeDataTest extends CakeTestModel { * name property * * @var string 'SanitizeDataTest' - * @access public */ public $name = 'SanitizeDataTest'; @@ -37,7 +36,6 @@ class SanitizeDataTest extends CakeTestModel { * useTable property * * @var string 'data_tests' - * @access public */ public $useTable = 'data_tests'; } @@ -53,7 +51,6 @@ class SanitizeArticle extends CakeTestModel { * name property * * @var string 'Article' - * @access public */ public $name = 'SanitizeArticle'; @@ -61,7 +58,6 @@ class SanitizeArticle extends CakeTestModel { * useTable property * * @var string 'articles' - * @access public */ public $useTable = 'articles'; } @@ -77,7 +73,6 @@ class SanitizeTest extends CakeTestCase { * autoFixtures property * * @var bool false - * @access public */ public $autoFixtures = false; @@ -85,14 +80,12 @@ class SanitizeTest extends CakeTestCase { * fixtures property * * @var array - * @access public */ public $fixtures = array('core.data_test', 'core.article'); /** * testEscapeAlphaNumeric method * - * @access public * @return void */ public function testEscapeAlphaNumeric() { @@ -124,7 +117,6 @@ class SanitizeTest extends CakeTestCase { /** * testClean method * - * @access public * @return void */ public function testClean() { @@ -205,7 +197,6 @@ class SanitizeTest extends CakeTestCase { /** * testHtml method * - * @access public * @return void */ public function testHtml() { @@ -247,7 +238,6 @@ class SanitizeTest extends CakeTestCase { /** * testStripWhitespace method * - * @access public * @return void */ public function testStripWhitespace() { @@ -265,7 +255,6 @@ class SanitizeTest extends CakeTestCase { /** * testParanoid method * - * @access public * @return void */ public function testParanoid() { @@ -307,7 +296,6 @@ class SanitizeTest extends CakeTestCase { /** * testStripImages method * - * @access public * @return void */ public function testStripImages() { @@ -335,7 +323,6 @@ class SanitizeTest extends CakeTestCase { /** * testStripScripts method * - * @access public * @return void */ public function testStripScripts() { @@ -399,7 +386,6 @@ HTML; /** * testStripAll method * - * @access public * @return void */ public function testStripAll() { @@ -431,7 +417,6 @@ HTML; /** * testStripTags method * - * @access public * @return void */ public function testStripTags() { diff --git a/lib/Cake/Test/Case/Utility/SecurityTest.php b/lib/Cake/Test/Case/Utility/SecurityTest.php index 8191d32ef..f0839cf78 100644 --- a/lib/Cake/Test/Case/Utility/SecurityTest.php +++ b/lib/Cake/Test/Case/Utility/SecurityTest.php @@ -29,14 +29,12 @@ class SecurityTest extends CakeTestCase { * sut property * * @var mixed null - * @access public */ public $sut = null; /** * testInactiveMins method * - * @access public * @return void */ public function testInactiveMins() { @@ -53,7 +51,6 @@ class SecurityTest extends CakeTestCase { /** * testGenerateAuthkey method * - * @access public * @return void */ public function testGenerateAuthkey() { @@ -63,7 +60,6 @@ class SecurityTest extends CakeTestCase { /** * testValidateAuthKey method * - * @access public * @return void */ public function testValidateAuthKey() { @@ -74,7 +70,6 @@ class SecurityTest extends CakeTestCase { /** * testHash method * - * @access public * @return void */ public function testHash() { @@ -123,7 +118,6 @@ class SecurityTest extends CakeTestCase { /** * testCipher method * - * @access public * @return void */ public function testCipher() { diff --git a/lib/Cake/Test/Case/Utility/SetTest.php b/lib/Cake/Test/Case/Utility/SetTest.php index 5122b0781..fc537b5b3 100644 --- a/lib/Cake/Test/Case/Utility/SetTest.php +++ b/lib/Cake/Test/Case/Utility/SetTest.php @@ -29,7 +29,6 @@ class SetTest extends CakeTestCase { /** * testNumericKeyExtraction method * - * @access public * @return void */ public function testNumericKeyExtraction() { @@ -41,7 +40,6 @@ class SetTest extends CakeTestCase { /** * testEnum method * - * @access public * @return void */ public function testEnum() { @@ -82,7 +80,6 @@ class SetTest extends CakeTestCase { /** * testFilter method * - * @access public * @return void */ public function testFilter() { @@ -113,7 +110,6 @@ class SetTest extends CakeTestCase { /** * testNumericArrayCheck method * - * @access public * @return void */ public function testNumericArrayCheck() { @@ -151,7 +147,6 @@ class SetTest extends CakeTestCase { /** * testKeyCheck method * - * @access public * @return void */ public function testKeyCheck() { @@ -189,7 +184,6 @@ class SetTest extends CakeTestCase { /** * testMerge method * - * @access public * @return void */ public function testMerge() { @@ -274,7 +268,6 @@ class SetTest extends CakeTestCase { /** * testSort method * - * @access public * @return void */ public function testSort() { @@ -402,7 +395,6 @@ class SetTest extends CakeTestCase { /** * testExtract method * - * @access public * @return void */ public function testExtract() { @@ -1302,7 +1294,6 @@ class SetTest extends CakeTestCase { /** * testExtractWithArrays method * - * @access public * @return void */ public function testExtractWithArrays() { @@ -1367,7 +1358,6 @@ class SetTest extends CakeTestCase { /** * testMatches method * - * @access public * @return void */ public function testMatches() { @@ -1440,7 +1430,6 @@ class SetTest extends CakeTestCase { /** * testSetExtractReturnsEmptyArray method * - * @access public * @return void */ public function testSetExtractReturnsEmptyArray() { @@ -1461,7 +1450,6 @@ class SetTest extends CakeTestCase { /** * testClassicExtract method * - * @access public * @return void */ public function testClassicExtract() { @@ -1644,7 +1632,6 @@ class SetTest extends CakeTestCase { /** * testInsert method * - * @access public * @return void */ public function testInsert() { @@ -1688,7 +1675,6 @@ class SetTest extends CakeTestCase { /** * testRemove method * - * @access public * @return void */ public function testRemove() { @@ -1727,7 +1713,6 @@ class SetTest extends CakeTestCase { /** * testCheck method * - * @access public * @return void */ public function testCheck() { @@ -1750,7 +1735,6 @@ class SetTest extends CakeTestCase { /** * testWritingWithFunkyKeys method * - * @access public * @return void */ public function testWritingWithFunkyKeys() { @@ -1768,7 +1752,6 @@ class SetTest extends CakeTestCase { /** * testDiff method * - * @access public * @return void */ public function testDiff() { @@ -1852,7 +1835,6 @@ class SetTest extends CakeTestCase { /** * testContains method * - * @access public * @return void */ public function testContains() { @@ -1875,7 +1857,6 @@ class SetTest extends CakeTestCase { /** * testCombine method * - * @access public * @return void */ public function testCombine() { @@ -2011,7 +1992,6 @@ class SetTest extends CakeTestCase { /** * testMapReverse method * - * @access public * @return void */ public function testMapReverse() { @@ -2239,7 +2219,6 @@ class SetTest extends CakeTestCase { /** * testFormatting method * - * @access public * @return void */ public function testFormatting() { @@ -2287,7 +2266,6 @@ class SetTest extends CakeTestCase { /** * testCountDim method * - * @access public * @return void */ public function testCountDim() { @@ -2342,7 +2320,6 @@ class SetTest extends CakeTestCase { /** * testMapNesting method * - * @access public * @return void */ public function testMapNesting() { @@ -2467,7 +2444,6 @@ class SetTest extends CakeTestCase { /** * testNestedMappedData method * - * @access public * @return void */ public function testNestedMappedData() { @@ -2716,7 +2692,6 @@ class SetTest extends CakeTestCase { /** * testPushDiff method * - * @access public * @return void */ public function testPushDiff() { @@ -2762,7 +2737,6 @@ class SetTest extends CakeTestCase { /** * testSetApply method - * @access public * @return void * */ @@ -2813,7 +2787,6 @@ class SetTest extends CakeTestCase { /** * testXmlSetReverse method * - * @access public * @return void */ public function testXmlSetReverse() { @@ -3056,7 +3029,6 @@ class SetTest extends CakeTestCase { /** * testStrictKeyCheck method * - * @access public * @return void */ public function testStrictKeyCheck() { @@ -3067,7 +3039,6 @@ class SetTest extends CakeTestCase { /** * Tests Set::flatten * - * @access public * @return void */ public function testFlatten() { diff --git a/lib/Cake/Test/Case/Utility/StringTest.php b/lib/Cake/Test/Case/Utility/StringTest.php index ccea42824..f4b04f60a 100644 --- a/lib/Cake/Test/Case/Utility/StringTest.php +++ b/lib/Cake/Test/Case/Utility/StringTest.php @@ -28,7 +28,6 @@ class StringTest extends CakeTestCase { /** * testUuidGeneration method * - * @access public * @return void */ public function testUuidGeneration() { @@ -41,7 +40,6 @@ class StringTest extends CakeTestCase { /** * testMultipleUuidGeneration method * - * @access public * @return void */ public function testMultipleUuidGeneration() { @@ -61,7 +59,6 @@ class StringTest extends CakeTestCase { /** * testInsert method * - * @access public * @return void */ public function testInsert() { @@ -274,7 +271,6 @@ class StringTest extends CakeTestCase { /** * testTokenize method * - * @access public * @return void */ public function testTokenize() { diff --git a/lib/Cake/Test/Case/Utility/ValidationTest.php b/lib/Cake/Test/Case/Utility/ValidationTest.php index d4992313f..cf466155a 100644 --- a/lib/Cake/Test/Case/Utility/ValidationTest.php +++ b/lib/Cake/Test/Case/Utility/ValidationTest.php @@ -30,7 +30,6 @@ class CustomValidator { * * @param string $email * @return boolean - * @access public */ static function customValidate($check) { return (bool)preg_match('/^[0-9]{3}$/', $check); @@ -93,7 +92,6 @@ class ValidationTest extends CakeTestCase { /** * setup method * - * @access public * @return void */ public function setUp() { @@ -104,7 +102,6 @@ class ValidationTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -115,7 +112,6 @@ class ValidationTest extends CakeTestCase { /** * testNotEmpty method * - * @access public * @return void */ public function testNotEmpty() { @@ -134,7 +130,6 @@ class ValidationTest extends CakeTestCase { * testNotEmptyISO88591Encoding method * * @return void - * @access public */ public function testNotEmptyISO88591AppEncoding() { Configure::write('App.encoding', 'ISO-8859-1'); @@ -151,7 +146,6 @@ class ValidationTest extends CakeTestCase { /** * testAlphaNumeric method * - * @access public * @return void */ public function testAlphaNumeric() { @@ -177,7 +171,6 @@ class ValidationTest extends CakeTestCase { /** * testAlphaNumericPassedAsArray method * - * @access public * @return void */ public function testAlphaNumericPassedAsArray() { @@ -197,7 +190,6 @@ class ValidationTest extends CakeTestCase { /** * testBetween method * - * @access public * @return void */ public function testBetween() { @@ -212,7 +204,6 @@ class ValidationTest extends CakeTestCase { /** * testBlank method * - * @access public * @return void */ public function testBlank() { @@ -228,7 +219,6 @@ class ValidationTest extends CakeTestCase { /** * testBlankAsArray method * - * @access public * @return void */ public function testBlankAsArray() { @@ -244,7 +234,6 @@ class ValidationTest extends CakeTestCase { /** * testcc method * - * @access public * @return void */ public function testCc() { @@ -689,7 +678,6 @@ class ValidationTest extends CakeTestCase { /** * testLuhn method * - * @access public * @return void */ public function testLuhn() { @@ -744,7 +732,6 @@ class ValidationTest extends CakeTestCase { /** * testCustomRegexForCc method * - * @access public * @return void */ public function testCustomRegexForCc() { @@ -756,7 +743,6 @@ class ValidationTest extends CakeTestCase { /** * testCustomRegexForCcWithLuhnCheck method * - * @access public * @return void */ public function testCustomRegexForCcWithLuhnCheck() { @@ -769,7 +755,6 @@ class ValidationTest extends CakeTestCase { /** * testFastCc method * - * @access public * @return void */ public function testFastCc() { @@ -798,7 +783,6 @@ class ValidationTest extends CakeTestCase { /** * testAllCc method * - * @access public * @return void */ public function testAllCc() { @@ -849,7 +833,6 @@ class ValidationTest extends CakeTestCase { /** * testAllCcDeep method * - * @access public * @return void */ public function testAllCcDeep() { @@ -900,7 +883,6 @@ class ValidationTest extends CakeTestCase { /** * testComparison method * - * @access public * @return void */ public function testComparison() { @@ -938,7 +920,6 @@ class ValidationTest extends CakeTestCase { /** * testComparisonAsArray method * - * @access public * @return void */ public function testComparisonAsArray() { @@ -975,7 +956,6 @@ class ValidationTest extends CakeTestCase { /** * testCustom method * - * @access public * @return void */ public function testCustom() { @@ -988,7 +968,6 @@ class ValidationTest extends CakeTestCase { /** * testCustomAsArray method * - * @access public * @return void */ public function testCustomAsArray() { @@ -1000,7 +979,6 @@ class ValidationTest extends CakeTestCase { /** * testDateDdmmyyyy method * - * @access public * @return void */ public function testDateDdmmyyyy() { @@ -1021,7 +999,6 @@ class ValidationTest extends CakeTestCase { /** * testDateDdmmyyyyLeapYear method * - * @access public * @return void */ public function testDateDdmmyyyyLeapYear() { @@ -1038,7 +1015,6 @@ class ValidationTest extends CakeTestCase { /** * testDateDdmmyy method * - * @access public * @return void */ public function testDateDdmmyy() { @@ -1059,7 +1035,6 @@ class ValidationTest extends CakeTestCase { /** * testDateDdmmyyLeapYear method * - * @access public * @return void */ public function testDateDdmmyyLeapYear() { @@ -1076,7 +1051,6 @@ class ValidationTest extends CakeTestCase { /** * testDateDmyy method * - * @access public * @return void */ public function testDateDmyy() { @@ -1097,7 +1071,6 @@ class ValidationTest extends CakeTestCase { /** * testDateDmyyLeapYear method * - * @access public * @return void */ public function testDateDmyyLeapYear() { @@ -1114,7 +1087,6 @@ class ValidationTest extends CakeTestCase { /** * testDateDmyyyy method * - * @access public * @return void */ public function testDateDmyyyy() { @@ -1135,7 +1107,6 @@ class ValidationTest extends CakeTestCase { /** * testDateDmyyyyLeapYear method * - * @access public * @return void */ public function testDateDmyyyyLeapYear() { @@ -1152,7 +1123,6 @@ class ValidationTest extends CakeTestCase { /** * testDateMmddyyyy method * - * @access public * @return void */ public function testDateMmddyyyy() { @@ -1173,7 +1143,6 @@ class ValidationTest extends CakeTestCase { /** * testDateMmddyyyyLeapYear method * - * @access public * @return void */ public function testDateMmddyyyyLeapYear() { @@ -1190,7 +1159,6 @@ class ValidationTest extends CakeTestCase { /** * testDateMmddyy method * - * @access public * @return void */ public function testDateMmddyy() { @@ -1211,7 +1179,6 @@ class ValidationTest extends CakeTestCase { /** * testDateMmddyyLeapYear method * - * @access public * @return void */ public function testDateMmddyyLeapYear() { @@ -1228,7 +1195,6 @@ class ValidationTest extends CakeTestCase { /** * testDateMdyy method * - * @access public * @return void */ public function testDateMdyy() { @@ -1249,7 +1215,6 @@ class ValidationTest extends CakeTestCase { /** * testDateMdyyLeapYear method * - * @access public * @return void */ public function testDateMdyyLeapYear() { @@ -1266,7 +1231,6 @@ class ValidationTest extends CakeTestCase { /** * testDateMdyyyy method * - * @access public * @return void */ public function testDateMdyyyy() { @@ -1287,7 +1251,6 @@ class ValidationTest extends CakeTestCase { /** * testDateMdyyyyLeapYear method * - * @access public * @return void */ public function testDateMdyyyyLeapYear() { @@ -1304,7 +1267,6 @@ class ValidationTest extends CakeTestCase { /** * testDateYyyymmdd method * - * @access public * @return void */ public function testDateYyyymmdd() { @@ -1321,7 +1283,6 @@ class ValidationTest extends CakeTestCase { /** * testDateYyyymmddLeapYear method * - * @access public * @return void */ public function testDateYyyymmddLeapYear() { @@ -1338,7 +1299,6 @@ class ValidationTest extends CakeTestCase { /** * testDateYymmdd method * - * @access public * @return void */ public function testDateYymmdd() { @@ -1359,7 +1319,6 @@ class ValidationTest extends CakeTestCase { /** * testDateYymmddLeapYear method * - * @access public * @return void */ public function testDateYymmddLeapYear() { @@ -1376,7 +1335,6 @@ class ValidationTest extends CakeTestCase { /** * testDateDdMMMMyyyy method * - * @access public * @return void */ public function testDateDdMMMMyyyy() { @@ -1389,7 +1347,6 @@ class ValidationTest extends CakeTestCase { /** * testDateDdMMMMyyyyLeapYear method * - * @access public * @return void */ public function testDateDdMMMMyyyyLeapYear() { @@ -1400,7 +1357,6 @@ class ValidationTest extends CakeTestCase { /** * testDateMmmmDdyyyy method * - * @access public * @return void */ public function testDateMmmmDdyyyy() { @@ -1415,7 +1371,6 @@ class ValidationTest extends CakeTestCase { /** * testDateMmmmDdyyyyLeapYear method * - * @access public * @return void */ public function testDateMmmmDdyyyyLeapYear() { @@ -1429,7 +1384,6 @@ class ValidationTest extends CakeTestCase { /** * testDateMy method * - * @access public * @return void */ public function testDateMy() { @@ -1442,7 +1396,6 @@ class ValidationTest extends CakeTestCase { /** * testDateMyNumeric method * - * @access public * @return void */ public function testDateMyNumeric() { @@ -1459,7 +1412,6 @@ class ValidationTest extends CakeTestCase { /** * testTime method * - * @access public * @return void */ public function testTime() { @@ -1481,7 +1433,6 @@ class ValidationTest extends CakeTestCase { /** * testBoolean method * - * @access public * @return void */ public function testBoolean() { @@ -1501,7 +1452,6 @@ class ValidationTest extends CakeTestCase { /** * testDateCustomRegx method * - * @access public * @return void */ public function testDateCustomRegx() { @@ -1512,7 +1462,6 @@ class ValidationTest extends CakeTestCase { /** * testDecimal method * - * @access public * @return void */ public function testDecimal() { @@ -1531,7 +1480,6 @@ class ValidationTest extends CakeTestCase { /** * testDecimalWithPlaces method * - * @access public * @return void */ public function testDecimalWithPlaces() { @@ -1556,7 +1504,6 @@ class ValidationTest extends CakeTestCase { /** * testDecimalCustomRegex method * - * @access public * @return void */ public function testDecimalCustomRegex() { @@ -1567,7 +1514,6 @@ class ValidationTest extends CakeTestCase { /** * testEmail method * - * @access public * @return void */ public function testEmail() { @@ -1643,7 +1589,6 @@ class ValidationTest extends CakeTestCase { /** * testEmailDeep method * - * @access public * @return void */ public function testEmailDeep() { @@ -1657,7 +1602,6 @@ class ValidationTest extends CakeTestCase { /** * testEmailCustomRegex method * - * @access public * @return void */ public function testEmailCustomRegex() { @@ -1668,7 +1612,6 @@ class ValidationTest extends CakeTestCase { /** * testEqualTo method * - * @access public * @return void */ public function testEqualTo() { @@ -1683,7 +1626,6 @@ class ValidationTest extends CakeTestCase { /** * testIpV4 method * - * @access public * @return void */ public function testIpV4() { @@ -1698,7 +1640,6 @@ class ValidationTest extends CakeTestCase { /** * testIp v6 * - * @access public * @return void */ public function testIpv6() { @@ -1738,7 +1679,6 @@ class ValidationTest extends CakeTestCase { /** * testMaxLength method * - * @access public * @return void */ public function testMaxLength() { @@ -1753,7 +1693,6 @@ class ValidationTest extends CakeTestCase { /** * testMinLength method * - * @access public * @return void */ public function testMinLength() { @@ -1768,7 +1707,6 @@ class ValidationTest extends CakeTestCase { /** * testUrl method * - * @access public * @return void */ public function testUrl() { @@ -1847,7 +1785,6 @@ class ValidationTest extends CakeTestCase { /** * testInList method * - * @access public * @return void */ public function testInList() { @@ -1859,7 +1796,6 @@ class ValidationTest extends CakeTestCase { /** * testRange method * - * @access public * @return void */ public function testRange() { @@ -1875,7 +1811,6 @@ class ValidationTest extends CakeTestCase { /** * testExtension method * - * @access public * @return void */ public function testExtension() { @@ -1905,7 +1840,6 @@ class ValidationTest extends CakeTestCase { /** * testMoney method * - * @access public * @return void */ public function testMoney() { @@ -1938,7 +1872,6 @@ class ValidationTest extends CakeTestCase { /** * Test Multiple Select Validation * - * @access public * @return void */ public function testMultiple() { @@ -1978,7 +1911,6 @@ class ValidationTest extends CakeTestCase { /** * testNumeric method * - * @access public * @return void */ public function testNumeric() { @@ -1995,7 +1927,6 @@ class ValidationTest extends CakeTestCase { /** * testPhone method * - * @access public * @return void */ public function testPhone() { @@ -2027,7 +1958,6 @@ class ValidationTest extends CakeTestCase { /** * testPostal method * - * @access public * @return void */ public function testPostal() { @@ -2120,7 +2050,6 @@ class ValidationTest extends CakeTestCase { /** * testSsn method * - * @access public * @return void */ public function testSsn() { @@ -2142,7 +2071,6 @@ class ValidationTest extends CakeTestCase { /** * testUserDefined method * - * @access public * @return void */ public function testUserDefined() { @@ -2155,7 +2083,6 @@ class ValidationTest extends CakeTestCase { /** * testDatetime method * - * @access public * @return void */ function testDatetime() { diff --git a/lib/Cake/Test/Case/Utility/XmlTest.php b/lib/Cake/Test/Case/Utility/XmlTest.php index f13f8f530..e693975c6 100644 --- a/lib/Cake/Test/Case/Utility/XmlTest.php +++ b/lib/Cake/Test/Case/Utility/XmlTest.php @@ -93,7 +93,6 @@ class XmlTest extends CakeTestCase { /** * setup method * - * @access public * @return void */ public function setUp() { @@ -105,7 +104,6 @@ class XmlTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { diff --git a/lib/Cake/Test/Case/View/Helper/CacheHelperTest.php b/lib/Cake/Test/Case/View/Helper/CacheHelperTest.php index dff1ffc92..07721d9db 100644 --- a/lib/Cake/Test/Case/View/Helper/CacheHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/CacheHelperTest.php @@ -33,14 +33,12 @@ class CacheTestController extends Controller { * helpers property * * @var array - * @access public */ public $helpers = array('Html', 'Cache'); /** * cache_parsing method * - * @access public * @return void */ public function cache_parsing() { @@ -71,7 +69,6 @@ class CacheHelperTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -91,7 +88,6 @@ class CacheHelperTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -103,7 +99,6 @@ class CacheHelperTest extends CakeTestCase { /** * test cache parsing with no cake:nocache tags in view file. * - * @access public * @return void */ public function testLayoutCacheParsingNoTagsInView() { @@ -138,7 +133,6 @@ class CacheHelperTest extends CakeTestCase { /** * test cache parsing with non-latin characters in current route * - * @access public * @return void */ public function testCacheNonLatinCharactersInRoute() { @@ -165,7 +159,6 @@ class CacheHelperTest extends CakeTestCase { /** * Test cache parsing with cake:nocache tags in view file. * - * @access public * @return void */ public function testLayoutCacheParsingWithTagsInView() { @@ -294,7 +287,6 @@ class CacheHelperTest extends CakeTestCase { /** * test cache of view vars * - * @access public * @return void */ public function testCacheViewVars() { diff --git a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php index 854200c51..9a968eaf6 100644 --- a/lib/Cake/Test/Case/View/Helper/FormHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/FormHelperTest.php @@ -38,7 +38,6 @@ class ContactTestController extends Controller { * name property * * @var string 'ContactTest' - * @access public */ public $name = 'ContactTest'; @@ -46,7 +45,6 @@ class ContactTestController extends Controller { * uses property * * @var mixed null - * @access public */ public $uses = null; } @@ -63,7 +61,6 @@ class Contact extends CakeTestModel { * primaryKey property * * @var string 'id' - * @access public */ public $primaryKey = 'id'; @@ -71,7 +68,6 @@ class Contact extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -79,7 +75,6 @@ class Contact extends CakeTestModel { * name property * * @var string 'Contact' - * @access public */ public $name = 'Contact'; @@ -87,7 +82,6 @@ class Contact extends CakeTestModel { * Default schema * * @var array - * @access public */ protected $_schema = array( 'id' => array('type' => 'integer', 'null' => '', 'default' => '', 'length' => '8'), @@ -105,7 +99,6 @@ class Contact extends CakeTestModel { * validate property * * @var array - * @access public */ public $validate = array( 'non_existing' => array(), @@ -125,7 +118,6 @@ class Contact extends CakeTestModel { /** * schema method * - * @access public * @return void */ public function setSchema($schema) { @@ -136,7 +128,6 @@ class Contact extends CakeTestModel { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('ContactTag' => array('with' => 'ContactTagsContact')); @@ -144,7 +135,6 @@ class Contact extends CakeTestModel { * hasAndBelongsToMany property * * @var array - * @access public */ public $belongsTo = array('User' => array('className' => 'UserForm')); } @@ -161,7 +151,6 @@ class ContactTagsContact extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -169,7 +158,6 @@ class ContactTagsContact extends CakeTestModel { * name property * * @var string 'Contact' - * @access public */ public $name = 'ContactTagsContact'; @@ -177,7 +165,6 @@ class ContactTagsContact extends CakeTestModel { * Default schema * * @var array - * @access public */ protected $_schema = array( 'contact_id' => array('type' => 'integer', 'null' => '', 'default' => '', 'length' => '8'), @@ -189,7 +176,6 @@ class ContactTagsContact extends CakeTestModel { /** * schema method * - * @access public * @return void */ public function setSchema($schema) { @@ -209,7 +195,6 @@ class ContactNonStandardPk extends Contact { * primaryKey property * * @var string 'pk' - * @access public */ public $primaryKey = 'pk'; @@ -217,14 +202,12 @@ class ContactNonStandardPk extends Contact { * name property * * @var string 'ContactNonStandardPk' - * @access public */ public $name = 'ContactNonStandardPk'; /** * schema method * - * @access public * @return void */ public function schema($field = false) { @@ -247,7 +230,6 @@ class ContactTag extends Model { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -255,7 +237,6 @@ class ContactTag extends Model { * schema definition * * @var array - * @access protected */ protected $_schema = array( 'id' => array('type' => 'integer', 'null' => false, 'default' => '', 'length' => '8'), @@ -277,7 +258,6 @@ class UserForm extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -285,7 +265,6 @@ class UserForm extends CakeTestModel { * primaryKey property * * @var string 'id' - * @access public */ public $primaryKey = 'id'; @@ -293,7 +272,6 @@ class UserForm extends CakeTestModel { * name property * * @var string 'UserForm' - * @access public */ public $name = 'UserForm'; @@ -301,7 +279,6 @@ class UserForm extends CakeTestModel { * hasMany property * * @var array - * @access public */ public $hasMany = array( 'OpenidUrl' => array('className' => 'OpenidUrl', 'foreignKey' => 'user_form_id' @@ -311,7 +288,6 @@ class UserForm extends CakeTestModel { * schema definition * * @var array - * @access protected */ protected $_schema = array( 'id' => array('type' => 'integer', 'null' => '', 'default' => '', 'length' => '8'), @@ -337,7 +313,6 @@ class OpenidUrl extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -345,7 +320,6 @@ class OpenidUrl extends CakeTestModel { * primaryKey property * * @var string 'id' - * @access public */ public $primaryKey = 'id'; @@ -353,7 +327,6 @@ class OpenidUrl extends CakeTestModel { * name property * * @var string 'OpenidUrl' - * @access public */ public $name = 'OpenidUrl'; @@ -361,7 +334,6 @@ class OpenidUrl extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('UserForm' => array( 'className' => 'UserForm', 'foreignKey' => 'user_form_id' @@ -371,7 +343,6 @@ class OpenidUrl extends CakeTestModel { * validate property * * @var array - * @access public */ public $validate = array('openid_not_registered' => array()); @@ -379,7 +350,6 @@ class OpenidUrl extends CakeTestModel { * schema method * * @var array - * @access protected */ protected $_schema = array( 'id' => array('type' => 'integer', 'null' => '', 'default' => '', 'length' => '8'), @@ -392,7 +362,6 @@ class OpenidUrl extends CakeTestModel { /** * beforeValidate method * - * @access public * @return void */ public function beforeValidate($options = array()) { @@ -413,7 +382,6 @@ class ValidateUser extends CakeTestModel { * primaryKey property * * @var string 'id' - * @access public */ public $primaryKey = 'id'; @@ -421,7 +389,6 @@ class ValidateUser extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -429,7 +396,6 @@ class ValidateUser extends CakeTestModel { * name property * * @var string 'ValidateUser' - * @access public */ public $name = 'ValidateUser'; @@ -437,7 +403,6 @@ class ValidateUser extends CakeTestModel { * hasOne property * * @var array - * @access public */ public $hasOne = array('ValidateProfile' => array( 'className' => 'ValidateProfile', 'foreignKey' => 'user_id' @@ -447,7 +412,6 @@ class ValidateUser extends CakeTestModel { * schema method * * @var array - * @access protected */ protected $_schema = array( 'id' => array('type' => 'integer', 'null' => '', 'default' => '', 'length' => '8'), @@ -461,7 +425,6 @@ class ValidateUser extends CakeTestModel { /** * beforeValidate method * - * @access public * @return void */ public function beforeValidate($options = array()) { @@ -482,7 +445,6 @@ class ValidateProfile extends CakeTestModel { * primaryKey property * * @var string 'id' - * @access public */ public $primaryKey = 'id'; @@ -490,7 +452,6 @@ class ValidateProfile extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -498,7 +459,6 @@ class ValidateProfile extends CakeTestModel { * schema property * * @var array - * @access protected */ protected $_schema = array( 'id' => array('type' => 'integer', 'null' => '', 'default' => '', 'length' => '8'), @@ -513,7 +473,6 @@ class ValidateProfile extends CakeTestModel { * name property * * @var string 'ValidateProfile' - * @access public */ public $name = 'ValidateProfile'; @@ -521,7 +480,6 @@ class ValidateProfile extends CakeTestModel { * hasOne property * * @var array - * @access public */ public $hasOne = array('ValidateItem' => array( 'className' => 'ValidateItem', 'foreignKey' => 'profile_id' @@ -531,7 +489,6 @@ class ValidateProfile extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('ValidateUser' => array( 'className' => 'ValidateUser', 'foreignKey' => 'user_id' @@ -540,7 +497,6 @@ class ValidateProfile extends CakeTestModel { /** * beforeValidate method * - * @access public * @return void */ public function beforeValidate($options = array()) { @@ -562,7 +518,6 @@ class ValidateItem extends CakeTestModel { * primaryKey property * * @var string 'id' - * @access public */ public $primaryKey = 'id'; @@ -570,7 +525,6 @@ class ValidateItem extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -578,7 +532,6 @@ class ValidateItem extends CakeTestModel { * name property * * @var string 'ValidateItem' - * @access public */ public $name = 'ValidateItem'; @@ -586,7 +539,6 @@ class ValidateItem extends CakeTestModel { * schema property * * @var array - * @access protected */ protected $_schema = array( 'id' => array('type' => 'integer', 'null' => '', 'default' => '', 'length' => '8'), @@ -603,14 +555,12 @@ class ValidateItem extends CakeTestModel { * belongsTo property * * @var array - * @access public */ public $belongsTo = array('ValidateProfile' => array('foreignKey' => 'profile_id')); /** * beforeValidate method * - * @access public * @return void */ public function beforeValidate($options = array()) { @@ -631,7 +581,6 @@ class TestMail extends CakeTestModel { * primaryKey property * * @var string 'id' - * @access public */ public $primaryKey = 'id'; @@ -639,7 +588,6 @@ class TestMail extends CakeTestModel { * useTable property * * @var bool false - * @access public */ public $useTable = false; @@ -647,7 +595,6 @@ class TestMail extends CakeTestModel { * name property * * @var string 'TestMail' - * @access public */ public $name = 'TestMail'; } @@ -677,7 +624,6 @@ class FormHelperTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -720,7 +666,6 @@ class FormHelperTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -736,7 +681,6 @@ class FormHelperTest extends CakeTestCase { * * Test form->create() with security key. * - * @access public * @return void */ public function testCreateWithSecurity() { @@ -773,7 +717,6 @@ class FormHelperTest extends CakeTestCase { /** * Tests form hash generation with model-less data * - * @access public * @return void */ public function testValidateHashNoModel() { @@ -785,7 +728,6 @@ class FormHelperTest extends CakeTestCase { /** * Tests that models with identical field names get resolved properly * - * @access public * @return void */ public function testDuplicateFieldNameResolution() { @@ -814,7 +756,6 @@ class FormHelperTest extends CakeTestCase { /** * Tests that hidden fields generated for checkboxes don't get locked * - * @access public * @return void */ public function testNoCheckboxLocking() { @@ -830,7 +771,6 @@ class FormHelperTest extends CakeTestCase { * * Test generation of secure form hash generation. * - * @access public * @return void */ public function testFormSecurityFields() { @@ -861,7 +801,6 @@ class FormHelperTest extends CakeTestCase { /** * Tests correct generation of number fields for double and float fields * - * @access public * @return void */ public function testTextFieldGenerationForFloats() { @@ -943,7 +882,6 @@ class FormHelperTest extends CakeTestCase { * * Test secure() with multiple row form. Ensure hash is correct. * - * @access public * @return void */ public function testFormSecurityMultipleFields() { @@ -1026,7 +964,6 @@ class FormHelperTest extends CakeTestCase { * * Test secure form creation with multiple row creation. Checks hidden, text, checkbox field types * - * @access public * @return void */ public function testFormSecurityMultipleInputFields() { @@ -1077,7 +1014,6 @@ class FormHelperTest extends CakeTestCase { * * test secure form generation with multiple records and disabled fields. * - * @access public * @return void */ public function testFormSecurityMultipleInputDisabledFields() { @@ -1126,7 +1062,6 @@ class FormHelperTest extends CakeTestCase { * * Test single record form with disabled fields. * - * @access public * @return void */ public function testFormSecurityInputUnlockedFields() { @@ -1191,7 +1126,6 @@ class FormHelperTest extends CakeTestCase { * * Test generation of entire secure form, assertions made on input() output. * - * @access public * @return void */ public function testFormSecuredInput() { @@ -1299,7 +1233,6 @@ class FormHelperTest extends CakeTestCase { /** * Tests that the correct keys are added to the field hash index * - * @access public * @return void */ public function testFormSecuredFileInput() { @@ -1317,7 +1250,6 @@ class FormHelperTest extends CakeTestCase { /** * test that multiple selects keys are added to field hash * - * @access public * @return void */ public function testFormSecuredMultipleSelect() { @@ -1337,7 +1269,6 @@ class FormHelperTest extends CakeTestCase { /** * testFormSecuredRadio method * - * @access public * @return void */ public function testFormSecuredRadio() { @@ -1353,7 +1284,6 @@ class FormHelperTest extends CakeTestCase { /** * testDisableSecurityUsingForm method * - * @access public * @return void */ public function testDisableSecurityUsingForm() { @@ -1452,7 +1382,6 @@ class FormHelperTest extends CakeTestCase { * * test display of form errors in conjunction with model::validates. * - * @access public * @return void */ public function testFormValidationAssociated() { @@ -1494,7 +1423,6 @@ class FormHelperTest extends CakeTestCase { * * test form error display with associated model. * - * @access public * @return void */ public function testFormValidationAssociatedFirstLevel() { @@ -1545,7 +1473,6 @@ class FormHelperTest extends CakeTestCase { * * test form error display with associated model. * - * @access public * @return void */ public function testFormValidationAssociatedSecondLevel() { @@ -1604,7 +1531,6 @@ class FormHelperTest extends CakeTestCase { * * test form error display with multiple records. * - * @access public * @return void */ public function testFormValidationMultiRecord() { @@ -1635,7 +1561,6 @@ class FormHelperTest extends CakeTestCase { * * test multiple record form validation error display. * - * @access public * @return void */ public function testMultipleInputValidation() { @@ -1713,7 +1638,6 @@ class FormHelperTest extends CakeTestCase { * * Test various incarnations of input(). * - * @access public * @return void */ public function testInput() { @@ -2472,7 +2396,6 @@ class FormHelperTest extends CakeTestCase { * * test correct results from form::inputs(). * - * @access public * @return void */ public function testFormInputs() { @@ -2678,7 +2601,6 @@ class FormHelperTest extends CakeTestCase { * * test multi-select widget with checkbox formatting. * - * @access public * @return void */ public function testSelectAsCheckbox() { @@ -2724,7 +2646,6 @@ class FormHelperTest extends CakeTestCase { * * test label generation. * - * @access public * @return void */ public function testLabel() { @@ -2760,7 +2681,6 @@ class FormHelperTest extends CakeTestCase { * * test textbox element generation * - * @access public * @return void */ public function testTextbox() { @@ -2796,7 +2716,6 @@ class FormHelperTest extends CakeTestCase { * * Test default value setting * - * @access public * @return void */ public function testDefaultValue() { @@ -2814,7 +2733,6 @@ class FormHelperTest extends CakeTestCase { * * Test default value setting on checkbox() method * - * @access public * @return void */ public function testCheckboxDefaultValue() { @@ -2840,7 +2758,6 @@ class FormHelperTest extends CakeTestCase { * * Test field error generation * - * @access public * @return void */ public function testError() { @@ -2962,7 +2879,6 @@ class FormHelperTest extends CakeTestCase { * * Test password element generation * - * @access public * @return void */ public function testPassword() { @@ -2981,7 +2897,6 @@ class FormHelperTest extends CakeTestCase { * * Test radio element set generation * - * @access public * @return void */ public function testRadio() { @@ -3340,7 +3255,6 @@ class FormHelperTest extends CakeTestCase { * * Test select element generation. * - * @access public * @return void */ public function testSelect() { @@ -3480,7 +3394,6 @@ class FormHelperTest extends CakeTestCase { /** * Tests that FormHelper::select() allows null to be passed in the $attributes parameter * - * @access public * @return void */ public function testSelectWithNullAttributes() { @@ -3503,7 +3416,6 @@ class FormHelperTest extends CakeTestCase { * * test select element generation with optgroups * - * @access public * @return void */ public function testNestedSelect() { @@ -3566,7 +3478,6 @@ class FormHelperTest extends CakeTestCase { * * test generation of multiple select elements * - * @access public * @return void */ public function testSelectMultiple() { @@ -3715,7 +3626,6 @@ class FormHelperTest extends CakeTestCase { /** * test generation of multi select elements in checkbox format * - * @access public * @return void */ public function testSelectMultipleCheckboxes() { @@ -3931,7 +3841,6 @@ class FormHelperTest extends CakeTestCase { /** * Checks the security hash array generated for multiple-input checkbox elements * - * @access public * @return void */ public function testSelectMultipleCheckboxSecurity() { @@ -3954,7 +3863,6 @@ class FormHelperTest extends CakeTestCase { * * test input() resulting in multi select elements being generated. * - * @access public * @return void */ public function testInputMultipleCheckboxes() { @@ -4061,7 +3969,6 @@ class FormHelperTest extends CakeTestCase { * * test that select() with 'hiddenField' => false omits the hidden field * - * @access public * @return void */ public function testSelectHiddenFieldOmission() { @@ -4192,7 +4099,6 @@ class FormHelperTest extends CakeTestCase { * * Test generation of checkboxes * - * @access public * @return void */ public function testCheckbox() { @@ -4382,7 +4288,6 @@ class FormHelperTest extends CakeTestCase { * * Test generation of date/time select elements * - * @access public * @return void */ public function testDateTime() { @@ -4921,7 +4826,6 @@ class FormHelperTest extends CakeTestCase { * * test multiple datetime element generation * - * @access public * @return void */ public function testFormDateTimeMulti() { @@ -5009,7 +4913,6 @@ class FormHelperTest extends CakeTestCase { /** * testMonth method * - * @access public * @return void */ public function testMonth() { @@ -5080,7 +4983,6 @@ class FormHelperTest extends CakeTestCase { /** * testDay method * - * @access public * @return void */ public function testDay() { @@ -5169,7 +5071,6 @@ class FormHelperTest extends CakeTestCase { /** * testMinute method * - * @access public * @return void */ public function testMinute() { @@ -5262,7 +5163,6 @@ class FormHelperTest extends CakeTestCase { /** * testHour method * - * @access public * @return void */ public function testHour() { @@ -5357,7 +5257,6 @@ class FormHelperTest extends CakeTestCase { /** * testYear method * - * @access public * @return void */ public function testYear() { @@ -5537,7 +5436,6 @@ class FormHelperTest extends CakeTestCase { /** * testTextArea method * - * @access public * @return void */ public function testTextArea() { @@ -5589,7 +5487,6 @@ class FormHelperTest extends CakeTestCase { * * test text area with non-ascii characters * - * @access public * @return void */ public function testTextAreaWithStupidCharacters() { @@ -5613,7 +5510,6 @@ class FormHelperTest extends CakeTestCase { /** * testHiddenField method * - * @access public * @return void */ public function testHiddenField() { @@ -5629,7 +5525,6 @@ class FormHelperTest extends CakeTestCase { /** * testFileUploadField method * - * @access public * @return void */ public function testFileUploadField() { @@ -5666,7 +5561,6 @@ class FormHelperTest extends CakeTestCase { /** * testButton method * - * @access public * @return void */ public function testButton() { @@ -5818,7 +5712,6 @@ class FormHelperTest extends CakeTestCase { /** * testSubmitButton method * - * @access public * @return void */ public function testSubmitButton() { @@ -6010,7 +5903,6 @@ class FormHelperTest extends CakeTestCase { /** * test the create() method * - * @access public * @return void */ public function testCreate() { @@ -6397,7 +6289,6 @@ class FormHelperTest extends CakeTestCase { /** * test creating a get form, and get form inputs. * - * @access public * @return void */ public function testGetFormCreate() { @@ -6470,7 +6361,6 @@ class FormHelperTest extends CakeTestCase { * * test auto populating form elements from submitted data. * - * @access public * @return void */ public function testEditFormWithData() { @@ -6505,7 +6395,6 @@ class FormHelperTest extends CakeTestCase { /** * testFormMagicInput method * - * @access public * @return void */ public function testFormMagicInput() { @@ -6789,7 +6678,6 @@ class FormHelperTest extends CakeTestCase { /** * testForMagicInputNonExistingNorValidated method * - * @access public * @return void */ public function testForMagicInputNonExistingNorValidated() { @@ -6851,7 +6739,6 @@ class FormHelperTest extends CakeTestCase { /** * testFormMagicInputLabel method * - * @access public * @return void */ public function testFormMagicInputLabel() { @@ -6974,7 +6861,6 @@ class FormHelperTest extends CakeTestCase { /** * testFormEnd method * - * @access public * @return void */ public function testFormEnd() { @@ -7058,7 +6944,6 @@ class FormHelperTest extends CakeTestCase { /** * testMultipleFormWithIdFields method * - * @access public * @return void */ public function testMultipleFormWithIdFields() { @@ -7085,7 +6970,6 @@ class FormHelperTest extends CakeTestCase { /** * testDbLessModel method * - * @access public * @return void */ public function testDbLessModel() { @@ -7125,7 +7009,6 @@ class FormHelperTest extends CakeTestCase { /** * testBrokenness method * - * @access public * @return void */ public function testBrokenness() { diff --git a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php index d7b3231d9..5d04b7a70 100644 --- a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php @@ -40,7 +40,6 @@ class TheHtmlTestController extends Controller { * name property * * @var string 'TheTest' - * @access public */ public $name = 'TheTest'; @@ -48,7 +47,6 @@ class TheHtmlTestController extends Controller { * uses property * * @var mixed null - * @access public */ public $uses = null; } @@ -136,7 +134,6 @@ class HtmlHelperTest extends CakeTestCase { * html property * * @var object - * @access public */ public $Html = null; @@ -168,7 +165,6 @@ class HtmlHelperTest extends CakeTestCase { /** * testDocType method * - * @access public * @return void */ public function testDocType() { @@ -186,7 +182,6 @@ class HtmlHelperTest extends CakeTestCase { /** * testLink method * - * @access public * @return void */ public function testLink() { @@ -320,7 +315,6 @@ class HtmlHelperTest extends CakeTestCase { /** * testImageTag method * - * @access public * @return void */ public function testImageTag() { @@ -368,7 +362,6 @@ class HtmlHelperTest extends CakeTestCase { /** * Tests creation of an image tag using a theme and asset timestamping * - * @access public * @return void */ public function testImageTagWithTheme() { @@ -410,7 +403,6 @@ class HtmlHelperTest extends CakeTestCase { /** * test theme assets in main webroot path * - * @access public * @return void */ public function testThemeAssetsInMainWebrootPath() { @@ -440,7 +432,6 @@ class HtmlHelperTest extends CakeTestCase { /** * testStyle method * - * @access public * @return void */ public function testStyle() { @@ -457,7 +448,6 @@ class HtmlHelperTest extends CakeTestCase { /** * testCssLink method * - * @access public * @return void */ public function testCssLink() { @@ -775,7 +765,6 @@ class HtmlHelperTest extends CakeTestCase { /** * testCharsetTag method * - * @access public * @return void */ public function testCharsetTag() { @@ -794,7 +783,6 @@ class HtmlHelperTest extends CakeTestCase { /** * testBreadcrumb method * - * @access public * @return void */ public function testBreadcrumb() { @@ -864,7 +852,6 @@ class HtmlHelperTest extends CakeTestCase { /** * testNestedList method * - * @access public * @return void */ public function testNestedList() { @@ -1132,7 +1119,6 @@ class HtmlHelperTest extends CakeTestCase { /** * testMeta method * - * @access public * @return void */ public function testMeta() { @@ -1193,7 +1179,6 @@ class HtmlHelperTest extends CakeTestCase { /** * testTableHeaders method * - * @access public * @return void */ public function testTableHeaders() { @@ -1205,7 +1190,6 @@ class HtmlHelperTest extends CakeTestCase { /** * testTableCells method * - * @access public * @return void */ public function testTableCells() { @@ -1279,7 +1263,6 @@ class HtmlHelperTest extends CakeTestCase { /** * testTag method * - * @access public * @return void */ public function testTag() { @@ -1315,7 +1298,6 @@ class HtmlHelperTest extends CakeTestCase { /** * testDiv method * - * @access public * @return void */ public function testDiv() { @@ -1332,7 +1314,6 @@ class HtmlHelperTest extends CakeTestCase { /** * testPara method * - * @access public * @return void */ public function testPara() { @@ -1349,7 +1330,6 @@ class HtmlHelperTest extends CakeTestCase { /** * testCrumbList method * - * @access public * * @return void */ diff --git a/lib/Cake/Test/Case/View/Helper/JsHelperTest.php b/lib/Cake/Test/Case/View/Helper/JsHelperTest.php index ef7b95e09..131661284 100644 --- a/lib/Cake/Test/Case/View/Helper/JsHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/JsHelperTest.php @@ -94,7 +94,6 @@ class JsHelperTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -118,7 +117,6 @@ class JsHelperTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { diff --git a/lib/Cake/Test/Case/View/Helper/NumberHelperTest.php b/lib/Cake/Test/Case/View/Helper/NumberHelperTest.php index 401e6965c..501fd2eba 100644 --- a/lib/Cake/Test/Case/View/Helper/NumberHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/NumberHelperTest.php @@ -48,7 +48,6 @@ class NumberHelperTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -59,7 +58,6 @@ class NumberHelperTest extends CakeTestCase { /** * testFormatAndCurrency method * - * @access public * @return void */ public function testFormat() { @@ -85,7 +83,6 @@ class NumberHelperTest extends CakeTestCase { /** * Test currency method. * - * @access public * @return void */ public function testCurrency() { @@ -171,7 +168,6 @@ class NumberHelperTest extends CakeTestCase { /** * Test adding currency format options to the number helper * - * @access public * @return void */ public function testCurrencyAddFormat() { @@ -193,7 +189,6 @@ class NumberHelperTest extends CakeTestCase { /** * testCurrencyPositive method * - * @access public * @return void */ public function testCurrencyPositive() { @@ -227,7 +222,6 @@ class NumberHelperTest extends CakeTestCase { /** * testCurrencyNegative method * - * @access public * @return void */ public function testCurrencyNegative() { @@ -262,7 +256,6 @@ class NumberHelperTest extends CakeTestCase { /** * testCurrencyCentsPositive method * - * @access public * @return void */ public function testCurrencyCentsPositive() { @@ -284,7 +277,6 @@ class NumberHelperTest extends CakeTestCase { /** * testCurrencyCentsNegative method * - * @access public * @return void */ public function testCurrencyCentsNegative() { @@ -318,7 +310,6 @@ class NumberHelperTest extends CakeTestCase { /** * testCurrencyZero method * - * @access public * @return void */ public function testCurrencyZero() { @@ -344,7 +335,6 @@ class NumberHelperTest extends CakeTestCase { /** * testCurrencyOptions method * - * @access public * @return void */ public function testCurrencyOptions() { @@ -390,7 +380,6 @@ class NumberHelperTest extends CakeTestCase { /** * testToReadableSize method * - * @access public * @return void */ public function testToReadableSize() { @@ -454,7 +443,6 @@ class NumberHelperTest extends CakeTestCase { /** * testToPercentage method * - * @access public * @return void */ public function testToPercentage() { diff --git a/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php b/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php index e0cf1614d..b5008740c 100644 --- a/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php @@ -36,7 +36,6 @@ class PaginatorHelperTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -71,7 +70,6 @@ class PaginatorHelperTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -81,7 +79,6 @@ class PaginatorHelperTest extends CakeTestCase { /** * testHasPrevious method * - * @access public * @return void */ public function testHasPrevious() { @@ -94,7 +91,6 @@ class PaginatorHelperTest extends CakeTestCase { /** * testHasNext method * - * @access public * @return void */ public function testHasNext() { @@ -107,7 +103,6 @@ class PaginatorHelperTest extends CakeTestCase { /** * testDisabledLink method * - * @access public * @return void */ public function testDisabledLink() { @@ -128,7 +123,6 @@ class PaginatorHelperTest extends CakeTestCase { /** * testSortLinks method * - * @access public * @return void */ public function testSortLinks() { @@ -283,7 +277,6 @@ class PaginatorHelperTest extends CakeTestCase { /** * testSortLinksUsingDirectionOption method * - * @access public * @return void */ public function testSortLinksUsingDirectionOption(){ @@ -316,7 +309,6 @@ class PaginatorHelperTest extends CakeTestCase { /** * testSortLinksUsingDotNotation method * - * @access public * @return void */ public function testSortLinksUsingDotNotation() { @@ -359,7 +351,6 @@ class PaginatorHelperTest extends CakeTestCase { /** * testSortKey method * - * @access public * @return void */ public function testSortKey() { @@ -378,7 +369,6 @@ class PaginatorHelperTest extends CakeTestCase { /** * testSortDir method * - * @access public * @return void */ public function testSortDir() { @@ -448,7 +438,6 @@ class PaginatorHelperTest extends CakeTestCase { /** * testSortAdminLinks method * - * @access public * @return void */ public function testSortAdminLinks() { @@ -499,7 +488,6 @@ class PaginatorHelperTest extends CakeTestCase { /** * testUrlGeneration method * - * @access public * @return void */ public function testUrlGeneration() { @@ -531,7 +519,6 @@ class PaginatorHelperTest extends CakeTestCase { /** * test URL generation with prefix routes * - * @access public * @return void */ public function testUrlGenerationWithPrefixes() { @@ -600,7 +587,6 @@ class PaginatorHelperTest extends CakeTestCase { /** * testOptions method * - * @access public * @return void */ public function testOptions() { @@ -648,7 +634,6 @@ class PaginatorHelperTest extends CakeTestCase { /** * testPassedArgsMergingWithUrlOptions method * - * @access public * @return void */ public function testPassedArgsMergingWithUrlOptions() { @@ -715,7 +700,6 @@ class PaginatorHelperTest extends CakeTestCase { /** * testPagingLinks method * - * @access public * @return void */ public function testPagingLinks() { @@ -980,7 +964,6 @@ class PaginatorHelperTest extends CakeTestCase { * * Test the creation of paging links when the non default model is used. * - * @access public * @return void */ public function testPagingLinksNotDefaultModel() { @@ -1031,7 +1014,6 @@ class PaginatorHelperTest extends CakeTestCase { /** * testGenericLinks method * - * @access public * @return void */ public function testGenericLinks() { @@ -1065,7 +1047,6 @@ class PaginatorHelperTest extends CakeTestCase { /** * Tests generation of generic links with preset options * - * @access public * @return void */ public function testGenericLinksWithPresetOptions() { @@ -1103,7 +1084,6 @@ class PaginatorHelperTest extends CakeTestCase { /** * testNumbers method * - * @access public * @return void */ public function testNumbers() { @@ -1888,7 +1868,6 @@ class PaginatorHelperTest extends CakeTestCase { /** * test Last method * - * @access public * @return void */ public function testLast() { @@ -2005,7 +1984,6 @@ class PaginatorHelperTest extends CakeTestCase { /** * testCounter method * - * @access public * @return void */ public function testCounter() { @@ -2061,7 +2039,6 @@ class PaginatorHelperTest extends CakeTestCase { /** * testHasPage method * - * @access public * @return void */ public function testHasPage() { @@ -2081,7 +2058,6 @@ class PaginatorHelperTest extends CakeTestCase { /** * testWithPlugin method * - * @access public * @return void */ public function testWithPlugin() { @@ -2131,7 +2107,6 @@ class PaginatorHelperTest extends CakeTestCase { /** * testNextLinkUsingDotNotation method * - * @access public * @return void */ public function testNextLinkUsingDotNotation() { diff --git a/lib/Cake/Test/Case/View/Helper/RssHelperTest.php b/lib/Cake/Test/Case/View/Helper/RssHelperTest.php index cac60425c..aa0cc5b42 100644 --- a/lib/Cake/Test/Case/View/Helper/RssHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/RssHelperTest.php @@ -30,7 +30,6 @@ class RssHelperTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -43,7 +42,6 @@ class RssHelperTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -54,7 +52,6 @@ class RssHelperTest extends CakeTestCase { /** * testDocument method * - * @access public * @return void */ public function testDocument() { @@ -89,7 +86,6 @@ class RssHelperTest extends CakeTestCase { /** * testChannel method * - * @access public * @return void */ public function testChannel() { @@ -119,7 +115,6 @@ class RssHelperTest extends CakeTestCase { /** * test correct creation of channel sub elements. * - * @access public * @return void */ public function testChannelElements() { @@ -211,7 +206,6 @@ class RssHelperTest extends CakeTestCase { /** * testItems method * - * @access public * @return void */ public function testItems() { @@ -252,7 +246,6 @@ class RssHelperTest extends CakeTestCase { /** * testItem method * - * @access public * @return void */ public function testItem() { @@ -482,7 +475,6 @@ class RssHelperTest extends CakeTestCase { /** * testTime method * - * @access public * @return void */ public function testTime() { @@ -491,7 +483,6 @@ class RssHelperTest extends CakeTestCase { /** * testElementAttrNotInParent method * - * @access public * @return void */ public function testElementAttrNotInParent() { diff --git a/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php b/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php index aab481c91..1d36810bb 100644 --- a/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/SessionHelperTest.php @@ -31,7 +31,6 @@ class SessionHelperTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -76,7 +75,6 @@ class SessionHelperTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -88,7 +86,6 @@ class SessionHelperTest extends CakeTestCase { /** * testRead method * - * @access public * @return void */ public function testRead() { @@ -102,7 +99,6 @@ class SessionHelperTest extends CakeTestCase { /** * testCheck method * - * @access public * @return void */ public function testCheck() { @@ -118,7 +114,6 @@ class SessionHelperTest extends CakeTestCase { /** * testFlash method * - * @access public * @return void */ public function testFlash() { diff --git a/lib/Cake/Test/Case/View/Helper/TextHelperTest.php b/lib/Cake/Test/Case/View/Helper/TextHelperTest.php index 076e2c8a9..e29a4fafe 100644 --- a/lib/Cake/Test/Case/View/Helper/TextHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/TextHelperTest.php @@ -30,7 +30,6 @@ class TextHelperTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -42,7 +41,6 @@ class TextHelperTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -52,7 +50,6 @@ class TextHelperTest extends CakeTestCase { /** * testTruncate method * - * @access public * @return void */ public function testTruncate() { @@ -93,7 +90,6 @@ class TextHelperTest extends CakeTestCase { /** * testHighlight method * - * @access public * @return void */ public function testHighlight() { @@ -118,7 +114,6 @@ class TextHelperTest extends CakeTestCase { /** * testHighlightHtml method * - * @access public * @return void */ public function testHighlightHtml() { @@ -145,7 +140,6 @@ class TextHelperTest extends CakeTestCase { /** * testHighlightMulti method * - * @access public * @return void */ public function testHighlightMulti() { @@ -160,7 +154,6 @@ class TextHelperTest extends CakeTestCase { /** * testStripLinks method * - * @access public * @return void */ public function testStripLinks() { @@ -188,7 +181,6 @@ class TextHelperTest extends CakeTestCase { /** * testAutoLink method * - * @access public * @return void */ public function testAutoLink() { @@ -236,7 +228,6 @@ class TextHelperTest extends CakeTestCase { /** * testAutoLinkUrls method * - * @access public * @return void */ public function testAutoLinkUrls() { @@ -289,7 +280,6 @@ class TextHelperTest extends CakeTestCase { /** * testAutoLinkEmails method * - * @access public * @return void */ public function testAutoLinkEmails() { @@ -328,7 +318,6 @@ class TextHelperTest extends CakeTestCase { /** * testHighlightCaseInsensitivity method * - * @access public * @return void */ public function testHighlightCaseInsensitivity() { @@ -345,7 +334,6 @@ class TextHelperTest extends CakeTestCase { /** * testExcerpt method * - * @access public * @return void */ public function testExcerpt() { @@ -385,7 +373,6 @@ class TextHelperTest extends CakeTestCase { /** * testExcerptCaseInsensitivity method * - * @access public * @return void */ public function testExcerptCaseInsensitivity() { @@ -403,7 +390,6 @@ class TextHelperTest extends CakeTestCase { /** * testListGeneration method * - * @access public * @return void */ public function testListGeneration() { diff --git a/lib/Cake/Test/Case/View/Helper/TimeHelperTest.php b/lib/Cake/Test/Case/View/Helper/TimeHelperTest.php index a5a581d00..79494f58a 100644 --- a/lib/Cake/Test/Case/View/Helper/TimeHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/TimeHelperTest.php @@ -29,7 +29,6 @@ class TimeHelperTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -41,7 +40,6 @@ class TimeHelperTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -51,7 +49,6 @@ class TimeHelperTest extends CakeTestCase { /** * testToQuarter method * - * @access public * @return void */ public function testToQuarter() { @@ -80,7 +77,6 @@ class TimeHelperTest extends CakeTestCase { /** * testTimeAgoInWords method * - * @access public * @return void */ public function testTimeAgoInWords() { @@ -299,7 +295,6 @@ class TimeHelperTest extends CakeTestCase { /** * testNice method * - * @access public * @return void */ public function testNice() { @@ -329,7 +324,6 @@ class TimeHelperTest extends CakeTestCase { /** * testNiceShort method * - * @access public * @return void */ public function testNiceShort() { @@ -350,7 +344,6 @@ class TimeHelperTest extends CakeTestCase { /** * testDaysAsSql method * - * @access public * @return void */ public function testDaysAsSql() { @@ -364,7 +357,6 @@ class TimeHelperTest extends CakeTestCase { /** * testDayAsSql method * - * @access public * @return void */ public function testDayAsSql() { @@ -377,7 +369,6 @@ class TimeHelperTest extends CakeTestCase { /** * testToUnix method * - * @access public * @return void */ public function testToUnix() { @@ -392,7 +383,6 @@ class TimeHelperTest extends CakeTestCase { /** * testToAtom method * - * @access public * @return void */ public function testToAtom() { @@ -402,7 +392,6 @@ class TimeHelperTest extends CakeTestCase { /** * testToRss method * - * @access public * @return void */ public function testToRss() { @@ -412,7 +401,6 @@ class TimeHelperTest extends CakeTestCase { /** * testFormat method * - * @access public * @return void */ public function testFormat() { @@ -429,7 +417,6 @@ class TimeHelperTest extends CakeTestCase { /** * testOfGmt method * - * @access public * @return void */ public function testGmt() { @@ -456,7 +443,6 @@ class TimeHelperTest extends CakeTestCase { /** * testIsToday method * - * @access public * @return void */ public function testIsToday() { @@ -473,7 +459,6 @@ class TimeHelperTest extends CakeTestCase { /** * testIsThisWeek method * - * @access public * @return void */ public function testIsThisWeek() { @@ -495,7 +480,6 @@ class TimeHelperTest extends CakeTestCase { /** * testIsThisMonth method * - * @access public * @return void */ public function testIsThisMonth() { @@ -513,7 +497,6 @@ class TimeHelperTest extends CakeTestCase { /** * testIsThisYear method * - * @access public * @return void */ public function testIsThisYear() { @@ -525,7 +508,6 @@ class TimeHelperTest extends CakeTestCase { /** * testWasYesterday method * - * @access public * @return void */ public function testWasYesterday() { @@ -545,7 +527,6 @@ class TimeHelperTest extends CakeTestCase { /** * testIsTomorrow method * - * @access public * @return void */ public function testIsTomorrow() { @@ -562,7 +543,6 @@ class TimeHelperTest extends CakeTestCase { /** * testWasWithinLast method * - * @access public * @return void */ public function testWasWithinLast() { @@ -607,7 +587,6 @@ class TimeHelperTest extends CakeTestCase { /** * testUserOffset method * - * @access public * @return void */ public function testUserOffset() { @@ -625,7 +604,6 @@ class TimeHelperTest extends CakeTestCase { /** * test fromString() * - * @access public * @return void */ public function testFromString() { @@ -648,7 +626,6 @@ class TimeHelperTest extends CakeTestCase { /** * test converting time specifiers using a time definition localfe file * - * @access public * @return void */ public function testConvertSpecifiers() { @@ -756,7 +733,6 @@ class TimeHelperTest extends CakeTestCase { /** * test formatting dates taking in account preferred i18n locale file * - * @access public * @return void */ public function testI18nFormat() { @@ -786,7 +762,6 @@ class TimeHelperTest extends CakeTestCase { /** * test new format() syntax which inverts first and secod parameters * - * @access public * @return void */ public function testFormatNewSyntax() { diff --git a/lib/Cake/Test/Case/View/HelperTest.php b/lib/Cake/Test/Case/View/HelperTest.php index 847649a7b..17ef4ff5e 100644 --- a/lib/Cake/Test/Case/View/HelperTest.php +++ b/lib/Cake/Test/Case/View/HelperTest.php @@ -33,14 +33,12 @@ class HelperTestPost extends Model { * useTable property * * @var bool false - * @access public */ public $useTable = false; /** * schema method * - * @access public * @return void */ public function schema($field = false) { @@ -60,7 +58,6 @@ class HelperTestPost extends Model { * hasAndBelongsToMany property * * @var array - * @access public */ public $hasAndBelongsToMany = array('HelperTestTag'=> array('with' => 'HelperTestPostsTag')); } @@ -76,14 +73,12 @@ class HelperTestComment extends Model { * useTable property * * @var bool false - * @access public */ public $useTable = false; /** * schema method * - * @access public * @return void */ public function schema($field = false) { @@ -110,14 +105,12 @@ class HelperTestTag extends Model { * useTable property * * @var bool false - * @access public */ public $useTable = false; /** * schema method * - * @access public * @return void */ public function schema($field = false) { @@ -142,14 +135,12 @@ class HelperTestPostsTag extends Model { * useTable property * * @var bool false - * @access public */ public $useTable = false; /** * schema method * - * @access public * @return void */ public function schema($field = false) { @@ -193,7 +184,6 @@ class HelperTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -212,7 +202,6 @@ class HelperTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -247,7 +236,6 @@ class HelperTest extends CakeTestCase { * testFormFieldNameParsing method * * @dataProvider entityProvider - * @access public * @return void */ public function testSetEntity($entity, $expected) { @@ -539,7 +527,6 @@ class HelperTest extends CakeTestCase { /** * testFieldsWithSameName method * - * @access public * @return void */ public function testFieldsWithSameName() { @@ -561,7 +548,6 @@ class HelperTest extends CakeTestCase { /** * testFieldSameAsModel method * - * @access public * @return void */ public function testFieldSameAsModel() { @@ -579,7 +565,6 @@ class HelperTest extends CakeTestCase { /** * testFieldSuffixForDate method * - * @access public * @return void */ public function testFieldSuffixForDate() { @@ -597,7 +582,6 @@ class HelperTest extends CakeTestCase { /** * testMulitDimensionValue method * - * @access public * @return void */ public function testMultiDimensionValue() { @@ -631,7 +615,6 @@ class HelperTest extends CakeTestCase { /** * testClean method * - * @access public * @return void */ public function testClean() { @@ -660,7 +643,6 @@ class HelperTest extends CakeTestCase { /** * testMultiDimensionalField method * - * @access public * @return void */ public function testMultiDimensionalField() { diff --git a/lib/Cake/Test/Case/View/MediaViewTest.php b/lib/Cake/Test/Case/View/MediaViewTest.php index a1898514f..270a4f448 100644 --- a/lib/Cake/Test/Case/View/MediaViewTest.php +++ b/lib/Cake/Test/Case/View/MediaViewTest.php @@ -67,7 +67,6 @@ class MediaViewTest extends CakeTestCase { /** * testRender method * - * @access public * @return void */ public function testRender() { @@ -113,7 +112,6 @@ class MediaViewTest extends CakeTestCase { /** * testRenderWithUnknownFileTypeGeneric method * - * @access public * @return void */ public function testRenderWithUnknownFileTypeGeneric() { @@ -173,7 +171,6 @@ class MediaViewTest extends CakeTestCase { /** * testRenderWithUnknownFileTypeOpera method * - * @access public * @return void */ public function testRenderWithUnknownFileTypeOpera() { @@ -238,7 +235,6 @@ class MediaViewTest extends CakeTestCase { /** * testRenderWithUnknownFileTypeIE method * - * @access public * @return void */ public function testRenderWithUnknownFileTypeIE() { @@ -303,7 +299,6 @@ class MediaViewTest extends CakeTestCase { /** * testConnectionAborted method * - * @access public * @return void */ public function testConnectionAborted() { @@ -327,7 +322,6 @@ class MediaViewTest extends CakeTestCase { /** * testConnectionAbortedOnBuffering method * - * @access public * @return void */ public function testConnectionAbortedOnBuffering() { diff --git a/lib/Cake/Test/Case/View/ThemeViewTest.php b/lib/Cake/Test/Case/View/ThemeViewTest.php index 632a3bcc5..b0adaeec7 100644 --- a/lib/Cake/Test/Case/View/ThemeViewTest.php +++ b/lib/Cake/Test/Case/View/ThemeViewTest.php @@ -32,7 +32,6 @@ class ThemePostsController extends Controller { * name property * * @var string 'ThemePosts' - * @access public */ public $name = 'ThemePosts'; @@ -41,7 +40,6 @@ class ThemePostsController extends Controller { /** * index method * - * @access public * @return void */ public function index() { @@ -64,7 +62,6 @@ class TestThemeView extends ThemeView { * * @param mixed $name * @param array $params - * @access public * @return void */ public function renderElement($name, $params = array()) { @@ -75,7 +72,6 @@ class TestThemeView extends ThemeView { * getViewFileName method * * @param mixed $name - * @access public * @return void */ public function getViewFileName($name = null) { @@ -86,7 +82,6 @@ class TestThemeView extends ThemeView { * getLayoutFileName method * * @param mixed $name - * @access public * @return void */ public function getLayoutFileName($name = null) { @@ -105,7 +100,6 @@ class ThemeViewTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -126,7 +120,6 @@ class ThemeViewTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -141,7 +134,6 @@ class ThemeViewTest extends CakeTestCase { /** * testPluginGetTemplate method * - * @access public * @return void */ public function testPluginThemedGetTemplate() { @@ -168,7 +160,6 @@ class ThemeViewTest extends CakeTestCase { /** * testGetTemplate method * - * @access public * @return void */ public function testGetTemplate() { @@ -207,7 +198,6 @@ class ThemeViewTest extends CakeTestCase { * testMissingView method * * @expectedException MissingViewException - * @access public * @return void */ public function testMissingView() { @@ -231,7 +221,6 @@ class ThemeViewTest extends CakeTestCase { * testMissingLayout method * * @expectedException MissingLayoutException - * @access public * @return void */ public function testMissingLayout() { diff --git a/lib/Cake/Test/Case/View/ViewTest.php b/lib/Cake/Test/Case/View/ViewTest.php index 019886c30..32dd43ce5 100644 --- a/lib/Cake/Test/Case/View/ViewTest.php +++ b/lib/Cake/Test/Case/View/ViewTest.php @@ -35,7 +35,6 @@ class ViewPostsController extends Controller { * name property * * @var string 'Posts' - * @access public */ public $name = 'Posts'; @@ -43,14 +42,12 @@ class ViewPostsController extends Controller { * uses property * * @var mixed null - * @access public */ public $uses = null; /** * index method * - * @access public * @return void */ public function index() { @@ -63,7 +60,6 @@ class ViewPostsController extends Controller { /** * nocache_tags_with_element method * - * @access public * @return void */ public function nocache_multiple_element() { @@ -83,7 +79,6 @@ class TestView extends View { * getViewFileName method * * @param mixed $name - * @access public * @return void */ public function getViewFileName($name = null) { @@ -94,7 +89,6 @@ class TestView extends View { * getLayoutFileName method * * @param mixed $name - * @access public * @return void */ public function getLayoutFileName($name = null) { @@ -106,7 +100,6 @@ class TestView extends View { * * @param string $plugin * @param boolean $cached - * @access public * @return void */ public function paths($plugin = null, $cached = true) { @@ -153,7 +146,6 @@ class TestAfterHelper extends Helper { /** * beforeLayout method * - * @access public * @return void */ public function beforeLayout($viewFile) { @@ -163,7 +155,6 @@ class TestAfterHelper extends Helper { /** * afterLayout method * - * @access public * @return void */ public function afterLayout($layoutFile) { @@ -182,7 +173,6 @@ class ViewTest extends CakeTestCase { /** * setUp method * - * @access public * @return void */ public function setUp() { @@ -207,7 +197,6 @@ class ViewTest extends CakeTestCase { /** * tearDown method * - * @access public * @return void */ public function tearDown() { @@ -221,7 +210,6 @@ class ViewTest extends CakeTestCase { /** * testPluginGetTemplate method * - * @access public * @return void */ public function testPluginGetTemplate() { @@ -300,7 +288,6 @@ class ViewTest extends CakeTestCase { /** * testGetTemplate method * - * @access public * @return void */ public function testGetTemplate() { @@ -344,7 +331,6 @@ class ViewTest extends CakeTestCase { * testMissingView method * * @expectedException MissingViewException - * @access public * @return void */ public function testMissingView() { @@ -363,7 +349,6 @@ class ViewTest extends CakeTestCase { * testMissingLayout method * * @expectedException MissingLayoutException - * @access public * @return void */ public function testMissingLayout() { @@ -381,7 +366,6 @@ class ViewTest extends CakeTestCase { /** * testViewVars method * - * @access public * @return void */ public function testViewVars() { @@ -391,7 +375,6 @@ class ViewTest extends CakeTestCase { /** * testUUIDGeneration method * - * @access public * @return void */ public function testUUIDGeneration() { @@ -406,7 +389,6 @@ class ViewTest extends CakeTestCase { /** * testAddInlineScripts method * - * @access public * @return void */ public function testAddInlineScripts() { @@ -422,7 +404,6 @@ class ViewTest extends CakeTestCase { /** * testElement method * - * @access public * @return void */ public function testElement() { @@ -480,7 +461,6 @@ class ViewTest extends CakeTestCase { /** * testElementCacheHelperNoCache method * - * @access public * @return void */ public function testElementCacheHelperNoCache() { @@ -494,7 +474,6 @@ class ViewTest extends CakeTestCase { /** * testElementCache method * - * @access public * @return void */ public function testElementCache() { @@ -574,7 +553,6 @@ class ViewTest extends CakeTestCase { /** * testLoadHelpers method * - * @access public * @return void */ public function testLoadHelpers() { @@ -613,7 +591,6 @@ class ViewTest extends CakeTestCase { /** * testBeforeLayout method * - * @access public * @return void */ public function testBeforeLayout() { @@ -626,7 +603,6 @@ class ViewTest extends CakeTestCase { /** * testAfterLayout method * - * @access public * @return void */ public function testAfterLayout() { @@ -645,7 +621,6 @@ class ViewTest extends CakeTestCase { /** * testRenderLoadHelper method * - * @access public * @return void */ public function testRenderLoadHelper() { @@ -672,7 +647,6 @@ class ViewTest extends CakeTestCase { /** * testRender method * - * @access public * @return void */ public function testRender() { @@ -747,7 +721,6 @@ class ViewTest extends CakeTestCase { /** * testGetViewFileName method * - * @access public * @return void */ public function testViewFileName() { @@ -774,7 +747,6 @@ class ViewTest extends CakeTestCase { /** * testRenderCache method * - * @access public * @return void */ public function testRenderCache() { @@ -842,7 +814,6 @@ class ViewTest extends CakeTestCase { /** * testRenderNocache method * - * @access public * @return void */ @@ -881,7 +852,6 @@ class ViewTest extends CakeTestCase { /** * testSet method * - * @access public * @return void */ public function testSet() { @@ -914,7 +884,6 @@ class ViewTest extends CakeTestCase { * testBadExt method * * @expectedException MissingViewException - * @access public * @return void */ public function testBadExt() { @@ -929,7 +898,6 @@ class ViewTest extends CakeTestCase { /** * testAltExt method * - * @access public * @return void */ public function testAltExt() { @@ -943,7 +911,6 @@ class ViewTest extends CakeTestCase { * testAltBadExt method * * @expectedException MissingViewException - * @access public * @return void */ public function testAltBadExt() { diff --git a/lib/Cake/Test/Fixture/AccountFixture.php b/lib/Cake/Test/Fixture/AccountFixture.php index 9b1123d78..03f9ddc06 100644 --- a/lib/Cake/Test/Fixture/AccountFixture.php +++ b/lib/Cake/Test/Fixture/AccountFixture.php @@ -28,7 +28,6 @@ class AccountFixture extends CakeTestFixture { * name property * * @var string 'Aco' - * @access public */ public $name = 'Account'; public $table = 'Accounts'; @@ -37,7 +36,6 @@ class AccountFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'iAccountId' => array('type' => 'integer', 'key' => 'primary'), @@ -48,7 +46,6 @@ class AccountFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('cDescription' => 'gwoo'), diff --git a/lib/Cake/Test/Fixture/AcoActionFixture.php b/lib/Cake/Test/Fixture/AcoActionFixture.php index f8eec32dd..b5be8df9f 100644 --- a/lib/Cake/Test/Fixture/AcoActionFixture.php +++ b/lib/Cake/Test/Fixture/AcoActionFixture.php @@ -28,7 +28,6 @@ class AcoActionFixture extends CakeTestFixture { * name property * * @var string 'AcoAction' - * @access public */ public $name = 'AcoAction'; @@ -36,7 +35,6 @@ class AcoActionFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -52,7 +50,6 @@ class AcoActionFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array(); } diff --git a/lib/Cake/Test/Fixture/AcoFixture.php b/lib/Cake/Test/Fixture/AcoFixture.php index 8d152a25a..ca5876bde 100644 --- a/lib/Cake/Test/Fixture/AcoFixture.php +++ b/lib/Cake/Test/Fixture/AcoFixture.php @@ -28,7 +28,6 @@ class AcoFixture extends CakeTestFixture { * name property * * @var string 'Aco' - * @access public */ public $name = 'Aco'; @@ -36,7 +35,6 @@ class AcoFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -52,7 +50,6 @@ class AcoFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('id' => 1, 'parent_id' => null, 'model' => null, 'foreign_key' => null, 'alias' => 'ROOT', 'lft' => 1, 'rght' => 24), diff --git a/lib/Cake/Test/Fixture/AcoTwoFixture.php b/lib/Cake/Test/Fixture/AcoTwoFixture.php index 7f46ee498..d614154f7 100644 --- a/lib/Cake/Test/Fixture/AcoTwoFixture.php +++ b/lib/Cake/Test/Fixture/AcoTwoFixture.php @@ -28,7 +28,6 @@ class AcoTwoFixture extends CakeTestFixture { * name property * * @var string 'AcoTwo' - * @access public */ public $name = 'AcoTwo'; @@ -36,7 +35,6 @@ class AcoTwoFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -52,7 +50,6 @@ class AcoTwoFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('parent_id' => null, 'model' => null, 'foreign_key' => null, 'alias' => 'ROOT', 'lft' => 1, 'rght' => 20), diff --git a/lib/Cake/Test/Fixture/AdFixture.php b/lib/Cake/Test/Fixture/AdFixture.php index d6b011000..d7100c881 100644 --- a/lib/Cake/Test/Fixture/AdFixture.php +++ b/lib/Cake/Test/Fixture/AdFixture.php @@ -29,7 +29,6 @@ class AdFixture extends CakeTestFixture { * name property * * @var string 'Ad' - * @access public */ public $name = 'Ad'; @@ -37,7 +36,6 @@ class AdFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -52,7 +50,6 @@ class AdFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('parent_id' => null, 'lft' => 1, 'rght' => 2, 'campaign_id' => 1, 'name' => 'Nordover'), diff --git a/lib/Cake/Test/Fixture/AdvertisementFixture.php b/lib/Cake/Test/Fixture/AdvertisementFixture.php index 2a0f45c3c..1ffe62aa4 100644 --- a/lib/Cake/Test/Fixture/AdvertisementFixture.php +++ b/lib/Cake/Test/Fixture/AdvertisementFixture.php @@ -28,7 +28,6 @@ class AdvertisementFixture extends CakeTestFixture { * name property * * @var string 'Advertisement' - * @access public */ public $name = 'Advertisement'; @@ -36,7 +35,6 @@ class AdvertisementFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -49,7 +47,6 @@ class AdvertisementFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('title' => 'First Ad', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'), diff --git a/lib/Cake/Test/Fixture/AfterTreeFixture.php b/lib/Cake/Test/Fixture/AfterTreeFixture.php index 94c9ef406..32766c9fe 100644 --- a/lib/Cake/Test/Fixture/AfterTreeFixture.php +++ b/lib/Cake/Test/Fixture/AfterTreeFixture.php @@ -29,7 +29,6 @@ class AfterTreeFixture extends CakeTestFixture { * name property * * @var string 'AfterTree' - * @access public */ public $name = 'AfterTree'; @@ -37,7 +36,6 @@ class AfterTreeFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -51,7 +49,6 @@ class AfterTreeFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('parent_id' => null, 'lft' => 1, 'rght' => 2, 'name' => 'One'), diff --git a/lib/Cake/Test/Fixture/AnotherArticleFixture.php b/lib/Cake/Test/Fixture/AnotherArticleFixture.php index a24de4807..43488734e 100644 --- a/lib/Cake/Test/Fixture/AnotherArticleFixture.php +++ b/lib/Cake/Test/Fixture/AnotherArticleFixture.php @@ -28,7 +28,6 @@ class AnotherArticleFixture extends CakeTestFixture { * name property * * @var string 'AnotherArticle' - * @access public */ public $name = 'AnotherArticle'; @@ -36,7 +35,6 @@ class AnotherArticleFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -49,7 +47,6 @@ class AnotherArticleFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('title' => 'First Article', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'), diff --git a/lib/Cake/Test/Fixture/AppleFixture.php b/lib/Cake/Test/Fixture/AppleFixture.php index 087d3668c..70bdd3c9c 100644 --- a/lib/Cake/Test/Fixture/AppleFixture.php +++ b/lib/Cake/Test/Fixture/AppleFixture.php @@ -28,7 +28,6 @@ class AppleFixture extends CakeTestFixture { * name property * * @var string 'Apple' - * @access public */ public $name = 'Apple'; @@ -36,7 +35,6 @@ class AppleFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -53,7 +51,6 @@ class AppleFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('apple_id' => 2, 'color' => 'Red 1', 'name' => 'Red Apple 1', 'created' => '2006-11-22 10:38:58', 'date' => '1951-01-04', 'modified' => '2006-12-01 13:31:26', 'mytime' => '22:57:17'), diff --git a/lib/Cake/Test/Fixture/AroFixture.php b/lib/Cake/Test/Fixture/AroFixture.php index a967d97ae..b7c9398c3 100644 --- a/lib/Cake/Test/Fixture/AroFixture.php +++ b/lib/Cake/Test/Fixture/AroFixture.php @@ -28,7 +28,6 @@ class AroFixture extends CakeTestFixture { * name property * * @var string 'Aro' - * @access public */ public $name = 'Aro'; @@ -36,7 +35,6 @@ class AroFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -52,7 +50,6 @@ class AroFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('parent_id' => null, 'model' => null, 'foreign_key' => null, 'alias' => 'ROOT', 'lft' => 1, 'rght' => 8), diff --git a/lib/Cake/Test/Fixture/AroTwoFixture.php b/lib/Cake/Test/Fixture/AroTwoFixture.php index 894f3b4c4..f5ab8af20 100644 --- a/lib/Cake/Test/Fixture/AroTwoFixture.php +++ b/lib/Cake/Test/Fixture/AroTwoFixture.php @@ -28,7 +28,6 @@ class AroTwoFixture extends CakeTestFixture { * name property * * @var string 'AroTwo' - * @access public */ public $name = 'AroTwo'; @@ -36,7 +35,6 @@ class AroTwoFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -52,7 +50,6 @@ class AroTwoFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('id' => 1, 'parent_id' => null, 'model' => null, 'foreign_key' => null, 'alias' => 'root', 'lft' => '1', 'rght' => '20'), diff --git a/lib/Cake/Test/Fixture/ArosAcoFixture.php b/lib/Cake/Test/Fixture/ArosAcoFixture.php index db614cdf7..83355bf92 100644 --- a/lib/Cake/Test/Fixture/ArosAcoFixture.php +++ b/lib/Cake/Test/Fixture/ArosAcoFixture.php @@ -28,7 +28,6 @@ class ArosAcoFixture extends CakeTestFixture { * name property * * @var string 'ArosAco' - * @access public */ public $name = 'ArosAco'; @@ -36,7 +35,6 @@ class ArosAcoFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -52,7 +50,6 @@ class ArosAcoFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array(); } diff --git a/lib/Cake/Test/Fixture/ArosAcoTwoFixture.php b/lib/Cake/Test/Fixture/ArosAcoTwoFixture.php index 54626f3a8..525459062 100644 --- a/lib/Cake/Test/Fixture/ArosAcoTwoFixture.php +++ b/lib/Cake/Test/Fixture/ArosAcoTwoFixture.php @@ -28,7 +28,6 @@ class ArosAcoTwoFixture extends CakeTestFixture { * name property * * @var string 'ArosAcoTwo' - * @access public */ public $name = 'ArosAcoTwo'; @@ -36,7 +35,6 @@ class ArosAcoTwoFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -52,7 +50,6 @@ class ArosAcoTwoFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('id' => 1, 'aro_id' => '1', 'aco_id' => '1', '_create' => '-1', '_read' => '-1', '_update' => '-1', '_delete' => '-1'), diff --git a/lib/Cake/Test/Fixture/ArticleFeaturedFixture.php b/lib/Cake/Test/Fixture/ArticleFeaturedFixture.php index 827cc5097..ebef6988e 100644 --- a/lib/Cake/Test/Fixture/ArticleFeaturedFixture.php +++ b/lib/Cake/Test/Fixture/ArticleFeaturedFixture.php @@ -28,7 +28,6 @@ class ArticleFeaturedFixture extends CakeTestFixture { * name property * * @var string 'ArticleFeatured' - * @access public */ public $name = 'ArticleFeatured'; @@ -36,7 +35,6 @@ class ArticleFeaturedFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -52,7 +50,6 @@ class ArticleFeaturedFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('user_id' => 1, 'title' => 'First Article', 'body' => 'First Article Body', 'published' => 'Y', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'), diff --git a/lib/Cake/Test/Fixture/ArticleFeaturedsTagsFixture.php b/lib/Cake/Test/Fixture/ArticleFeaturedsTagsFixture.php index 4710dd970..6b7a0911b 100644 --- a/lib/Cake/Test/Fixture/ArticleFeaturedsTagsFixture.php +++ b/lib/Cake/Test/Fixture/ArticleFeaturedsTagsFixture.php @@ -28,7 +28,6 @@ class ArticleFeaturedsTagsFixture extends CakeTestFixture { * name property * * @var string 'ArticleFeaturedsTags' - * @access public */ public $name = 'ArticleFeaturedsTags'; @@ -36,7 +35,6 @@ class ArticleFeaturedsTagsFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'article_featured_id' => array('type' => 'integer', 'null' => false), diff --git a/lib/Cake/Test/Fixture/ArticleFixture.php b/lib/Cake/Test/Fixture/ArticleFixture.php index 56f2cee75..4d0addc73 100644 --- a/lib/Cake/Test/Fixture/ArticleFixture.php +++ b/lib/Cake/Test/Fixture/ArticleFixture.php @@ -28,7 +28,6 @@ class ArticleFixture extends CakeTestFixture { * name property * * @var string 'Article' - * @access public */ public $name = 'Article'; @@ -36,7 +35,6 @@ class ArticleFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -52,7 +50,6 @@ class ArticleFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('user_id' => 1, 'title' => 'First Article', 'body' => 'First Article Body', 'published' => 'Y', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'), diff --git a/lib/Cake/Test/Fixture/ArticlesTagFixture.php b/lib/Cake/Test/Fixture/ArticlesTagFixture.php index ef459ff66..cc71e1dd0 100644 --- a/lib/Cake/Test/Fixture/ArticlesTagFixture.php +++ b/lib/Cake/Test/Fixture/ArticlesTagFixture.php @@ -28,7 +28,6 @@ class ArticlesTagFixture extends CakeTestFixture { * name property * * @var string 'ArticlesTag' - * @access public */ public $name = 'ArticlesTag'; @@ -36,7 +35,6 @@ class ArticlesTagFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'article_id' => array('type' => 'integer', 'null' => false), @@ -48,7 +46,6 @@ class ArticlesTagFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('article_id' => 1, 'tag_id' => 1), diff --git a/lib/Cake/Test/Fixture/AssertTagsTestCase.php b/lib/Cake/Test/Fixture/AssertTagsTestCase.php index b48b603db..5052cc422 100644 --- a/lib/Cake/Test/Fixture/AssertTagsTestCase.php +++ b/lib/Cake/Test/Fixture/AssertTagsTestCase.php @@ -43,7 +43,6 @@ class AssertTagsTestCase extends CakeTestCase { /** * testNumericValuesInExpectationForAssertTags * - * @access public * @return void */ public function testNumericValuesInExpectationForAssertTags() { @@ -93,7 +92,6 @@ class AssertTagsTestCase extends CakeTestCase { /** * testBadAssertTags * - * @access public * @return void */ public function testBadAssertTags() { @@ -109,7 +107,6 @@ class AssertTagsTestCase extends CakeTestCase { /** * testBadAssertTags * - * @access public * @return void */ public function testBadAssertTags2() { diff --git a/lib/Cake/Test/Fixture/AttachmentFixture.php b/lib/Cake/Test/Fixture/AttachmentFixture.php index 17346505b..fad50428f 100644 --- a/lib/Cake/Test/Fixture/AttachmentFixture.php +++ b/lib/Cake/Test/Fixture/AttachmentFixture.php @@ -28,7 +28,6 @@ class AttachmentFixture extends CakeTestFixture { * name property * * @var string 'Attachment' - * @access public */ public $name = 'Attachment'; @@ -36,7 +35,6 @@ class AttachmentFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -50,7 +48,6 @@ class AttachmentFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('comment_id' => 5, 'attachment' => 'attachment.zip', 'created' => '2007-03-18 10:51:23', 'updated' => '2007-03-18 10:53:31') diff --git a/lib/Cake/Test/Fixture/AuthUserCustomFieldFixture.php b/lib/Cake/Test/Fixture/AuthUserCustomFieldFixture.php index 44a65911e..e71b7c954 100644 --- a/lib/Cake/Test/Fixture/AuthUserCustomFieldFixture.php +++ b/lib/Cake/Test/Fixture/AuthUserCustomFieldFixture.php @@ -28,7 +28,6 @@ class AuthUserCustomFieldFixture extends CakeTestFixture { * name property * * @var string 'AuthUser' - * @access public */ public $name = 'AuthUserCustomField'; @@ -36,7 +35,6 @@ class AuthUserCustomFieldFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -50,7 +48,6 @@ class AuthUserCustomFieldFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('email' => 'mariano@example.com', 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', 'created' => '2007-03-17 01:16:23', 'updated' => '2007-03-17 01:18:31'), diff --git a/lib/Cake/Test/Fixture/AuthUserFixture.php b/lib/Cake/Test/Fixture/AuthUserFixture.php index db8e552db..b57cc9817 100644 --- a/lib/Cake/Test/Fixture/AuthUserFixture.php +++ b/lib/Cake/Test/Fixture/AuthUserFixture.php @@ -28,7 +28,6 @@ class AuthUserFixture extends CakeTestFixture { * name property * * @var string 'AuthUser' - * @access public */ public $name = 'AuthUser'; @@ -36,7 +35,6 @@ class AuthUserFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -50,7 +48,6 @@ class AuthUserFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('username' => 'mariano', 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', 'created' => '2007-03-17 01:16:23', 'updated' => '2007-03-17 01:18:31'), diff --git a/lib/Cake/Test/Fixture/AuthorFixture.php b/lib/Cake/Test/Fixture/AuthorFixture.php index 3518bd720..a2f5961c0 100644 --- a/lib/Cake/Test/Fixture/AuthorFixture.php +++ b/lib/Cake/Test/Fixture/AuthorFixture.php @@ -28,7 +28,6 @@ class AuthorFixture extends CakeTestFixture { * name property * * @var string 'Author' - * @access public */ public $name = 'Author'; @@ -36,7 +35,6 @@ class AuthorFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -50,7 +48,6 @@ class AuthorFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('user' => 'mariano', 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', 'created' => '2007-03-17 01:16:23', 'updated' => '2007-03-17 01:18:31'), diff --git a/lib/Cake/Test/Fixture/BakeArticleFixture.php b/lib/Cake/Test/Fixture/BakeArticleFixture.php index 69e565e66..da21180b9 100644 --- a/lib/Cake/Test/Fixture/BakeArticleFixture.php +++ b/lib/Cake/Test/Fixture/BakeArticleFixture.php @@ -35,7 +35,6 @@ class BakeArticleFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -51,7 +50,6 @@ class BakeArticleFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array(); } diff --git a/lib/Cake/Test/Fixture/BakeArticlesBakeTagFixture.php b/lib/Cake/Test/Fixture/BakeArticlesBakeTagFixture.php index bba8a735c..9ae007903 100644 --- a/lib/Cake/Test/Fixture/BakeArticlesBakeTagFixture.php +++ b/lib/Cake/Test/Fixture/BakeArticlesBakeTagFixture.php @@ -28,7 +28,6 @@ class BakeArticlesBakeTagFixture extends CakeTestFixture { * name property * * @var string 'ArticlesTag' - * @access public */ public $name = 'BakeArticlesBakeTag'; @@ -36,7 +35,6 @@ class BakeArticlesBakeTagFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'bake_article_id' => array('type' => 'integer', 'null' => false), @@ -48,7 +46,6 @@ class BakeArticlesBakeTagFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array(); } diff --git a/lib/Cake/Test/Fixture/BakeCommentFixture.php b/lib/Cake/Test/Fixture/BakeCommentFixture.php index 7d0901d71..678952a61 100644 --- a/lib/Cake/Test/Fixture/BakeCommentFixture.php +++ b/lib/Cake/Test/Fixture/BakeCommentFixture.php @@ -28,7 +28,6 @@ class BakeCommentFixture extends CakeTestFixture { * name property * * @var string 'Comment' - * @access public */ public $name = 'BakeComment'; @@ -36,7 +35,6 @@ class BakeCommentFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -52,7 +50,6 @@ class BakeCommentFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array(); } diff --git a/lib/Cake/Test/Fixture/BakeTagFixture.php b/lib/Cake/Test/Fixture/BakeTagFixture.php index 9b169c139..68a577d62 100644 --- a/lib/Cake/Test/Fixture/BakeTagFixture.php +++ b/lib/Cake/Test/Fixture/BakeTagFixture.php @@ -28,7 +28,6 @@ class BakeTagFixture extends CakeTestFixture { * name property * * @var string 'Tag' - * @access public */ public $name = 'BakeTag'; @@ -36,7 +35,6 @@ class BakeTagFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -49,7 +47,6 @@ class BakeTagFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array(); } diff --git a/lib/Cake/Test/Fixture/BasketFixture.php b/lib/Cake/Test/Fixture/BasketFixture.php index 741dced32..a1d23eba8 100644 --- a/lib/Cake/Test/Fixture/BasketFixture.php +++ b/lib/Cake/Test/Fixture/BasketFixture.php @@ -28,7 +28,6 @@ class BasketFixture extends CakeTestFixture { * name property * * @var string 'Basket' - * @access public */ public $name = 'Basket'; @@ -36,7 +35,6 @@ class BasketFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -50,7 +48,6 @@ class BasketFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('id' => 1, 'type' => 'nonfile', 'name' => 'basket1', 'object_id' => 1, 'user_id' => 1), diff --git a/lib/Cake/Test/Fixture/BidFixture.php b/lib/Cake/Test/Fixture/BidFixture.php index 3ff8d3ed1..50ce76f1a 100644 --- a/lib/Cake/Test/Fixture/BidFixture.php +++ b/lib/Cake/Test/Fixture/BidFixture.php @@ -28,7 +28,6 @@ class BidFixture extends CakeTestFixture { * name property * * @var string 'Bid' - * @access public */ public $name = 'Bid'; @@ -36,7 +35,6 @@ class BidFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -48,7 +46,6 @@ class BidFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('message_id' => 1, 'name' => 'Bid 1.1'), diff --git a/lib/Cake/Test/Fixture/BinaryTestFixture.php b/lib/Cake/Test/Fixture/BinaryTestFixture.php index 805622549..e8b97865c 100644 --- a/lib/Cake/Test/Fixture/BinaryTestFixture.php +++ b/lib/Cake/Test/Fixture/BinaryTestFixture.php @@ -28,7 +28,6 @@ class BinaryTestFixture extends CakeTestFixture { * name property * * @var string 'BinaryTest' - * @access public */ public $name = 'BinaryTest'; @@ -36,7 +35,6 @@ class BinaryTestFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -47,7 +45,6 @@ class BinaryTestFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array(); } diff --git a/lib/Cake/Test/Fixture/BookFixture.php b/lib/Cake/Test/Fixture/BookFixture.php index 8cde1aab3..67f763a37 100644 --- a/lib/Cake/Test/Fixture/BookFixture.php +++ b/lib/Cake/Test/Fixture/BookFixture.php @@ -28,7 +28,6 @@ class BookFixture extends CakeTestFixture { * name property * * @var string 'Book' - * @access public */ public $name = 'Book'; @@ -36,7 +35,6 @@ class BookFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -51,7 +49,6 @@ class BookFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('id' => 1, 'isbn' => '1234567890', 'title' => 'Faust', 'author' => 'Johann Wolfgang von Goethe') diff --git a/lib/Cake/Test/Fixture/CacheTestModelFixture.php b/lib/Cake/Test/Fixture/CacheTestModelFixture.php index 72ebd1498..c24cacd93 100644 --- a/lib/Cake/Test/Fixture/CacheTestModelFixture.php +++ b/lib/Cake/Test/Fixture/CacheTestModelFixture.php @@ -28,7 +28,6 @@ class CacheTestModelFixture extends CakeTestFixture { * name property * * @var string 'CacheTestModel' - * @access public */ public $name = 'CacheTestModel'; @@ -36,7 +35,6 @@ class CacheTestModelFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'string', 'length' => 255, 'key' => 'primary'), diff --git a/lib/Cake/Test/Fixture/CallbackFixture.php b/lib/Cake/Test/Fixture/CallbackFixture.php index 7302b82b7..05926ceea 100644 --- a/lib/Cake/Test/Fixture/CallbackFixture.php +++ b/lib/Cake/Test/Fixture/CallbackFixture.php @@ -28,7 +28,6 @@ class CallbackFixture extends CakeTestFixture { * name property * * @var string 'Callback' - * @access public */ public $name = 'Callback'; @@ -36,7 +35,6 @@ class CallbackFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -50,7 +48,6 @@ class CallbackFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('user' => 'user1', 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', 'created' => '2007-03-17 01:18:23', 'updated' => '2007-03-17 01:20:31'), diff --git a/lib/Cake/Test/Fixture/CampaignFixture.php b/lib/Cake/Test/Fixture/CampaignFixture.php index 0a059650c..f737f0544 100644 --- a/lib/Cake/Test/Fixture/CampaignFixture.php +++ b/lib/Cake/Test/Fixture/CampaignFixture.php @@ -29,7 +29,6 @@ class CampaignFixture extends CakeTestFixture { * name property * * @var string 'Campaign' - * @access public */ public $name = 'Campaign'; @@ -37,7 +36,6 @@ class CampaignFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -48,7 +46,6 @@ class CampaignFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('name' => 'Hurtigruten'), diff --git a/lib/Cake/Test/Fixture/CategoryFixture.php b/lib/Cake/Test/Fixture/CategoryFixture.php index 0544553c2..a25926734 100644 --- a/lib/Cake/Test/Fixture/CategoryFixture.php +++ b/lib/Cake/Test/Fixture/CategoryFixture.php @@ -28,7 +28,6 @@ class CategoryFixture extends CakeTestFixture { * name property * * @var string 'Category' - * @access public */ public $name = 'Category'; @@ -36,7 +35,6 @@ class CategoryFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -50,7 +48,6 @@ class CategoryFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('parent_id' => 0, 'name' => 'Category 1', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'), diff --git a/lib/Cake/Test/Fixture/CategoryThreadFixture.php b/lib/Cake/Test/Fixture/CategoryThreadFixture.php index 20ad353d6..e09ce935c 100644 --- a/lib/Cake/Test/Fixture/CategoryThreadFixture.php +++ b/lib/Cake/Test/Fixture/CategoryThreadFixture.php @@ -28,7 +28,6 @@ class CategoryThreadFixture extends CakeTestFixture { * name property * * @var string 'CategoryThread' - * @access public */ public $name = 'CategoryThread'; @@ -36,7 +35,6 @@ class CategoryThreadFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -50,7 +48,6 @@ class CategoryThreadFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('parent_id' => 0, 'name' => 'Category 1', 'created' => '2007-03-18 15:30:23', 'updated' => '2007-03-18 15:32:31'), diff --git a/lib/Cake/Test/Fixture/CdFixture.php b/lib/Cake/Test/Fixture/CdFixture.php index df51330ab..a0ac89304 100644 --- a/lib/Cake/Test/Fixture/CdFixture.php +++ b/lib/Cake/Test/Fixture/CdFixture.php @@ -28,7 +28,6 @@ class CdFixture extends CakeTestFixture { * name property * * @var string 'Cd' - * @access public */ public $name = 'Cd'; @@ -36,7 +35,6 @@ class CdFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -49,7 +47,6 @@ class CdFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('id' => 1, 'title' => 'Grace', 'artist' => 'Jeff Buckley', 'genre' => 'awesome') diff --git a/lib/Cake/Test/Fixture/CommentFixture.php b/lib/Cake/Test/Fixture/CommentFixture.php index 1afd29b9d..a21f52b00 100644 --- a/lib/Cake/Test/Fixture/CommentFixture.php +++ b/lib/Cake/Test/Fixture/CommentFixture.php @@ -28,7 +28,6 @@ class CommentFixture extends CakeTestFixture { * name property * * @var string 'Comment' - * @access public */ public $name = 'Comment'; @@ -36,7 +35,6 @@ class CommentFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -52,7 +50,6 @@ class CommentFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('article_id' => 1, 'user_id' => 2, 'comment' => 'First Comment for First Article', 'published' => 'Y', 'created' => '2007-03-18 10:45:23', 'updated' => '2007-03-18 10:47:31'), diff --git a/lib/Cake/Test/Fixture/ContentAccountFixture.php b/lib/Cake/Test/Fixture/ContentAccountFixture.php index 5558909fe..76bfd8a72 100644 --- a/lib/Cake/Test/Fixture/ContentAccountFixture.php +++ b/lib/Cake/Test/Fixture/ContentAccountFixture.php @@ -28,7 +28,6 @@ class ContentAccountFixture extends CakeTestFixture { * name property * * @var string 'Aco' - * @access public */ public $name = 'ContentAccount'; public $table = 'ContentAccounts'; @@ -37,7 +36,6 @@ class ContentAccountFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'iContentAccountsId' => array('type' => 'integer', 'key' => 'primary'), @@ -49,7 +47,6 @@ class ContentAccountFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('iContentId' => 1, 'iAccountId' => 1), diff --git a/lib/Cake/Test/Fixture/ContentFixture.php b/lib/Cake/Test/Fixture/ContentFixture.php index 3ca089dbb..20d6d495d 100644 --- a/lib/Cake/Test/Fixture/ContentFixture.php +++ b/lib/Cake/Test/Fixture/ContentFixture.php @@ -28,7 +28,6 @@ class ContentFixture extends CakeTestFixture { * name property * * @var string 'Aco' - * @access public */ public $name = 'Content'; public $table = 'Content'; @@ -37,7 +36,6 @@ class ContentFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'iContentId' => array('type' => 'integer', 'key' => 'primary'), @@ -48,7 +46,6 @@ class ContentFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('cDescription' => 'Test Content 1'), diff --git a/lib/Cake/Test/Fixture/DataTestFixture.php b/lib/Cake/Test/Fixture/DataTestFixture.php index 0bb5399aa..ed5983e49 100644 --- a/lib/Cake/Test/Fixture/DataTestFixture.php +++ b/lib/Cake/Test/Fixture/DataTestFixture.php @@ -28,7 +28,6 @@ class DataTestFixture extends CakeTestFixture { * name property * * @var string 'DataTest' - * @access public */ var $name = 'DataTest'; @@ -36,7 +35,6 @@ class DataTestFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -51,7 +49,6 @@ class DataTestFixture extends CakeTestFixture { * records property * * @var array - * @access public */ var $records = array( array( diff --git a/lib/Cake/Test/Fixture/DatatypeFixture.php b/lib/Cake/Test/Fixture/DatatypeFixture.php index 8e4cd7c49..073324e69 100644 --- a/lib/Cake/Test/Fixture/DatatypeFixture.php +++ b/lib/Cake/Test/Fixture/DatatypeFixture.php @@ -28,7 +28,6 @@ class DatatypeFixture extends CakeTestFixture { * name property * * @var string 'Datatype' - * @access public */ public $name = 'Datatype'; @@ -36,7 +35,6 @@ class DatatypeFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'null'=> false, 'default'=> 0, 'key' => 'primary'), @@ -48,7 +46,6 @@ class DatatypeFixture extends CakeTestFixture { * records property * * @var array - * @access public */ var $records = array( array('id' => 1, 'float_field' => 42.23, 'bool' => false), diff --git a/lib/Cake/Test/Fixture/DependencyFixture.php b/lib/Cake/Test/Fixture/DependencyFixture.php index e3c5ece2b..9802b8a94 100644 --- a/lib/Cake/Test/Fixture/DependencyFixture.php +++ b/lib/Cake/Test/Fixture/DependencyFixture.php @@ -29,7 +29,6 @@ class DependencyFixture extends CakeTestFixture { * name property * * @var string 'Dependency' - * @access public */ public $name = 'Dependency'; @@ -37,7 +36,6 @@ class DependencyFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'child_id' => 'integer', @@ -48,7 +46,6 @@ class DependencyFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('child_id' => 1, 'parent_id' => 2), diff --git a/lib/Cake/Test/Fixture/DeviceFixture.php b/lib/Cake/Test/Fixture/DeviceFixture.php index b7ff64d23..189d3a3c1 100644 --- a/lib/Cake/Test/Fixture/DeviceFixture.php +++ b/lib/Cake/Test/Fixture/DeviceFixture.php @@ -28,7 +28,6 @@ class DeviceFixture extends CakeTestFixture { * name property * * @var string 'Device' - * @access public */ public $name = 'Device'; @@ -36,7 +35,6 @@ class DeviceFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -49,7 +47,6 @@ class DeviceFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('device_type_id' => 1, 'name' => 'Device 1', 'typ' => 1), diff --git a/lib/Cake/Test/Fixture/DeviceTypeCategoryFixture.php b/lib/Cake/Test/Fixture/DeviceTypeCategoryFixture.php index 5a04dc5a3..94fc0ec79 100644 --- a/lib/Cake/Test/Fixture/DeviceTypeCategoryFixture.php +++ b/lib/Cake/Test/Fixture/DeviceTypeCategoryFixture.php @@ -28,7 +28,6 @@ class DeviceTypeCategoryFixture extends CakeTestFixture { * name property * * @var string 'DeviceTypeCategory' - * @access public */ public $name = 'DeviceTypeCategory'; @@ -36,7 +35,6 @@ class DeviceTypeCategoryFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -47,7 +45,6 @@ class DeviceTypeCategoryFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('name' => 'DeviceTypeCategory 1') diff --git a/lib/Cake/Test/Fixture/DeviceTypeFixture.php b/lib/Cake/Test/Fixture/DeviceTypeFixture.php index ff3a3baa8..d1ec46ae7 100644 --- a/lib/Cake/Test/Fixture/DeviceTypeFixture.php +++ b/lib/Cake/Test/Fixture/DeviceTypeFixture.php @@ -28,7 +28,6 @@ class DeviceTypeFixture extends CakeTestFixture { * name property * * @var string 'DeviceType' - * @access public */ public $name = 'DeviceType'; @@ -36,7 +35,6 @@ class DeviceTypeFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -54,7 +52,6 @@ class DeviceTypeFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('device_type_category_id' => 1, 'feature_set_id' => 1, 'exterior_type_category_id' => 1, 'image_id' => 1, 'extra1_id' => 1, 'extra2_id' => 1, 'name' => 'DeviceType 1', 'order' => 0) diff --git a/lib/Cake/Test/Fixture/DocumentDirectoryFixture.php b/lib/Cake/Test/Fixture/DocumentDirectoryFixture.php index 75965b1c8..77424a15f 100644 --- a/lib/Cake/Test/Fixture/DocumentDirectoryFixture.php +++ b/lib/Cake/Test/Fixture/DocumentDirectoryFixture.php @@ -28,7 +28,6 @@ class DocumentDirectoryFixture extends CakeTestFixture { * name property * * @var string 'DocumentDirectory' - * @access public */ public $name = 'DocumentDirectory'; @@ -36,7 +35,6 @@ class DocumentDirectoryFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -47,7 +45,6 @@ class DocumentDirectoryFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('name' => 'DocumentDirectory 1') diff --git a/lib/Cake/Test/Fixture/DocumentFixture.php b/lib/Cake/Test/Fixture/DocumentFixture.php index bd57b3c13..66d9a2e03 100644 --- a/lib/Cake/Test/Fixture/DocumentFixture.php +++ b/lib/Cake/Test/Fixture/DocumentFixture.php @@ -28,7 +28,6 @@ class DocumentFixture extends CakeTestFixture { * name property * * @var string 'Document' - * @access public */ public $name = 'Document'; @@ -36,7 +35,6 @@ class DocumentFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -48,7 +46,6 @@ class DocumentFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('document_directory_id' => 1, 'name' => 'Document 1') diff --git a/lib/Cake/Test/Fixture/ExteriorTypeCategoryFixture.php b/lib/Cake/Test/Fixture/ExteriorTypeCategoryFixture.php index 04b0e6d09..8587dba5a 100644 --- a/lib/Cake/Test/Fixture/ExteriorTypeCategoryFixture.php +++ b/lib/Cake/Test/Fixture/ExteriorTypeCategoryFixture.php @@ -28,7 +28,6 @@ class ExteriorTypeCategoryFixture extends CakeTestFixture { * name property * * @var string 'ExteriorTypeCategory' - * @access public */ public $name = 'ExteriorTypeCategory'; @@ -36,7 +35,6 @@ class ExteriorTypeCategoryFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -48,7 +46,6 @@ class ExteriorTypeCategoryFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('image_id' => 1, 'name' => 'ExteriorTypeCategory 1') diff --git a/lib/Cake/Test/Fixture/FeatureSetFixture.php b/lib/Cake/Test/Fixture/FeatureSetFixture.php index 75b0b8c2a..16efe6dad 100644 --- a/lib/Cake/Test/Fixture/FeatureSetFixture.php +++ b/lib/Cake/Test/Fixture/FeatureSetFixture.php @@ -28,7 +28,6 @@ class FeatureSetFixture extends CakeTestFixture { * name property * * @var string 'FeatureSet' - * @access public */ public $name = 'FeatureSet'; @@ -36,7 +35,6 @@ class FeatureSetFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -47,7 +45,6 @@ class FeatureSetFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('name' => 'FeatureSet 1') diff --git a/lib/Cake/Test/Fixture/FeaturedFixture.php b/lib/Cake/Test/Fixture/FeaturedFixture.php index bc80632f8..601df3e96 100644 --- a/lib/Cake/Test/Fixture/FeaturedFixture.php +++ b/lib/Cake/Test/Fixture/FeaturedFixture.php @@ -28,7 +28,6 @@ class FeaturedFixture extends CakeTestFixture { * name property * * @var string 'Featured' - * @access public */ public $name = 'Featured'; @@ -36,7 +35,6 @@ class FeaturedFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -52,7 +50,6 @@ class FeaturedFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('article_featured_id' => 1, 'category_id' => 1, 'published_date' => '2007-03-31 10:39:23', 'end_date' => '2007-05-15 10:39:23', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'), diff --git a/lib/Cake/Test/Fixture/FilmFileFixture.php b/lib/Cake/Test/Fixture/FilmFileFixture.php index f1582d1f4..1549336d5 100644 --- a/lib/Cake/Test/Fixture/FilmFileFixture.php +++ b/lib/Cake/Test/Fixture/FilmFileFixture.php @@ -28,7 +28,6 @@ class FilmFileFixture extends CakeTestFixture { * name property * * @var string 'FilmFile' - * @access public */ public $name = 'FilmFile'; @@ -36,7 +35,6 @@ class FilmFileFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -47,7 +45,6 @@ class FilmFileFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('id' => 1, 'name' => 'one'), diff --git a/lib/Cake/Test/Fixture/FlagTreeFixture.php b/lib/Cake/Test/Fixture/FlagTreeFixture.php index 2f26610ee..c86907db6 100644 --- a/lib/Cake/Test/Fixture/FlagTreeFixture.php +++ b/lib/Cake/Test/Fixture/FlagTreeFixture.php @@ -32,7 +32,6 @@ class FlagTreeFixture extends CakeTestFixture { * name property * * @var string 'FlagTree' - * @access public */ public $name = 'FlagTree'; @@ -40,7 +39,6 @@ class FlagTreeFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer','key' => 'primary'), diff --git a/lib/Cake/Test/Fixture/FruitFixture.php b/lib/Cake/Test/Fixture/FruitFixture.php index b8eb4fa48..a38a347db 100644 --- a/lib/Cake/Test/Fixture/FruitFixture.php +++ b/lib/Cake/Test/Fixture/FruitFixture.php @@ -28,7 +28,6 @@ class FruitFixture extends CakeTestFixture { * name property * * @var string 'Fruit' - * @access public */ public $name = 'Fruit'; @@ -36,7 +35,6 @@ class FruitFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'string', 'length' => 36, 'key' => 'primary'), @@ -50,7 +48,6 @@ class FruitFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array( diff --git a/lib/Cake/Test/Fixture/FruitsUuidTagFixture.php b/lib/Cake/Test/Fixture/FruitsUuidTagFixture.php index 43b34ae60..89f5e25ef 100644 --- a/lib/Cake/Test/Fixture/FruitsUuidTagFixture.php +++ b/lib/Cake/Test/Fixture/FruitsUuidTagFixture.php @@ -28,7 +28,6 @@ class FruitsUuidTagFixture extends CakeTestFixture { * name property * * @var string 'FruitsUuidTag' - * @access public */ public $name = 'FruitsUuidTag'; @@ -36,7 +35,6 @@ class FruitsUuidTagFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'fruit_id' => array('type' => 'string', 'null' => false, 'length' => 36, 'key' => 'primary'), @@ -50,7 +48,6 @@ class FruitsUuidTagFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('fruit_id' => '481fc6d0-b920-43e0-a40d-6d1740cf8569', 'uuid_tag_id' => '481fc6d0-b920-43e0-e50f-6d1740cf8569') diff --git a/lib/Cake/Test/Fixture/HomeFixture.php b/lib/Cake/Test/Fixture/HomeFixture.php index 325affc1a..0f5da124a 100644 --- a/lib/Cake/Test/Fixture/HomeFixture.php +++ b/lib/Cake/Test/Fixture/HomeFixture.php @@ -28,7 +28,6 @@ class HomeFixture extends CakeTestFixture { * name property * * @var string 'Home' - * @access public */ public $name = 'Home'; @@ -36,7 +35,6 @@ class HomeFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -51,7 +49,6 @@ class HomeFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('another_article_id' => 1, 'advertisement_id' => 1, 'title' => 'First Home', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'), diff --git a/lib/Cake/Test/Fixture/ImageFixture.php b/lib/Cake/Test/Fixture/ImageFixture.php index ccd757be3..754c05f7e 100644 --- a/lib/Cake/Test/Fixture/ImageFixture.php +++ b/lib/Cake/Test/Fixture/ImageFixture.php @@ -28,7 +28,6 @@ class ImageFixture extends CakeTestFixture { * name property * * @var string 'Image' - * @access public */ public $name = 'Image'; @@ -36,7 +35,6 @@ class ImageFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -47,7 +45,6 @@ class ImageFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('name' => 'Image 1'), diff --git a/lib/Cake/Test/Fixture/ItemFixture.php b/lib/Cake/Test/Fixture/ItemFixture.php index ff970eeae..4bad38ee2 100644 --- a/lib/Cake/Test/Fixture/ItemFixture.php +++ b/lib/Cake/Test/Fixture/ItemFixture.php @@ -28,7 +28,6 @@ class ItemFixture extends CakeTestFixture { * name property * * @var string 'Item' - * @access public */ public $name = 'Item'; @@ -36,7 +35,6 @@ class ItemFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -49,7 +47,6 @@ class ItemFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('syfile_id' => 1, 'published' => 0, 'name' => 'Item 1'), diff --git a/lib/Cake/Test/Fixture/ItemsPortfolioFixture.php b/lib/Cake/Test/Fixture/ItemsPortfolioFixture.php index ab0446ff9..186b1cbbd 100644 --- a/lib/Cake/Test/Fixture/ItemsPortfolioFixture.php +++ b/lib/Cake/Test/Fixture/ItemsPortfolioFixture.php @@ -28,7 +28,6 @@ class ItemsPortfolioFixture extends CakeTestFixture { * name property * * @var string 'ItemsPortfolio' - * @access public */ public $name = 'ItemsPortfolio'; @@ -36,7 +35,6 @@ class ItemsPortfolioFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -48,7 +46,6 @@ class ItemsPortfolioFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('item_id' => 1, 'portfolio_id' => 1), diff --git a/lib/Cake/Test/Fixture/JoinABFixture.php b/lib/Cake/Test/Fixture/JoinABFixture.php index b93dbdf05..4d0cb1a0f 100644 --- a/lib/Cake/Test/Fixture/JoinABFixture.php +++ b/lib/Cake/Test/Fixture/JoinABFixture.php @@ -28,7 +28,6 @@ class JoinABFixture extends CakeTestFixture { * name property * * @var string 'JoinAsJoinB' - * @access public */ public $name = 'JoinAsJoinB'; @@ -36,7 +35,6 @@ class JoinABFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -51,7 +49,6 @@ class JoinABFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('join_a_id' => 1, 'join_b_id' => 2, 'other' => 'Data for Join A 1 Join B 2', 'created' => '2008-01-03 10:56:33', 'updated' => '2008-01-03 10:56:33'), diff --git a/lib/Cake/Test/Fixture/JoinACFixture.php b/lib/Cake/Test/Fixture/JoinACFixture.php index c5e0ee0ee..233aaf40c 100644 --- a/lib/Cake/Test/Fixture/JoinACFixture.php +++ b/lib/Cake/Test/Fixture/JoinACFixture.php @@ -28,7 +28,6 @@ class JoinACFixture extends CakeTestFixture { * name property * * @var string 'JoinAsJoinC' - * @access public */ public $name = 'JoinAsJoinC'; @@ -36,7 +35,6 @@ class JoinACFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -51,7 +49,6 @@ class JoinACFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('join_a_id' => 1, 'join_c_id' => 2, 'other' => 'Data for Join A 1 Join C 2', 'created' => '2008-01-03 10:57:22', 'updated' => '2008-01-03 10:57:22'), diff --git a/lib/Cake/Test/Fixture/JoinAFixture.php b/lib/Cake/Test/Fixture/JoinAFixture.php index 9cbb7f7d7..47fbab44d 100644 --- a/lib/Cake/Test/Fixture/JoinAFixture.php +++ b/lib/Cake/Test/Fixture/JoinAFixture.php @@ -28,7 +28,6 @@ class JoinAFixture extends CakeTestFixture { * name property * * @var string 'JoinA' - * @access public */ public $name = 'JoinA'; @@ -36,7 +35,6 @@ class JoinAFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -50,7 +48,6 @@ class JoinAFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('name' => 'Join A 1', 'body' => 'Join A 1 Body', 'created' => '2008-01-03 10:54:23', 'updated' => '2008-01-03 10:54:23'), diff --git a/lib/Cake/Test/Fixture/JoinBFixture.php b/lib/Cake/Test/Fixture/JoinBFixture.php index 7ef1fa16a..9735d8658 100644 --- a/lib/Cake/Test/Fixture/JoinBFixture.php +++ b/lib/Cake/Test/Fixture/JoinBFixture.php @@ -28,7 +28,6 @@ class JoinBFixture extends CakeTestFixture { * name property * * @var string 'JoinB' - * @access public */ public $name = 'JoinB'; @@ -36,7 +35,6 @@ class JoinBFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -49,7 +47,6 @@ class JoinBFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('name' => 'Join B 1', 'created' => '2008-01-03 10:55:01', 'updated' => '2008-01-03 10:55:01'), diff --git a/lib/Cake/Test/Fixture/JoinCFixture.php b/lib/Cake/Test/Fixture/JoinCFixture.php index ac619c715..d4d1845c3 100644 --- a/lib/Cake/Test/Fixture/JoinCFixture.php +++ b/lib/Cake/Test/Fixture/JoinCFixture.php @@ -28,7 +28,6 @@ class JoinCFixture extends CakeTestFixture { * name property * * @var string 'JoinC' - * @access public */ public $name = 'JoinC'; @@ -36,7 +35,6 @@ class JoinCFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -49,7 +47,6 @@ class JoinCFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('name' => 'Join C 1', 'created' => '2008-01-03 10:56:11', 'updated' => '2008-01-03 10:56:11'), diff --git a/lib/Cake/Test/Fixture/JoinThingFixture.php b/lib/Cake/Test/Fixture/JoinThingFixture.php index 70bcfb977..ab707d4e6 100644 --- a/lib/Cake/Test/Fixture/JoinThingFixture.php +++ b/lib/Cake/Test/Fixture/JoinThingFixture.php @@ -28,7 +28,6 @@ class JoinThingFixture extends CakeTestFixture { * name property * * @var string 'JoinThing' - * @access public */ public $name = 'JoinThing'; @@ -36,7 +35,6 @@ class JoinThingFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -51,7 +49,6 @@ class JoinThingFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('something_id' => 1, 'something_else_id' => 2, 'doomed' => '1', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'), diff --git a/lib/Cake/Test/Fixture/MessageFixture.php b/lib/Cake/Test/Fixture/MessageFixture.php index 3ad269cca..cd1f47552 100644 --- a/lib/Cake/Test/Fixture/MessageFixture.php +++ b/lib/Cake/Test/Fixture/MessageFixture.php @@ -28,7 +28,6 @@ class MessageFixture extends CakeTestFixture { * name property * * @var string 'Message' - * @access public */ public $name = 'Message'; @@ -36,7 +35,6 @@ class MessageFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -48,7 +46,6 @@ class MessageFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('thread_id' => 1, 'name' => 'Thread 1, Message 1'), diff --git a/lib/Cake/Test/Fixture/MyCategoriesMyProductsFixture.php b/lib/Cake/Test/Fixture/MyCategoriesMyProductsFixture.php index 823603e28..ea75a6dd2 100644 --- a/lib/Cake/Test/Fixture/MyCategoriesMyProductsFixture.php +++ b/lib/Cake/Test/Fixture/MyCategoriesMyProductsFixture.php @@ -28,7 +28,6 @@ class MyCategoriesMyProductsFixture extends CakeTestFixture { * name property * * @var string 'MyCategoriesMyProducts' - * @access public */ public $name = 'MyCategoriesMyProducts'; @@ -36,7 +35,6 @@ class MyCategoriesMyProductsFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'my_category_id' => array('type' => 'integer'), @@ -47,7 +45,6 @@ class MyCategoriesMyProductsFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('my_category_id' => 1, 'my_product_id' => 1), diff --git a/lib/Cake/Test/Fixture/MyCategoriesMyUsersFixture.php b/lib/Cake/Test/Fixture/MyCategoriesMyUsersFixture.php index 1537deb08..f60303256 100644 --- a/lib/Cake/Test/Fixture/MyCategoriesMyUsersFixture.php +++ b/lib/Cake/Test/Fixture/MyCategoriesMyUsersFixture.php @@ -28,7 +28,6 @@ class MyCategoriesMyUsersFixture extends CakeTestFixture { * name property * * @var string 'MyCategoriesMyUsers' - * @access public */ public $name = 'MyCategoriesMyUsers'; @@ -36,7 +35,6 @@ class MyCategoriesMyUsersFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'my_category_id' => array('type' => 'integer'), @@ -47,7 +45,6 @@ class MyCategoriesMyUsersFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('my_category_id' => 1, 'my_user_id' => 1), diff --git a/lib/Cake/Test/Fixture/MyCategoryFixture.php b/lib/Cake/Test/Fixture/MyCategoryFixture.php index 23f7ecfba..eb736025d 100644 --- a/lib/Cake/Test/Fixture/MyCategoryFixture.php +++ b/lib/Cake/Test/Fixture/MyCategoryFixture.php @@ -28,7 +28,6 @@ class MyCategoryFixture extends CakeTestFixture { * name property * * @var string 'MyCategory' - * @access public */ public $name = 'MyCategory'; @@ -36,7 +35,6 @@ class MyCategoryFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -47,7 +45,6 @@ class MyCategoryFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('id' => 1, 'name' => 'A'), diff --git a/lib/Cake/Test/Fixture/MyProductFixture.php b/lib/Cake/Test/Fixture/MyProductFixture.php index e7934459f..61c7441e7 100644 --- a/lib/Cake/Test/Fixture/MyProductFixture.php +++ b/lib/Cake/Test/Fixture/MyProductFixture.php @@ -28,7 +28,6 @@ class MyProductFixture extends CakeTestFixture { * name property * * @var string 'MyProduct' - * @access public */ public $name = 'MyProduct'; @@ -36,7 +35,6 @@ class MyProductFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -47,7 +45,6 @@ class MyProductFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('id' => 1, 'name' => 'book'), diff --git a/lib/Cake/Test/Fixture/MyUserFixture.php b/lib/Cake/Test/Fixture/MyUserFixture.php index f572528fc..3058a77eb 100644 --- a/lib/Cake/Test/Fixture/MyUserFixture.php +++ b/lib/Cake/Test/Fixture/MyUserFixture.php @@ -28,7 +28,6 @@ class MyUserFixture extends CakeTestFixture { * name property * * @var string 'MyUser' - * @access public */ public $name = 'MyUser'; @@ -36,7 +35,6 @@ class MyUserFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -47,7 +45,6 @@ class MyUserFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('id' => 1, 'firstname' => 'userA'), diff --git a/lib/Cake/Test/Fixture/NodeFixture.php b/lib/Cake/Test/Fixture/NodeFixture.php index dff89959e..eff006e00 100644 --- a/lib/Cake/Test/Fixture/NodeFixture.php +++ b/lib/Cake/Test/Fixture/NodeFixture.php @@ -29,7 +29,6 @@ class NodeFixture extends CakeTestFixture { * name property * * @var string 'Node' - * @access public */ public $name = 'Node'; @@ -37,7 +36,6 @@ class NodeFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -49,7 +47,6 @@ class NodeFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('id' => 1, 'name' => 'First', 'state' => 50), diff --git a/lib/Cake/Test/Fixture/NumberTreeFixture.php b/lib/Cake/Test/Fixture/NumberTreeFixture.php index 551a7d1cc..c940c2d28 100644 --- a/lib/Cake/Test/Fixture/NumberTreeFixture.php +++ b/lib/Cake/Test/Fixture/NumberTreeFixture.php @@ -32,7 +32,6 @@ class NumberTreeFixture extends CakeTestFixture { * name property * * @var string 'NumberTree' - * @access public */ public $name = 'NumberTree'; @@ -40,7 +39,6 @@ class NumberTreeFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer','key' => 'primary'), diff --git a/lib/Cake/Test/Fixture/NumberTreeTwoFixture.php b/lib/Cake/Test/Fixture/NumberTreeTwoFixture.php index d871db973..796ee6be9 100644 --- a/lib/Cake/Test/Fixture/NumberTreeTwoFixture.php +++ b/lib/Cake/Test/Fixture/NumberTreeTwoFixture.php @@ -32,7 +32,6 @@ class NumberTreeTwoFixture extends CakeTestFixture { * name property * * @var string 'NumberTree' - * @access public */ public $name = 'NumberTreeTwo'; @@ -40,7 +39,6 @@ class NumberTreeTwoFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer','key' => 'primary'), diff --git a/lib/Cake/Test/Fixture/NumericArticleFixture.php b/lib/Cake/Test/Fixture/NumericArticleFixture.php index 4d3482e1f..8659a4f1f 100644 --- a/lib/Cake/Test/Fixture/NumericArticleFixture.php +++ b/lib/Cake/Test/Fixture/NumericArticleFixture.php @@ -28,7 +28,6 @@ class NumericArticleFixture extends CakeTestFixture { * name property * * @var string 'NumericArticle' - * @access public */ public $name = 'NumericArticle'; @@ -36,7 +35,6 @@ class NumericArticleFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -49,7 +47,6 @@ class NumericArticleFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('title' => 'First Article', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'), diff --git a/lib/Cake/Test/Fixture/OverallFavoriteFixture.php b/lib/Cake/Test/Fixture/OverallFavoriteFixture.php index 1099f0b4b..6f7911700 100644 --- a/lib/Cake/Test/Fixture/OverallFavoriteFixture.php +++ b/lib/Cake/Test/Fixture/OverallFavoriteFixture.php @@ -28,7 +28,6 @@ class OverallFavoriteFixture extends CakeTestFixture { * name property * * @var string 'OverallFavorite' - * @access public */ public $name = 'OverallFavorite'; @@ -36,7 +35,6 @@ class OverallFavoriteFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -49,7 +47,6 @@ class OverallFavoriteFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('id' => 1, 'model_type' => 'Cd', 'model_id' => '1', 'priority' => '1'), diff --git a/lib/Cake/Test/Fixture/PersonFixture.php b/lib/Cake/Test/Fixture/PersonFixture.php index 34b0aebe6..55596f074 100644 --- a/lib/Cake/Test/Fixture/PersonFixture.php +++ b/lib/Cake/Test/Fixture/PersonFixture.php @@ -28,7 +28,6 @@ class PersonFixture extends CakeTestFixture { * name property * * @var string 'Person' - * @access public */ public $name = 'Person'; @@ -36,7 +35,6 @@ class PersonFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'null' => false, 'key' => 'primary'), @@ -53,7 +51,6 @@ class PersonFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('name' => 'person', 'mother_id' => 2, 'father_id' => 3), diff --git a/lib/Cake/Test/Fixture/PortfolioFixture.php b/lib/Cake/Test/Fixture/PortfolioFixture.php index 0d077f96f..e8bcaf1ec 100644 --- a/lib/Cake/Test/Fixture/PortfolioFixture.php +++ b/lib/Cake/Test/Fixture/PortfolioFixture.php @@ -28,7 +28,6 @@ class PortfolioFixture extends CakeTestFixture { * name property * * @var string 'Portfolio' - * @access public */ public $name = 'Portfolio'; @@ -36,7 +35,6 @@ class PortfolioFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -48,7 +46,6 @@ class PortfolioFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('seller_id' => 1, 'name' => 'Portfolio 1'), diff --git a/lib/Cake/Test/Fixture/PostFixture.php b/lib/Cake/Test/Fixture/PostFixture.php index 9c40ed17f..88fb6df85 100644 --- a/lib/Cake/Test/Fixture/PostFixture.php +++ b/lib/Cake/Test/Fixture/PostFixture.php @@ -28,7 +28,6 @@ class PostFixture extends CakeTestFixture { * name property * * @var string 'Post' - * @access public */ public $name = 'Post'; @@ -36,7 +35,6 @@ class PostFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -52,7 +50,6 @@ class PostFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('author_id' => 1, 'title' => 'First Post', 'body' => 'First Post Body', 'published' => 'Y', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'), diff --git a/lib/Cake/Test/Fixture/PostsTagFixture.php b/lib/Cake/Test/Fixture/PostsTagFixture.php index 18f056198..5e5acf0fc 100644 --- a/lib/Cake/Test/Fixture/PostsTagFixture.php +++ b/lib/Cake/Test/Fixture/PostsTagFixture.php @@ -28,7 +28,6 @@ class PostsTagFixture extends CakeTestFixture { * name property * * @var string 'PostsTag' - * @access public */ public $name = 'PostsTag'; @@ -36,7 +35,6 @@ class PostsTagFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'post_id' => array('type' => 'integer', 'null' => false), @@ -48,7 +46,6 @@ class PostsTagFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('post_id' => 1, 'tag_id' => 'tag1'), diff --git a/lib/Cake/Test/Fixture/PrimaryModelFixture.php b/lib/Cake/Test/Fixture/PrimaryModelFixture.php index 4b5abb4be..6ab6c9530 100644 --- a/lib/Cake/Test/Fixture/PrimaryModelFixture.php +++ b/lib/Cake/Test/Fixture/PrimaryModelFixture.php @@ -28,7 +28,6 @@ class PrimaryModelFixture extends CakeTestFixture { * name property * * @var string 'PrimaryModel' - * @access public */ public $name = 'PrimaryModel'; @@ -36,7 +35,6 @@ class PrimaryModelFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -47,7 +45,6 @@ class PrimaryModelFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('primary_name' => 'Primary Name Existing') diff --git a/lib/Cake/Test/Fixture/ProductFixture.php b/lib/Cake/Test/Fixture/ProductFixture.php index 01a69fb32..1826097f6 100644 --- a/lib/Cake/Test/Fixture/ProductFixture.php +++ b/lib/Cake/Test/Fixture/ProductFixture.php @@ -28,7 +28,6 @@ class ProductFixture extends CakeTestFixture { * name property * * @var string 'Product' - * @access public */ public $name = 'Product'; @@ -36,7 +35,6 @@ class ProductFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -49,7 +47,6 @@ class ProductFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('name' => 'Park\'s Great Hits', 'type' => 'Music', 'price' => 19), diff --git a/lib/Cake/Test/Fixture/ProjectFixture.php b/lib/Cake/Test/Fixture/ProjectFixture.php index ad6f4c0ad..2ca06d47d 100644 --- a/lib/Cake/Test/Fixture/ProjectFixture.php +++ b/lib/Cake/Test/Fixture/ProjectFixture.php @@ -28,7 +28,6 @@ class ProjectFixture extends CakeTestFixture { * name property * * @var string 'Project' - * @access public */ public $name = 'Project'; @@ -36,7 +35,6 @@ class ProjectFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -47,7 +45,6 @@ class ProjectFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('name' => 'Project 1'), diff --git a/lib/Cake/Test/Fixture/SampleFixture.php b/lib/Cake/Test/Fixture/SampleFixture.php index a3dd32b7b..303a564f8 100644 --- a/lib/Cake/Test/Fixture/SampleFixture.php +++ b/lib/Cake/Test/Fixture/SampleFixture.php @@ -28,7 +28,6 @@ class SampleFixture extends CakeTestFixture { * name property * * @var string 'Sample' - * @access public */ public $name = 'Sample'; @@ -36,7 +35,6 @@ class SampleFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -48,7 +46,6 @@ class SampleFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('apple_id' => 3, 'name' => 'sample1'), diff --git a/lib/Cake/Test/Fixture/SecondaryModelFixture.php b/lib/Cake/Test/Fixture/SecondaryModelFixture.php index dd1a4bc77..21d7a0943 100644 --- a/lib/Cake/Test/Fixture/SecondaryModelFixture.php +++ b/lib/Cake/Test/Fixture/SecondaryModelFixture.php @@ -28,7 +28,6 @@ class SecondaryModelFixture extends CakeTestFixture { * name property * * @var string 'SecondaryModel' - * @access public */ public $name = 'SecondaryModel'; @@ -36,7 +35,6 @@ class SecondaryModelFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -47,7 +45,6 @@ class SecondaryModelFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('secondary_name' => 'Secondary Name Existing') diff --git a/lib/Cake/Test/Fixture/SessionFixture.php b/lib/Cake/Test/Fixture/SessionFixture.php index ad8241011..6bc08b6c8 100644 --- a/lib/Cake/Test/Fixture/SessionFixture.php +++ b/lib/Cake/Test/Fixture/SessionFixture.php @@ -28,7 +28,6 @@ class SessionFixture extends CakeTestFixture { * name property * * @var string 'Session' - * @access public */ public $name = 'Session'; @@ -43,7 +42,6 @@ class SessionFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'string', 'length' => 128, 'key' => 'primary'), @@ -55,7 +53,6 @@ class SessionFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array(); } diff --git a/lib/Cake/Test/Fixture/SomethingElseFixture.php b/lib/Cake/Test/Fixture/SomethingElseFixture.php index 8e1082a51..ac61a55ab 100644 --- a/lib/Cake/Test/Fixture/SomethingElseFixture.php +++ b/lib/Cake/Test/Fixture/SomethingElseFixture.php @@ -28,7 +28,6 @@ class SomethingElseFixture extends CakeTestFixture { * name property * * @var string 'SomethingElse' - * @access public */ public $name = 'SomethingElse'; @@ -36,7 +35,6 @@ class SomethingElseFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -51,7 +49,6 @@ class SomethingElseFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('title' => 'First Post', 'body' => 'First Post Body', 'published' => 'Y', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'), diff --git a/lib/Cake/Test/Fixture/SomethingFixture.php b/lib/Cake/Test/Fixture/SomethingFixture.php index cab6d56fc..1cc10cd33 100644 --- a/lib/Cake/Test/Fixture/SomethingFixture.php +++ b/lib/Cake/Test/Fixture/SomethingFixture.php @@ -28,7 +28,6 @@ class SomethingFixture extends CakeTestFixture { * name property * * @var string 'Something' - * @access public */ public $name = 'Something'; @@ -36,7 +35,6 @@ class SomethingFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -51,7 +49,6 @@ class SomethingFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('title' => 'First Post', 'body' => 'First Post Body', 'published' => 'Y', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'), diff --git a/lib/Cake/Test/Fixture/StoriesTagFixture.php b/lib/Cake/Test/Fixture/StoriesTagFixture.php index ffde1b83f..3f7578a2e 100644 --- a/lib/Cake/Test/Fixture/StoriesTagFixture.php +++ b/lib/Cake/Test/Fixture/StoriesTagFixture.php @@ -28,7 +28,6 @@ class StoriesTagFixture extends CakeTestFixture { * name property * * @var string 'StoriesTag' - * @access public */ public $name = 'StoriesTag'; @@ -36,7 +35,6 @@ class StoriesTagFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'story' => array('type' => 'integer', 'null' => false), @@ -48,7 +46,6 @@ class StoriesTagFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('story' => 1, 'tag_id' => 1) diff --git a/lib/Cake/Test/Fixture/StoryFixture.php b/lib/Cake/Test/Fixture/StoryFixture.php index 55d587e1c..fd76eed6b 100644 --- a/lib/Cake/Test/Fixture/StoryFixture.php +++ b/lib/Cake/Test/Fixture/StoryFixture.php @@ -28,7 +28,6 @@ class StoryFixture extends CakeTestFixture { * name property * * @var string 'Story' - * @access public */ public $name = 'Story'; @@ -36,7 +35,6 @@ class StoryFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'story' => array('type' => 'integer', 'key' => 'primary'), @@ -47,7 +45,6 @@ class StoryFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('title' => 'First Story'), diff --git a/lib/Cake/Test/Fixture/SyfileFixture.php b/lib/Cake/Test/Fixture/SyfileFixture.php index 8de830f02..0be75b726 100644 --- a/lib/Cake/Test/Fixture/SyfileFixture.php +++ b/lib/Cake/Test/Fixture/SyfileFixture.php @@ -28,7 +28,6 @@ class SyfileFixture extends CakeTestFixture { * name property * * @var string 'Syfile' - * @access public */ public $name = 'Syfile'; @@ -36,7 +35,6 @@ class SyfileFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -49,7 +47,6 @@ class SyfileFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('image_id' => 1, 'name' => 'Syfile 1'), diff --git a/lib/Cake/Test/Fixture/TagFixture.php b/lib/Cake/Test/Fixture/TagFixture.php index e2bba0ac4..bb40ee41f 100644 --- a/lib/Cake/Test/Fixture/TagFixture.php +++ b/lib/Cake/Test/Fixture/TagFixture.php @@ -28,7 +28,6 @@ class TagFixture extends CakeTestFixture { * name property * * @var string 'Tag' - * @access public */ public $name = 'Tag'; @@ -36,7 +35,6 @@ class TagFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -49,7 +47,6 @@ class TagFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('tag' => 'tag1', 'created' => '2007-03-18 12:22:23', 'updated' => '2007-03-18 12:24:31'), diff --git a/lib/Cake/Test/Fixture/TestPluginArticleFixture.php b/lib/Cake/Test/Fixture/TestPluginArticleFixture.php index f08fe3779..72fba47e5 100644 --- a/lib/Cake/Test/Fixture/TestPluginArticleFixture.php +++ b/lib/Cake/Test/Fixture/TestPluginArticleFixture.php @@ -28,7 +28,6 @@ class TestPluginArticleFixture extends CakeTestFixture { * name property * * @var string 'Article' - * @access public */ public $name = 'TestPluginArticle'; @@ -36,7 +35,6 @@ class TestPluginArticleFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -52,7 +50,6 @@ class TestPluginArticleFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('user_id' => 1, 'title' => 'First Plugin Article', 'body' => 'First Plugin Article Body', 'published' => 'Y', 'created' => '2008-09-24 10:39:23', 'updated' => '2008-09-24 10:41:31'), diff --git a/lib/Cake/Test/Fixture/TestPluginCommentFixture.php b/lib/Cake/Test/Fixture/TestPluginCommentFixture.php index 4d8de073d..619cbb493 100644 --- a/lib/Cake/Test/Fixture/TestPluginCommentFixture.php +++ b/lib/Cake/Test/Fixture/TestPluginCommentFixture.php @@ -28,7 +28,6 @@ class TestPluginCommentFixture extends CakeTestFixture { * name property * * @var string 'Comment' - * @access public */ public $name = 'TestPluginComment'; @@ -36,7 +35,6 @@ class TestPluginCommentFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -52,7 +50,6 @@ class TestPluginCommentFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('id' => 1, 'article_id' => 1, 'user_id' => 2, 'comment' => 'First Comment for First Plugin Article', 'published' => 'Y', 'created' => '2008-09-24 10:45:23', 'updated' => '2008-09-24 10:47:31'), diff --git a/lib/Cake/Test/Fixture/ThePaperMonkiesFixture.php b/lib/Cake/Test/Fixture/ThePaperMonkiesFixture.php index f53b44635..d797623ee 100644 --- a/lib/Cake/Test/Fixture/ThePaperMonkiesFixture.php +++ b/lib/Cake/Test/Fixture/ThePaperMonkiesFixture.php @@ -28,7 +28,6 @@ class ThePaperMonkiesFixture extends CakeTestFixture { * name property * * @var string 'ThePaperMonkies' - * @access public */ public $name = 'ThePaperMonkies'; @@ -36,7 +35,6 @@ class ThePaperMonkiesFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'apple_id' => array('type' => 'integer', 'length' => 10, 'null' => true), @@ -47,7 +45,6 @@ class ThePaperMonkiesFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array(); } diff --git a/lib/Cake/Test/Fixture/ThreadFixture.php b/lib/Cake/Test/Fixture/ThreadFixture.php index a67d25cc1..b6831b83e 100644 --- a/lib/Cake/Test/Fixture/ThreadFixture.php +++ b/lib/Cake/Test/Fixture/ThreadFixture.php @@ -28,7 +28,6 @@ class ThreadFixture extends CakeTestFixture { * name property * * @var string 'Thread' - * @access public */ public $name = 'Thread'; @@ -36,7 +35,6 @@ class ThreadFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -48,7 +46,6 @@ class ThreadFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('project_id' => 1, 'name' => 'Project 1, Thread 1'), diff --git a/lib/Cake/Test/Fixture/TranslateArticleFixture.php b/lib/Cake/Test/Fixture/TranslateArticleFixture.php index d42755569..08b6228a6 100644 --- a/lib/Cake/Test/Fixture/TranslateArticleFixture.php +++ b/lib/Cake/Test/Fixture/TranslateArticleFixture.php @@ -28,7 +28,6 @@ class TranslateArticleFixture extends CakeTestFixture { * name property * * @var string 'Translate' - * @access public */ public $name = 'TranslateArticle'; @@ -36,7 +35,6 @@ class TranslateArticleFixture extends CakeTestFixture { * table property * * @var string 'i18n' - * @access public */ public $table = 'article_i18n'; @@ -44,7 +42,6 @@ class TranslateArticleFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -59,7 +56,6 @@ class TranslateArticleFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('id' => 1, 'locale' => 'eng', 'model' => 'TranslatedArticle', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Title (eng) #1'), diff --git a/lib/Cake/Test/Fixture/TranslateFixture.php b/lib/Cake/Test/Fixture/TranslateFixture.php index 40fe8adbc..e628946c6 100644 --- a/lib/Cake/Test/Fixture/TranslateFixture.php +++ b/lib/Cake/Test/Fixture/TranslateFixture.php @@ -28,7 +28,6 @@ class TranslateFixture extends CakeTestFixture { * name property * * @var string 'Translate' - * @access public */ public $name = 'Translate'; @@ -36,7 +35,6 @@ class TranslateFixture extends CakeTestFixture { * table property * * @var string 'i18n' - * @access public */ public $table = 'i18n'; @@ -44,7 +42,6 @@ class TranslateFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -59,7 +56,6 @@ class TranslateFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('locale' => 'eng', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Title #1'), diff --git a/lib/Cake/Test/Fixture/TranslateTableFixture.php b/lib/Cake/Test/Fixture/TranslateTableFixture.php index b6759ea20..626eadaf6 100644 --- a/lib/Cake/Test/Fixture/TranslateTableFixture.php +++ b/lib/Cake/Test/Fixture/TranslateTableFixture.php @@ -28,7 +28,6 @@ class TranslateTableFixture extends CakeTestFixture { * name property * * @var string 'TranslateTable' - * @access public */ public $name = 'TranslateTable'; @@ -36,7 +35,6 @@ class TranslateTableFixture extends CakeTestFixture { * table property * * @var string 'another_i18n' - * @access public */ public $table = 'another_i18n'; @@ -44,7 +42,6 @@ class TranslateTableFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -58,7 +55,6 @@ class TranslateTableFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('locale' => 'eng', 'model' => 'TranslatedItemWithTable', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Another Title #1'), diff --git a/lib/Cake/Test/Fixture/TranslateWithPrefixFixture.php b/lib/Cake/Test/Fixture/TranslateWithPrefixFixture.php index a4f23c614..9ab33aff0 100644 --- a/lib/Cake/Test/Fixture/TranslateWithPrefixFixture.php +++ b/lib/Cake/Test/Fixture/TranslateWithPrefixFixture.php @@ -32,21 +32,18 @@ class TranslateWithPrefixFixture extends CakeTestFixture { * name property * * @var string 'Translate' - * @access public */ public $name = 'TranslateWithPrefix'; /** * table property * * @var string 'i18n' - * @access public */ public $table = 'i18n_translate_with_prefixes'; /** * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -60,7 +57,6 @@ class TranslateWithPrefixFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('id' => 1, 'locale' => 'eng', 'model' => 'TranslatedItem', 'foreign_key' => 1, 'field' => 'title', 'content' => 'Title #1'), diff --git a/lib/Cake/Test/Fixture/TranslatedArticleFixture.php b/lib/Cake/Test/Fixture/TranslatedArticleFixture.php index 74399af44..a2a9d6621 100644 --- a/lib/Cake/Test/Fixture/TranslatedArticleFixture.php +++ b/lib/Cake/Test/Fixture/TranslatedArticleFixture.php @@ -28,7 +28,6 @@ class TranslatedArticleFixture extends CakeTestFixture { * name property * * @var string 'TranslatedItem' - * @access public */ public $name = 'TranslatedArticle'; @@ -36,7 +35,6 @@ class TranslatedArticleFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -50,7 +48,6 @@ class TranslatedArticleFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('id' => 1, 'user_id' => 1, 'published' => 'Y', 'created' => '2007-03-18 10:39:23', 'updated' => '2007-03-18 10:41:31'), diff --git a/lib/Cake/Test/Fixture/TranslatedItemFixture.php b/lib/Cake/Test/Fixture/TranslatedItemFixture.php index 7cc1be43b..a6830b4e7 100644 --- a/lib/Cake/Test/Fixture/TranslatedItemFixture.php +++ b/lib/Cake/Test/Fixture/TranslatedItemFixture.php @@ -28,7 +28,6 @@ class TranslatedItemFixture extends CakeTestFixture { * name property * * @var string 'TranslatedItem' - * @access public */ public $name = 'TranslatedItem'; @@ -36,7 +35,6 @@ class TranslatedItemFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -47,7 +45,6 @@ class TranslatedItemFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('slug' => 'first_translated'), diff --git a/lib/Cake/Test/Fixture/UnconventionalTreeFixture.php b/lib/Cake/Test/Fixture/UnconventionalTreeFixture.php index bafaa9420..faae6ebdb 100644 --- a/lib/Cake/Test/Fixture/UnconventionalTreeFixture.php +++ b/lib/Cake/Test/Fixture/UnconventionalTreeFixture.php @@ -31,7 +31,6 @@ class UnconventionalTreeFixture extends CakeTestFixture { * name property * * @var string 'FlagTree' - * @access public */ public $name = 'UnconventionalTree'; @@ -39,7 +38,6 @@ class UnconventionalTreeFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer','key' => 'primary'), diff --git a/lib/Cake/Test/Fixture/UnderscoreFieldFixture.php b/lib/Cake/Test/Fixture/UnderscoreFieldFixture.php index 069213514..4b175bc81 100644 --- a/lib/Cake/Test/Fixture/UnderscoreFieldFixture.php +++ b/lib/Cake/Test/Fixture/UnderscoreFieldFixture.php @@ -28,14 +28,12 @@ class UnderscoreFieldFixture extends CakeTestFixture { * name property * * @var string 'UnderscoreField' - * @access public */ public $name = 'UnderscoreField'; /** * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -49,7 +47,6 @@ class UnderscoreFieldFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('user_id' => 1, 'my_model_has_a_field' => 'First Article', 'body_field' => 'First Article Body', 'published' => 'Y', 'another_field' => 2), diff --git a/lib/Cake/Test/Fixture/UserFixture.php b/lib/Cake/Test/Fixture/UserFixture.php index 0581ec95a..00c397b62 100644 --- a/lib/Cake/Test/Fixture/UserFixture.php +++ b/lib/Cake/Test/Fixture/UserFixture.php @@ -28,7 +28,6 @@ class UserFixture extends CakeTestFixture { * name property * * @var string 'User' - * @access public */ public $name = 'User'; @@ -36,7 +35,6 @@ class UserFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -50,7 +48,6 @@ class UserFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('user' => 'mariano', 'password' => '5f4dcc3b5aa765d61d8327deb882cf99', 'created' => '2007-03-17 01:16:23', 'updated' => '2007-03-17 01:18:31'), diff --git a/lib/Cake/Test/Fixture/UuidFixture.php b/lib/Cake/Test/Fixture/UuidFixture.php index 2a71e033f..66dd7941b 100644 --- a/lib/Cake/Test/Fixture/UuidFixture.php +++ b/lib/Cake/Test/Fixture/UuidFixture.php @@ -28,7 +28,6 @@ class UuidFixture extends CakeTestFixture { * name property * * @var string 'Uuid' - * @access public */ public $name = 'Uuid'; @@ -36,7 +35,6 @@ class UuidFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'string', 'length' => 36, 'key' => 'primary'), @@ -50,7 +48,6 @@ class UuidFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('id' => '47c36f9c-bc00-4d17-9626-4e183ca6822b', 'title' => 'Unique record 1', 'count' => 2, 'created' => '2008-03-13 01:16:23', 'updated' => '2008-03-13 01:18:31'), diff --git a/lib/Cake/Test/Fixture/UuidTagFixture.php b/lib/Cake/Test/Fixture/UuidTagFixture.php index 5f6ac81be..8e7d5c75b 100644 --- a/lib/Cake/Test/Fixture/UuidTagFixture.php +++ b/lib/Cake/Test/Fixture/UuidTagFixture.php @@ -28,7 +28,6 @@ class UuidTagFixture extends CakeTestFixture { * name property * * @var string 'UuidTag' - * @access public */ public $name = 'UuidTag'; @@ -36,7 +35,6 @@ class UuidTagFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'string', 'length' => 36, 'key' => 'primary'), @@ -48,7 +46,6 @@ class UuidTagFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('id' => '481fc6d0-b920-43e0-e50f-6d1740cf8569', 'name' => 'MyTag', 'created' => '2009-12-09 12:30:00') diff --git a/lib/Cake/Test/Fixture/UuidTreeFixture.php b/lib/Cake/Test/Fixture/UuidTreeFixture.php index 71c67723d..76c334ae9 100644 --- a/lib/Cake/Test/Fixture/UuidTreeFixture.php +++ b/lib/Cake/Test/Fixture/UuidTreeFixture.php @@ -29,7 +29,6 @@ class UuidTreeFixture extends CakeTestFixture { * name property * * @var string 'UuidTree' - * @access public */ public $name = 'UuidTree'; @@ -37,7 +36,6 @@ class UuidTreeFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'string', 'length' => 36, 'key' => 'primary'), diff --git a/lib/Cake/Test/Fixture/UuiditemFixture.php b/lib/Cake/Test/Fixture/UuiditemFixture.php index 6b22dabcc..9302d9b3f 100644 --- a/lib/Cake/Test/Fixture/UuiditemFixture.php +++ b/lib/Cake/Test/Fixture/UuiditemFixture.php @@ -28,7 +28,6 @@ class UuiditemFixture extends CakeTestFixture { * name property * * @var string 'Uuiditem' - * @access public */ public $name = 'Uuiditem'; @@ -36,7 +35,6 @@ class UuiditemFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'string', 'length' => 36, 'key' => 'primary'), @@ -48,7 +46,6 @@ class UuiditemFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('id' => '481fc6d0-b920-43e0-a40d-6d1740cf8569', 'published' => 0, 'name' => 'Item 1'), diff --git a/lib/Cake/Test/Fixture/UuiditemsUuidportfolioFixture.php b/lib/Cake/Test/Fixture/UuiditemsUuidportfolioFixture.php index 69876ea80..452644c84 100644 --- a/lib/Cake/Test/Fixture/UuiditemsUuidportfolioFixture.php +++ b/lib/Cake/Test/Fixture/UuiditemsUuidportfolioFixture.php @@ -28,7 +28,6 @@ class UuiditemsUuidportfolioFixture extends CakeTestFixture { * name property * * @var string 'UuiditemsUuidportfolio' - * @access public */ public $name = 'UuiditemsUuidportfolio'; @@ -36,7 +35,6 @@ class UuiditemsUuidportfolioFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'string', 'length' => 36, 'key' => 'primary'), @@ -48,7 +46,6 @@ class UuiditemsUuidportfolioFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('id' => '4850fd8f-cc5c-449f-bf34-0c5240cf8569', 'uuiditem_id' => '481fc6d0-b920-43e0-a40d-6d1740cf8569', 'uuidportfolio_id' => '4806e091-6940-4d2b-b227-303740cf8569'), diff --git a/lib/Cake/Test/Fixture/UuiditemsUuidportfolioNumericidFixture.php b/lib/Cake/Test/Fixture/UuiditemsUuidportfolioNumericidFixture.php index f65652c93..9ae9d58c8 100644 --- a/lib/Cake/Test/Fixture/UuiditemsUuidportfolioNumericidFixture.php +++ b/lib/Cake/Test/Fixture/UuiditemsUuidportfolioNumericidFixture.php @@ -28,7 +28,6 @@ class UuiditemsUuidportfolioNumericidFixture extends CakeTestFixture { * name property * * @var string 'UuiditemsUuidportfolioNumericid' - * @access public */ public $name = 'UuiditemsUuidportfolioNumericid'; @@ -36,7 +35,6 @@ class UuiditemsUuidportfolioNumericidFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'integer', 'length' => 10, 'key' => 'primary'), @@ -48,7 +46,6 @@ class UuiditemsUuidportfolioNumericidFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('uuiditem_id' => '481fc6d0-b920-43e0-a40d-6d1740cf8569', 'uuidportfolio_id' => '4806e091-6940-4d2b-b227-303740cf8569'), diff --git a/lib/Cake/Test/Fixture/UuidportfolioFixture.php b/lib/Cake/Test/Fixture/UuidportfolioFixture.php index d8e61608c..bc8411473 100644 --- a/lib/Cake/Test/Fixture/UuidportfolioFixture.php +++ b/lib/Cake/Test/Fixture/UuidportfolioFixture.php @@ -28,7 +28,6 @@ class UuidportfolioFixture extends CakeTestFixture { * name property * * @var string 'Uuidportfolio' - * @access public */ public $name = 'Uuidportfolio'; @@ -36,7 +35,6 @@ class UuidportfolioFixture extends CakeTestFixture { * fields property * * @var array - * @access public */ public $fields = array( 'id' => array('type' => 'string', 'length' => 36, 'key' => 'primary'), @@ -47,7 +45,6 @@ class UuidportfolioFixture extends CakeTestFixture { * records property * * @var array - * @access public */ public $records = array( array('id' => '4806e091-6940-4d2b-b227-303740cf8569', 'name' => 'Portfolio 1'), diff --git a/lib/Cake/Test/test_app/Console/Command/SampleShell.php b/lib/Cake/Test/test_app/Console/Command/SampleShell.php index 10167df24..8b5127a35 100644 --- a/lib/Cake/Test/test_app/Console/Command/SampleShell.php +++ b/lib/Cake/Test/test_app/Console/Command/SampleShell.php @@ -21,7 +21,6 @@ class SampleShell extends Shell { /** * main method * - * @access public * @return void */ public function main() { diff --git a/lib/Cake/Test/test_app/Plugin/TestPlugin/Console/Command/ExampleShell.php b/lib/Cake/Test/test_app/Plugin/TestPlugin/Console/Command/ExampleShell.php index 372f423f0..0713b7331 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPlugin/Console/Command/ExampleShell.php +++ b/lib/Cake/Test/test_app/Plugin/TestPlugin/Console/Command/ExampleShell.php @@ -21,7 +21,6 @@ class ExampleShell extends Shell { /** * main method * - * @access public * @return void */ public function main() { diff --git a/lib/Cake/Test/test_app/Plugin/TestPlugin/Model/test_plugin_auth_user.php b/lib/Cake/Test/test_app/Plugin/TestPlugin/Model/test_plugin_auth_user.php index 3f3756920..a2ee7c7ea 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPlugin/Model/test_plugin_auth_user.php +++ b/lib/Cake/Test/test_app/Plugin/TestPlugin/Model/test_plugin_auth_user.php @@ -39,7 +39,6 @@ class TestPluginAuthUser extends TestPluginAppModel { * useDbConfig property * * @var string 'test' - * @access public */ public $useDbConfig = 'test'; } diff --git a/lib/Cake/Test/test_app/Plugin/TestPluginTwo/Console/Command/ExampleShell.php b/lib/Cake/Test/test_app/Plugin/TestPluginTwo/Console/Command/ExampleShell.php index 0eec1dd84..0a6b05368 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPluginTwo/Console/Command/ExampleShell.php +++ b/lib/Cake/Test/test_app/Plugin/TestPluginTwo/Console/Command/ExampleShell.php @@ -21,7 +21,6 @@ class ExampleShell extends Shell { /** * main method * - * @access public * @return void */ public function main() { diff --git a/lib/Cake/Test/test_app/Plugin/TestPluginTwo/Console/Command/WelcomeShell.php b/lib/Cake/Test/test_app/Plugin/TestPluginTwo/Console/Command/WelcomeShell.php index 5721e2a36..541f8ff24 100644 --- a/lib/Cake/Test/test_app/Plugin/TestPluginTwo/Console/Command/WelcomeShell.php +++ b/lib/Cake/Test/test_app/Plugin/TestPluginTwo/Console/Command/WelcomeShell.php @@ -21,7 +21,6 @@ class WelcomeShell extends Shell { /** * say_hello method * - * @access public * @return void */ public function say_hello() { diff --git a/lib/Cake/TestSuite/CakeTestCase.php b/lib/Cake/TestSuite/CakeTestCase.php index 7a130d398..082c3bd50 100644 --- a/lib/Cake/TestSuite/CakeTestCase.php +++ b/lib/Cake/TestSuite/CakeTestCase.php @@ -33,7 +33,6 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase { * The class responsible for managing the creation, loading and removing of fixtures * * @var CakeFixtureManager - * @access public */ public $fixtureManager = null; @@ -42,7 +41,6 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase { * Set this to false to handle manually * * @var array - * @access public */ public $autoFixtures = true; @@ -50,21 +48,9 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase { * Set this to false to avoid tables to be dropped if they already exist * * @var boolean - * @access public */ public $dropTables = true; -/** - * The fixtures to be loaded in this test case. Fixtures are referenced using a dot notation: - * - fixture_name : A fixtures that can be found in the main app folder and is named FixtureNameFixture - * - core.fixture_name : A fixtures that can be found in the cake core folder and is named FixtureNameFixture - * - plugin.plugin_name.fixture_name : A fixtures that can be found in the plugin "plugin_name" folder and is named FixtureNameFixture - * - * @var array - * @access public - */ - private $fixtures = array(); - /** * Configure values to restore at end of test. * @@ -180,7 +166,6 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase { * @param string $fixture Each parameter is a model name that corresponds to a * fixture, i.e. 'Post', 'Author', etc. * @return void - * @access public * @see CakeTestCase::$autoFixtures */ public function loadFixtures() { @@ -310,7 +295,7 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase { $i++; } if ($attrs) { - $permutations = $this->__array_permute($attrs); + $permutations = $this->_array_permute($attrs); $permutationTokens = array(); foreach ($permutations as $permutation) { @@ -358,9 +343,8 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase { * * @param array $items An array of items * @return array - * @access private */ - private function __array_permute($items, $perms = array()) { + protected function _array_permute($items, $perms = array()) { static $permuted; if (empty($perms)) { $permuted = array(); @@ -375,7 +359,7 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase { $newPerms = $perms; list($tmp) = array_splice($newItems, $i, 1); array_unshift($newPerms, $tmp); - $this->__array_permute($newItems, $newPerms); + $this->_array_permute($newItems, $newPerms); } return $permuted; } diff --git a/lib/Cake/TestSuite/ControllerTestCase.php b/lib/Cake/TestSuite/ControllerTestCase.php index dd196d2e5..3e18f94ee 100644 --- a/lib/Cake/TestSuite/ControllerTestCase.php +++ b/lib/Cake/TestSuite/ControllerTestCase.php @@ -181,7 +181,7 @@ abstract class ControllerTestCase extends CakeTestCase { * @param string $url The url to test * @param array $options See options */ - private function _testAction($url = '', $options = array()) { + protected function _testAction($url = '', $options = array()) { $this->vars = $this->result = $this->view = $this->contents = $this->headers = null; $options = array_merge(array( diff --git a/lib/Cake/TestSuite/Reporter/CakeBaseReporter.php b/lib/Cake/TestSuite/Reporter/CakeBaseReporter.php index 60d416eed..64bcf776b 100644 --- a/lib/Cake/TestSuite/Reporter/CakeBaseReporter.php +++ b/lib/Cake/TestSuite/Reporter/CakeBaseReporter.php @@ -41,7 +41,6 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter { * Character set for the output of test reporting. * * @var string - * @access protected */ protected $_characterSet; diff --git a/lib/Cake/Utility/ClassRegistry.php b/lib/Cake/Utility/ClassRegistry.php index 973b76d98..11cc8a59a 100644 --- a/lib/Cake/Utility/ClassRegistry.php +++ b/lib/Cake/Utility/ClassRegistry.php @@ -34,25 +34,22 @@ class ClassRegistry { * Names of classes with their objects. * * @var array - * @access private */ - private $__objects = array(); + protected $_objects = array(); /** * Names of class names mapped to the object in the registry. * * @var array - * @access private */ - private $__map = array(); + protected $_map = array(); /** * Default constructor parameter settings, indexed by type * * @var array - * @access private */ - private $__config = array(); + protected $_config = array(); /** * Return a singleton instance of the ClassRegistry. @@ -89,7 +86,7 @@ class ClassRegistry { * }}} * @param mixed $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 + * @param boolean $strict if set to true it will return false if the class was not found instead * of trying to create an AppModel * @return object instance of ClassName */ @@ -106,7 +103,7 @@ class ClassRegistry { } else { $objects = array(array('class' => $class)); } - $defaults = isset($_this->__config['Model']) ? $_this->__config['Model'] : array(); + $defaults = isset($_this->_config['Model']) ? $_this->_config['Model'] : array(); $count = count($objects); foreach ($objects as $key => $settings) { @@ -114,7 +111,7 @@ class ClassRegistry { $pluginPath = null; $settings = array_merge($defaults, $settings); $class = $settings['class']; - + list($plugin, $class) = pluginSplit($class); if ($plugin) { $pluginPath = $plugin . '.'; @@ -125,7 +122,7 @@ class ClassRegistry { } $alias = $settings['alias']; - if ($model = $_this->__duplicate($alias, $class)) { + if ($model = $_this->_duplicate($alias, $class)) { $_this->map($alias, $class); return $model; } @@ -182,8 +179,8 @@ class ClassRegistry { public static function addObject($key, $object) { $_this = ClassRegistry::getInstance(); $key = Inflector::underscore($key); - if (!isset($_this->__objects[$key])) { - $_this->__objects[$key] = $object; + if (!isset($_this->_objects[$key])) { + $_this->_objects[$key] = $object; return true; } return false; @@ -198,8 +195,8 @@ class ClassRegistry { public static function removeObject($key) { $_this = ClassRegistry::getInstance(); $key = Inflector::underscore($key); - if (isset($_this->__objects[$key])) { - unset($_this->__objects[$key]); + if (isset($_this->_objects[$key])) { + unset($_this->_objects[$key]); } } @@ -212,9 +209,9 @@ class ClassRegistry { public static function isKeySet($key) { $_this = ClassRegistry::getInstance(); $key = Inflector::underscore($key); - if (isset($_this->__objects[$key])) { + if (isset($_this->_objects[$key])) { return true; - } elseif (isset($_this->__map[$key])) { + } elseif (isset($_this->_map[$key])) { return true; } return false; @@ -227,7 +224,7 @@ class ClassRegistry { */ public static function keys() { $_this = ClassRegistry::getInstance(); - return array_keys($_this->__objects); + return array_keys($_this->_objects); } /** @@ -240,12 +237,12 @@ class ClassRegistry { $_this = ClassRegistry::getInstance(); $key = Inflector::underscore($key); $return = false; - if (isset($_this->__objects[$key])) { - $return = $_this->__objects[$key]; + if (isset($_this->_objects[$key])) { + $return = $_this->_objects[$key]; } else { - $key = $_this->__getMap($key); - if (isset($_this->__objects[$key])) { - $return = $_this->__objects[$key]; + $key = $_this->_getMap($key); + if (isset($_this->_objects[$key])) { + $return = $_this->_objects[$key]; } } return $return; @@ -267,11 +264,11 @@ class ClassRegistry { $param = $type; $type = 'Model'; } elseif (is_null($param)) { - unset($_this->__config[$type]); + unset($_this->_config[$type]); } elseif (empty($param) && is_string($type)) { - return isset($_this->__config[$type]) ? $_this->__config[$type] : null; + return isset($_this->_config[$type]) ? $_this->_config[$type] : null; } - $_this->__config[$type] = $param; + $_this->_config[$type] = $param; } /** @@ -281,7 +278,7 @@ class ClassRegistry { * @param string $class * @return boolean */ - private function &__duplicate($alias, $class) { + protected function &_duplicate($alias, $class) { $duplicate = false; if ($this->isKeySet($alias)) { $model = $this->getObject($alias); @@ -298,13 +295,14 @@ class ClassRegistry { * * @param string $key Key to include in map * @param string $name Key that is being mapped + * @return void */ public static function map($key, $name) { $_this = ClassRegistry::getInstance(); $key = Inflector::underscore($key); $name = Inflector::underscore($name); - if (!isset($_this->__map[$key])) { - $_this->__map[$key] = $name; + if (!isset($_this->_map[$key])) { + $_this->_map[$key] = $name; } } @@ -315,7 +313,7 @@ class ClassRegistry { */ public static function mapKeys() { $_this = ClassRegistry::getInstance(); - return array_keys($_this->__map); + return array_keys($_this->_map); } /** @@ -324,9 +322,9 @@ class ClassRegistry { * @param string $key Key to find in map * @return string Mapped value */ - private function __getMap($key) { - if (isset($this->__map[$key])) { - return $this->__map[$key]; + protected function _getMap($key) { + if (isset($this->_map[$key])) { + return $this->_map[$key]; } } @@ -337,7 +335,7 @@ class ClassRegistry { */ public static function flush() { $_this = ClassRegistry::getInstance(); - $_this->__objects = array(); - $_this->__map = array(); + $_this->_objects = array(); + $_this->_map = array(); } } diff --git a/lib/Cake/Utility/Debugger.php b/lib/Cake/Utility/Debugger.php index f6c95a251..815be8b21 100644 --- a/lib/Cake/Utility/Debugger.php +++ b/lib/Cake/Utility/Debugger.php @@ -40,7 +40,6 @@ class Debugger { * A list of errors generated by the application. * * @var array - * @access public */ public $errors = array(); @@ -48,7 +47,6 @@ class Debugger { * Contains the base URL for error code documentation. * * @var string - * @access public */ public $helpPath = null; @@ -56,7 +54,6 @@ class Debugger { * The current output format. * * @var string - * @access protected */ protected $_outputFormat = 'js'; @@ -65,7 +62,6 @@ class Debugger { * value used in $_outputFormat. * * @var string - * @access protected */ protected $_templates = array( 'log' => array( @@ -164,9 +160,8 @@ class Debugger { /** * Returns a reference to the Debugger singleton object instance. * + * @param string $class * @return object - * @access public - * @static */ public static function &getInstance($class = null) { static $instance = array(); @@ -192,10 +187,9 @@ class Debugger { * Recursively formats and outputs the contents of the supplied variable. * * - * @param $var mixed the variable to dump + * @param mixed $var the variable to dump * @return void * @see Debugger::exportVar() - * @static * @link http://book.cakephp.org/view/1191/Using-the-Debugger-Class */ public static function dump($var) { @@ -206,10 +200,9 @@ class Debugger { * Creates an entry in the log file. The log entry will contain a stack trace from where it was called. * as well as export the variable using exportVar. By default the log is written to the debug log. * - * @param $var mixed Variable or content to log - * @param $level int type of log to use. Defaults to LOG_DEBUG + * @param mixed $var Variable or content to log + * @param integer $level type of log to use. Defaults to LOG_DEBUG * @return void - * @static * @link http://book.cakephp.org/view/1191/Using-the-Debugger-Class */ public static function log($var, $level = LOG_DEBUG) { @@ -303,7 +296,6 @@ class Debugger { * * @param array $options Format for outputting stack trace * @return mixed Formatted stack trace - * @static * @link http://book.cakephp.org/view/1191/Using-the-Debugger-Class */ public static function trace($options = array()) { @@ -382,7 +374,6 @@ class Debugger { * * @param string $path Path to shorten * @return string Normalized path - * @static */ public static function trimPath($path) { if (!defined('CAKE_CORE_INCLUDE_PATH') || !defined('APP')) { @@ -420,7 +411,6 @@ class Debugger { * @param integer $context Number of lines of context to extract above and below $line * @return array Set of lines highlighted * @see http://php.net/highlight_string - * @static * @link http://book.cakephp.org/view/1191/Using-the-Debugger-Class */ public static function excerpt($file, $line, $context = 2) { @@ -450,7 +440,7 @@ class Debugger { /** * Converts a variable to a string for debug output. * - * *Note:* The following keys will have their contents replaced with + * *Note:* The following keys will have their contents replaced with * `*****`: * * - password @@ -465,8 +455,8 @@ class Debugger { * shown in an error message if CakePHP is deployed in development mode. * * @param string $var Variable to convert + * @param integer $recursion * @return string Variable as a formatted string - * @static * @link http://book.cakephp.org/view/1191/Using-the-Debugger-Class */ public static function exportVar($var, $recursion = 0) { @@ -636,6 +626,7 @@ class Debugger { * @param string $format Format to use, including 'js' for JavaScript-enhanced HTML, 'html' for * straight HTML output, or 'txt' for unformatted text. * @param array $strings Template strings to be used for the output format. + * @return string * @deprecated Use Debugger::outputFormat() and Debugger::addFormat(). Will be removed * in 3.0 */ @@ -736,7 +727,7 @@ class Debugger { /** * Verifies that the application's salt and cipher seed value has been changed from the default value. * - * @static + * @return void */ public static function checkSecurityKeys() { if (Configure::read('Security.salt') == 'DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi') { diff --git a/lib/Cake/Utility/File.php b/lib/Cake/Utility/File.php index 20d076d5d..17010a9d2 100644 --- a/lib/Cake/Utility/File.php +++ b/lib/Cake/Utility/File.php @@ -34,7 +34,6 @@ class File { * Folder object of the File * * @var Folder - * @access public */ public $Folder = null; @@ -42,7 +41,6 @@ class File { * Filename * * @var string - * @access public */ public $name = null; @@ -50,7 +48,6 @@ class File { * file info * * @var string - * @access public */ public $info = array(); @@ -58,7 +55,6 @@ class File { * Holds the file handler resource if the file is opened * * @var resource - * @access public */ public $handle = null; @@ -66,7 +62,6 @@ class File { * enable locking for file reading and writing * * @var boolean - * @access public */ public $lock = null; @@ -76,7 +71,6 @@ class File { * Current file's absolute path * * @var mixed null - * @access public */ public $path = null; @@ -206,6 +200,7 @@ class File { * all other platforms will use "\n" * * @param string $data Data to prepare for writing. + * @param boolean $forceWindows * @return string The with converted line endings. */ public static function prepare($data, $forceWindows = false) { @@ -330,7 +325,7 @@ class File { * makes filename safe for saving * * @param string $name The name of the file to make safe if different from $this->name - * @param strin $ext The name of the extension to make safe if different from $this->ext + * @param string $ext The name of the extension to make safe if different from $this->ext * @return string $ext the extension of the file */ public function safe($name = null, $ext = null) { diff --git a/lib/Cake/Utility/Folder.php b/lib/Cake/Utility/Folder.php index d4d733e47..44af50df2 100644 --- a/lib/Cake/Utility/Folder.php +++ b/lib/Cake/Utility/Folder.php @@ -29,7 +29,6 @@ class Folder { * Path to Folder. * * @var string - * @access public */ public $path = null; @@ -38,7 +37,6 @@ class Folder { * should be sorted by name. * * @var boolean - * @access public */ public $sort = false; @@ -46,7 +44,6 @@ class Folder { * Mode to be used on create. Does nothing on windows platforms. * * @var integer - * @access public */ public $mode = 0755; @@ -54,33 +51,29 @@ class Folder { * Holds messages from last method. * * @var array - * @access private */ - private $__messages = array(); + protected $_messages = array(); /** * Holds errors from last method. * * @var array - * @access private */ - private $__errors = array(); + protected $_errors = array(); /** * Holds array of complete directory paths. * * @var array - * @access private */ - private $__directories; + protected $_directories; /** * Holds array of complete file paths. * * @var array - * @access private */ - private $__files; + protected $_files; /** * Constructor. @@ -181,7 +174,7 @@ class Folder { /** * Returns an array of all matching files in current directory. * - * @param string $pattern Preg_match pattern (Defaults to: .*) + * @param string $regexpPattern Preg_match pattern (Defaults to: .*) * @param boolean $sort Whether results should be sorted. * @return array Files that match given pattern */ @@ -213,7 +206,6 @@ class Folder { * @param string $pattern Pattern to match against * @param boolean $sort Whether results should be sorted. * @return array Files matching pattern - * @access private */ protected function _findRecursive($pattern, $sort = false) { list($dirs, $files) = $this->read($sort); @@ -247,7 +239,7 @@ class Folder { * Returns true if given $path is an absolute path. * * @param string $path Path to check - * @return bool true if path is absolute. + * @return boolean true if path is absolute. */ public static function isAbsolute($path) { return !empty($path) && ($path[0] === '/' || preg_match('/^[A-Z]:\\\\/i', $path) || substr($path, 0, 2) == '\\\\'); @@ -301,7 +293,7 @@ class Folder { * Returns true if the File is in a given CakePath. * * @param string $path The path to check. - * @return bool + * @return boolean */ public function inCakePath($path = '') { $dir = substr(Folder::slashTerm(ROOT), 0, -1); @@ -315,7 +307,7 @@ class Folder { * * @param string $path The path to check that the current pwd() resides with in. * @param boolean $reverse - * @return bool + * @return boolean */ public function inPath($path = '', $reverse = false) { $dir = Folder::slashTerm($path); @@ -345,11 +337,11 @@ class Folder { if ($recursive === false && is_dir($path)) { if (@chmod($path, intval($mode, 8))) { - $this->__messages[] = __d('cake_dev', '%s changed to %s', $path, $mode); + $this->_messages[] = __d('cake_dev', '%s changed to %s', $path, $mode); return true; } - $this->__errors[] = __d('cake_dev', '%s NOT changed to %s', $path, $mode); + $this->_errors[] = __d('cake_dev', '%s NOT changed to %s', $path, $mode); return false; } @@ -366,14 +358,14 @@ class Folder { } if (@chmod($fullpath, intval($mode, 8))) { - $this->__messages[] = __d('cake_dev', '%s changed to %s', $fullpath, $mode); + $this->_messages[] = __d('cake_dev', '%s changed to %s', $fullpath, $mode); } else { - $this->__errors[] = __d('cake_dev', '%s NOT changed to %s', $fullpath, $mode); + $this->_errors[] = __d('cake_dev', '%s NOT changed to %s', $fullpath, $mode); } } } - if (empty($this->__errors)) { + if (empty($this->_errors)) { return true; } } @@ -397,28 +389,28 @@ class Folder { } return array(); } - $this->__files = array(); - $this->__directories = array($this->realpath($path)); + $this->_files = array(); + $this->_directories = array($this->realpath($path)); $directories = array(); if ($exceptions === false) { $exceptions = true; } - while (!empty($this->__directories)) { - $dir = array_pop($this->__directories); - $this->__tree($dir, $exceptions); + while (!empty($this->_directories)) { + $dir = array_pop($this->_directories); + $this->_tree($dir, $exceptions); $directories[] = $dir; } if ($type === null) { - return array($directories, $this->__files); + return array($directories, $this->_files); } if ($type === 'dir') { return $directories; } $this->cd($original); - return $this->__files; + return $this->_files; } /** @@ -426,13 +418,13 @@ class Folder { * * @param string $path The Path to read. * @param mixed $exceptions Array of files to exclude from the read that will be performed. - * @access private + * @return void */ - public function __tree($path, $exceptions) { + protected function _tree($path, $exceptions) { $this->path = $path; list($dirs, $files) = $this->read(false, $exceptions, true); - $this->__directories = array_merge($this->__directories, $dirs); - $this->__files = array_merge($this->__files, $files); + $this->_directories = array_merge($this->_directories, $dirs); + $this->_files = array_merge($this->_files, $files); } /** @@ -453,7 +445,7 @@ class Folder { } if (is_file($pathname)) { - $this->__errors[] = __d('cake_dev', '%s is a file', $pathname); + $this->_errors[] = __d('cake_dev', '%s is a file', $pathname); return false; } $pathname = rtrim($pathname, DS); @@ -464,11 +456,11 @@ class Folder { $old = umask(0); if (mkdir($pathname, $mode)) { umask($old); - $this->__messages[] = __d('cake_dev', '%s created', $pathname); + $this->_messages[] = __d('cake_dev', '%s created', $pathname); return true; } else { umask($old); - $this->__errors[] = __d('cake_dev', '%s NOT created', $pathname); + $this->_errors[] = __d('cake_dev', '%s NOT created', $pathname); return false; } } @@ -479,8 +471,7 @@ class Folder { /** * Returns the size in bytes of this Folder and its contents. * - * @param string $directory Path to directory - * @return int size in bytes of current folder + * @return integer size in bytes of current folder */ public function dirsize() { $size = 0; @@ -541,9 +532,9 @@ class Folder { } if (is_file($file) === true) { if (@unlink($file)) { - $this->__messages[] = __d('cake_dev', '%s removed', $file); + $this->_messages[] = __d('cake_dev', '%s removed', $file); } else { - $this->__errors[] = __d('cake_dev', '%s NOT removed', $file); + $this->_errors[] = __d('cake_dev', '%s NOT removed', $file); } } elseif (is_dir($file) === true && $this->delete($file) === false) { return false; @@ -552,10 +543,10 @@ class Folder { } $path = substr($path, 0, strlen($path) - 1); if (rmdir($path) === false) { - $this->__errors[] = __d('cake_dev', '%s NOT removed', $path); + $this->_errors[] = __d('cake_dev', '%s NOT removed', $path); return false; } else { - $this->__messages[] = __d('cake_dev', '%s removed', $path); + $this->_messages[] = __d('cake_dev', '%s removed', $path); } } return true; @@ -572,7 +563,7 @@ class Folder { * - `skip` Files/directories to skip. * * @param mixed $options Either an array of options (see above) or a string of the destination directory. - * @return bool Success + * @return boolean Success */ public function copy($options = array()) { if (!$this->pwd()) { @@ -590,7 +581,7 @@ class Folder { $mode = $options['mode']; if (!$this->cd($fromDir)) { - $this->__errors[] = __d('cake_dev', '%s not found', $fromDir); + $this->_errors[] = __d('cake_dev', '%s not found', $fromDir); return false; } @@ -599,7 +590,7 @@ class Folder { } if (!is_writable($toDir)) { - $this->__errors[] = __d('cake_dev', '%s not writable', $toDir); + $this->_errors[] = __d('cake_dev', '%s not writable', $toDir); return false; } @@ -613,9 +604,9 @@ class Folder { if (copy($from, $to)) { chmod($to, intval($mode, 8)); touch($to, filemtime($from)); - $this->__messages[] = __d('cake_dev', '%s copied to %s', $from, $to); + $this->_messages[] = __d('cake_dev', '%s copied to %s', $from, $to); } else { - $this->__errors[] = __d('cake_dev', '%s NOT copied to %s', $from, $to); + $this->_errors[] = __d('cake_dev', '%s NOT copied to %s', $from, $to); } } @@ -626,11 +617,11 @@ class Folder { $old = umask(0); chmod($to, $mode); umask($old); - $this->__messages[] = __d('cake_dev', '%s created', $to); + $this->_messages[] = __d('cake_dev', '%s created', $to); $options = array_merge($options, array('to'=> $to, 'from'=> $from)); $this->copy($options); } else { - $this->__errors[] = __d('cake_dev', '%s not created', $to); + $this->_errors[] = __d('cake_dev', '%s not created', $to); } } } @@ -640,7 +631,7 @@ class Folder { return false; } - if (!empty($this->__errors)) { + if (!empty($this->_errors)) { return false; } return true; @@ -684,7 +675,7 @@ class Folder { * @return array */ public function messages() { - return $this->__messages; + return $this->_messages; } /** @@ -693,7 +684,7 @@ class Folder { * @return array */ public function errors() { - return $this->__errors; + return $this->_errors; } /** diff --git a/lib/Cake/Utility/Inflector.php b/lib/Cake/Utility/Inflector.php index 752167789..f18874f6c 100644 --- a/lib/Cake/Utility/Inflector.php +++ b/lib/Cake/Utility/Inflector.php @@ -298,7 +298,6 @@ class Inflector { * @param array $rules Array of rules to be added. * @param boolean $reset If true, will unset default inflections for all * new rules that are being defined in $rules. - * @access public * @return void */ public static function rules($type, $rules, $reset = false) { @@ -342,7 +341,6 @@ class Inflector { * * @param string $word Word in singular * @return string Word in plural - * @access public * @link http://book.cakephp.org/view/1479/Class-methods */ public static function pluralize($word) { @@ -387,7 +385,6 @@ class Inflector { * * @param string $word Word in plural * @return string Word in singular - * @access public * @link http://book.cakephp.org/view/1479/Class-methods */ public static function singularize($word) { @@ -438,9 +435,8 @@ class Inflector { /** * Returns the given lower_case_and_underscored_word as a CamelCased word. * - * @param string $lower_case_and_underscored_word Word to camelize + * @param string $lowerCaseAndUnderscoredWord Word to camelize * @return string Camelized word. LikeThis. - * @access public * @link http://book.cakephp.org/view/1479/Class-methods */ public static function camelize($lowerCaseAndUnderscoredWord) { @@ -456,7 +452,6 @@ class Inflector { * * @param string $camelCasedWord Camel-cased word to be "underscorized" * @return string Underscore-syntaxed version of the $camelCasedWord - * @access public * @link http://book.cakephp.org/view/1479/Class-methods */ public static function underscore($camelCasedWord) { @@ -471,9 +466,8 @@ class Inflector { * Returns the given underscored_word_group as a Human Readable Word Group. * (Underscores are replaced by spaces and capitalized following words.) * - * @param string $lower_case_and_underscored_word String to be made more readable + * @param string $lowerCaseAndUnderscoredWord String to be made more readable * @return string Human-readable string - * @access public * @link http://book.cakephp.org/view/1479/Class-methods */ public static function humanize($lowerCaseAndUnderscoredWord) { @@ -489,7 +483,6 @@ class Inflector { * * @param string $className Name of class to get database table name for * @return string Name of the database table for given class - * @access public * @link http://book.cakephp.org/view/1479/Class-methods */ public static function tableize($className) { @@ -505,7 +498,6 @@ class Inflector { * * @param string $tableName Name of database table to get class name for * @return string Class name - * @access public * @link http://book.cakephp.org/view/1479/Class-methods */ public static function classify($tableName) { @@ -521,7 +513,6 @@ class Inflector { * * @param string $string * @return string in variable form - * @access public * @link http://book.cakephp.org/view/1479/Class-methods */ public static function variable($string) { @@ -540,9 +531,7 @@ class Inflector { * * @param string $string the string you want to slug * @param string $replacement will replace keys in map - * @param array $map extra elements to map to the replacement * @return string - * @access public * @link http://book.cakephp.org/view/1479/Class-methods */ public static function slug($string, $replacement = '_') { diff --git a/lib/Cake/Utility/ObjectCollection.php b/lib/Cake/Utility/ObjectCollection.php index 8ea2980ce..2b6c68510 100644 --- a/lib/Cake/Utility/ObjectCollection.php +++ b/lib/Cake/Utility/ObjectCollection.php @@ -29,7 +29,6 @@ abstract class ObjectCollection { * List of the currently-enabled objects * * @var array - * @access protected */ protected $_enabled = array(); @@ -54,7 +53,7 @@ abstract class ObjectCollection { /** * Trigger a callback method on every object in the collection. - * Used to trigger methods on objects in the collection. Will fire the methods in the + * Used to trigger methods on objects in the collection. Will fire the methods in the * order they were attached. * * ### Options @@ -76,8 +75,8 @@ abstract class ObjectCollection { * Setting modParams to an integer value will allow you to modify the parameter with that index. * Any non-null value will modify the parameter index indicated. * Defaults to false. - * - * + * + * * @param string $callback Method to fire on all the objects. Its assumed all the objects implement * the method you are calling. * @param array $params Array of parameters for the triggered callback. @@ -143,7 +142,7 @@ abstract class ObjectCollection { /** * Provide isset access to _loaded * - * @param sting $name Name of object being checked. + * @param string $name Name of object being checked. * @return boolean */ public function __isset($name) { @@ -226,6 +225,7 @@ abstract class ObjectCollection { * * @param string $name Name of the object * @param Object $object The object to use + * @return array Loaded objects */ public function set($name = null, $object = null) { if (!empty($name) && !empty($object)) { diff --git a/lib/Cake/Utility/Sanitize.php b/lib/Cake/Utility/Sanitize.php index 1c546a2a2..90689850c 100644 --- a/lib/Cake/Utility/Sanitize.php +++ b/lib/Cake/Utility/Sanitize.php @@ -169,13 +169,11 @@ class Sanitize { * * Will remove all ``, `

`, and `

` tags from the $dirty string. * - * @param string $str String to sanitize - * @param string $tag Tag to remove (add more parameters as needed) + * @param string $str,... String to sanitize * @return string sanitized String */ - public static function stripTags() { + public static function stripTags($str) { $params = func_get_args(); - $str = $params[0]; for ($i = 1, $count = count($params); $i < $count; $i++) { $str = preg_replace('/<' . $params[$i] . '\b[^>]*>/i', '', $str); diff --git a/lib/Cake/Utility/Set.php b/lib/Cake/Utility/Set.php index f5527dd58..e949964d0 100644 --- a/lib/Cake/Utility/Set.php +++ b/lib/Cake/Utility/Set.php @@ -59,8 +59,7 @@ class Set { /** * 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 array $var Either an array to filter, or value when in callback * @return mixed Either filtered array, or true/false when in callback */ public static function filter(array $var) { @@ -127,7 +126,7 @@ class Set { if (empty($val)) { return null; } - return Set::__map($val, $class); + return Set::_map($val, $class); } /** @@ -138,12 +137,12 @@ class Set { * returned object (recursively). If $key is numeric will maintain array * structure * - * @param mixed $value Value to map + * @param array $array Array to map * @param string $class Class name * @param boolean $primary whether to assign first array key as the _name_ * @return mixed Mapped object */ - public static function __map(&$array, $class, $primary = false) { + protected static function _map(&$array, $class, $primary = false) { if ($class === true) { $out = new stdClass; } else { @@ -159,7 +158,7 @@ class Set { if (is_object($out)) { $out = get_object_vars($out); } - $out[$key] = Set::__map($value, $class); + $out[$key] = Set::_map($value, $class); if (is_object($out[$key])) { if ($primary !== true && is_array($value) && Set::countDim($value, true) === 2) { if (!isset($out[$key]->_name_)) { @@ -174,18 +173,18 @@ class Set { } $primary = false; foreach ($value as $key2 => $value2) { - $out->{$key2} = Set::__map($value2, true); + $out->{$key2} = Set::_map($value2, true); } } else { if (!is_numeric($key)) { - $out->{$key} = Set::__map($value, true, $key); + $out->{$key} = Set::_map($value, true, $key); if (is_object($out->{$key}) && !is_numeric($key)) { if (!isset($out->{$key}->_name_)) { $out->{$key}->_name_ = $key; } } } else { - $out->{$key} = Set::__map($value, true); + $out->{$key} = Set::_map($value, true); } } } else { @@ -487,6 +486,7 @@ class Set { * @param mixed $conditions An array of condition strings or an XPath expression * @param array $data An array of data to execute the match on * @param integer $i Optional: The 'nth'-number of the item being matched. + * @param integer $length * @return boolean */ public static function matches($conditions, $data = array(), $i = null, $length = null) { @@ -1012,7 +1012,7 @@ class Set { * @param string $key * @return array */ - private static function __flatten($results, $key = null) { + protected static function _flatten($results, $key = null) { $stack = array(); foreach ($results as $k => $r) { $id = $k; @@ -1020,7 +1020,7 @@ class Set { $id = $key; } if (is_array($r) && !empty($r)) { - $stack = array_merge($stack, Set::__flatten($r, $id)); + $stack = array_merge($stack, Set::_flatten($r, $id)); } else { $stack[] = array('id' => $id, 'value' => $r); } @@ -1041,7 +1041,7 @@ class Set { if (is_numeric(implode('', $originalKeys))) { $data = array_values($data); } - $result = Set::__flatten(Set::extract($data, $path)); + $result = Set::_flatten(Set::extract($data, $path)); list($keys, $values) = array(Set::extract($result, '{n}.id'), Set::extract($result, '{n}.value')); $dir = strtolower($dir); diff --git a/lib/Cake/Utility/Validation.php b/lib/Cake/Utility/Validation.php index 24275b272..2187c054e 100644 --- a/lib/Cake/Utility/Validation.php +++ b/lib/Cake/Utility/Validation.php @@ -36,7 +36,7 @@ class Validation { * * @var array */ - private static $__pattern = array( + protected static $_pattern = array( 'hostname' => '(?:[a-z0-9][-a-z0-9]*\.)*(?:[a-z0-9][-a-z0-9]{0,62})\.(?:(?:[a-z]{2}\.)?[a-z]{2,4}|museum|travel)' ); @@ -318,7 +318,7 @@ class Validation { /** * Validates a datetime value * All values matching the "date" core validation rule, and the "time" one will be valid - * + * * @param array $check Value to check * @param mixed $dateFormat Format of the date part * Use a string or an array of the keys below. Arrays should be passed as array('dmy', 'mdy', etc) @@ -336,7 +336,7 @@ class Validation { * @see Validation::date * @see Validation::time */ - function datetime($check, $dateFormat = 'ymd', $regex = null) { + public function datetime($check, $dateFormat = 'ymd', $regex = null) { $valid = false; $parts = explode(' ', $check); if (!empty($parts) && count($parts) > 1) { @@ -407,14 +407,14 @@ class Validation { } if (is_null($regex)) { - $regex = '/^[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+)*@' . self::$__pattern['hostname'] . '$/i'; + $regex = '/^[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&\'*+\/=?^_`{|}~-]+)*@' . self::$_pattern['hostname'] . '$/i'; } $return = self::_check($check, $regex); if ($deep === false || $deep === null) { return $return; } - if ($return === true && preg_match('/@(' . self::$__pattern['hostname'] . ')$/i', $check, $regs)) { + if ($return === true && preg_match('/@(' . self::$_pattern['hostname'] . ')$/i', $check, $regs)) { if (function_exists('getmxrr') && getmxrr($regs[1], $mxhosts)) { return true; } @@ -462,7 +462,7 @@ class Validation { * Validation of an IP address. * * @param string $check The string to test. - * @param string $ipVersion The IP Protocol version to validate against + * @param string $type The IP Protocol version to validate against * @return boolean Success */ public static function ip($check, $type = 'both') { @@ -697,14 +697,13 @@ class Validation { * * @param string $check Value to check * @param boolean $strict Require URL to be prefixed by a valid scheme (one of http(s)/ftp(s)/file/news/gopher) - * @param string $ipVersion The IP Protocol version to validate against * @return boolean Success */ public static function url($check, $strict = false) { - self::__populateIp(); + self::_populateIp(); $validChars = '([' . preg_quote('!"$&\'()*+,-.@_:;=~[]') . '\/0-9a-z\p{L}\p{N}]|(%[0-9a-f]{2}))'; $regex = '/^(?:(?:https?|ftps?|file|news|gopher):\/\/)' . (!empty($strict) ? '' : '?') . - '(?:' . self::$__pattern['IPv4'] . '|\[' . self::$__pattern['IPv6'] . '\]|' . self::$__pattern['hostname'] . ')(?::[1-9][0-9]{0,4})?' . + '(?:' . self::$_pattern['IPv4'] . '|\[' . self::$_pattern['IPv6'] . '\]|' . self::$_pattern['hostname'] . ')(?::[1-9][0-9]{0,4})?' . '(?:\/?|\/' . $validChars . '*)?' . '(?:\?' . $validChars . '*)?' . '(?:#' . $validChars . '*)?$/iu'; @@ -740,7 +739,6 @@ class Validation { * * @param string $check Value to check * @return boolean Success - * @access public */ public static function uuid($check) { $regex = '/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i'; @@ -796,7 +794,7 @@ class Validation { * @return void */ protected static function _defaults($params) { - self::__reset(); + self::_reset(); $defaults = array( 'check' => null, 'regex' => null, @@ -814,8 +812,10 @@ class Validation { /** * Luhn algorithm * - * @see http://en.wikipedia.org/wiki/Luhn_algorithm + * @param string|array $check + * @param boolean $deep * @return boolean Success + * @see http://en.wikipedia.org/wiki/Luhn_algorithm */ public static function luhn($check, $deep = false) { if (is_array($check)) { @@ -847,8 +847,8 @@ class Validation { * * @return void */ - private static function __populateIp() { - if (!isset(self::$__pattern['IPv6'])) { + protected static function _populateIp() { + if (!isset(self::$_pattern['IPv6'])) { $pattern = '((([0-9A-Fa-f]{1,4}:){7}(([0-9A-Fa-f]{1,4})|:))|(([0-9A-Fa-f]{1,4}:){6}'; $pattern .= '(:|((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})'; $pattern .= '|(:[0-9A-Fa-f]{1,4})))|(([0-9A-Fa-f]{1,4}:){5}((:((25[0-5]|2[0-4]\d|[01]?\d{1,2})'; @@ -864,11 +864,11 @@ class Validation { $pattern .= '\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})?)|((:[0-9A-Fa-f]{1,4})'; $pattern .= '{1,2})))|(((25[0-5]|2[0-4]\d|[01]?\d{1,2})(\.(25[0-5]|2[0-4]\d|[01]?\d{1,2})){3})))(%.+)?'; - self::$__pattern['IPv6'] = $pattern; + self::$_pattern['IPv6'] = $pattern; } - if (!isset(self::$__pattern['IPv4'])) { + if (!isset(self::$_pattern['IPv4'])) { $pattern = '(?:(?:25[0-5]|2[0-4][0-9]|(?:(?:1[0-9])?|[1-9]?)[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|(?:(?:1[0-9])?|[1-9]?)[0-9])'; - self::$__pattern['IPv4'] = $pattern; + self::$_pattern['IPv4'] = $pattern; } } @@ -877,7 +877,7 @@ class Validation { * * @return void */ - private static function __reset() { + protected static function _reset() { self::$errors = array(); } } diff --git a/lib/Cake/Utility/Xml.php b/lib/Cake/Utility/Xml.php index abb3c0053..965d0516f 100644 --- a/lib/Cake/Utility/Xml.php +++ b/lib/Cake/Utility/Xml.php @@ -61,7 +61,7 @@ class Xml { * ); * $xml = Xml::build($value); * }}} - * + * * When building XML from an array ensure that there is only one top level element. * * ### Options @@ -71,7 +71,7 @@ class Xml { * * @param mixed $input XML string, a path to a file, an URL or an array * @param array $options The options to use - * @return object SimpleXMLElement or DOMDocument + * @return SimpleXMLElement|DOMDocument SimpleXMLElement or DOMDocument * @throws XmlException */ public static function build($input, $options = array()) { @@ -116,7 +116,7 @@ class Xml { * - `return` If return object of SimpleXMLElement ('simplexml') or DOMDocument ('domdocument'). Default is SimpleXMLElement. * * Using the following data: - * + * * {{{ * $value = array( * 'root' => array( @@ -139,7 +139,7 @@ class Xml { * * @param array $input Array with data * @param array $options The options to use - * @return object SimpleXMLElement or DOMDocument + * @return SimpleXMLElement|DOMDocument SimpleXMLElement or DOMDocument * @throws XmlException */ public static function fromArray($input, $options = array()) { @@ -175,11 +175,12 @@ class Xml { /** * Recursive method to create childs from array * - * @param object $dom Handler to DOMDocument - * @param object $node Handler to DOMElement (child) + * @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 string $format Either 'attribute' or 'tags'. This determines where nested keys go. * @return void + * @throws XmlException */ protected static function _fromArray($dom, $node, &$data, $format) { if (empty($data) || !is_array($data)) { @@ -217,10 +218,10 @@ class Xml { foreach ($value as $item) { $data = compact('dom', 'node', 'key', 'format'); $data['value'] = $item; - self::__createChild($data); + self::_createChild($data); } } else { // Struct - self::__createChild(compact('dom', 'node', 'key', 'value', 'format')); + self::_createChild(compact('dom', 'node', 'key', 'value', 'format')); } } } else { @@ -235,7 +236,7 @@ class Xml { * @param array $data Array with informations to create childs * @return void */ - private static function __createChild($data) { + protected static function _createChild($data) { extract($data); $childNS = $childValue = null; if (is_array($value)) { @@ -267,7 +268,7 @@ class Xml { /** * Returns this XML structure as a array. * - * @param object $obj SimpleXMLElement, DOMDocument or DOMNode instance + * @param SimpleXMLElement|DOMDocument|DOMNode $obj SimpleXMLElement, DOMDocument or DOMNode instance * @return array Array representation of the XML structure. * @throws XmlException */ @@ -287,7 +288,7 @@ class Xml { /** * Recursive method to toArray * - * @param object $xml SimpleXMLElement object + * @param SimpleXMLElement $xml SimpleXMLElement object * @param array $parentData Parent array with data * @param string $ns Namespace of current child * @param array $namespaces List of namespaces in XML diff --git a/lib/Cake/View/Helper.php b/lib/Cake/View/Helper.php index 8dee5cd99..112f2c490 100644 --- a/lib/Cake/View/Helper.php +++ b/lib/Cake/View/Helper.php @@ -67,7 +67,6 @@ class Helper extends Object { /** * Holds tag templates. * - * @access public * @var array */ public $tags = array(); @@ -75,18 +74,16 @@ class Helper extends Object { /** * Holds the content to be cleaned. * - * @access private * @var mixed */ - private $__tainted = null; + protected $_tainted = null; /** * Holds the cleaned content. * - * @access private * @var mixed */ - private $__cleaned = null; + protected $_cleaned = null; /** * The View instance this helper is attached to @@ -149,6 +146,7 @@ class Helper extends Object { * * @param string $method Method to invoke * @param array $params Array of params for the method. + * @return void */ public function __call($method, $params) { trigger_error(__d('cake_dev', 'Method %1$s::%2$s does not exist', get_class($this), $method), E_USER_WARNING); @@ -184,7 +182,9 @@ class Helper extends Object { /** * Provides backwards compatiblity access for setting values to the request object. * - * @return void + * @param string $name Name of the property being accessed. + * @param mixed $value + * @return mixed Return the $value */ public function __set($name, $value) { switch ($name) { @@ -292,10 +292,10 @@ class Helper extends Object { * content is the best way to prevent all possible attacks. * * @param mixed $output Either an array of strings to clean or a single string to clean. - * @return cleaned content for output + * @return string|array cleaned content for output */ public function clean($output) { - $this->__reset(); + $this->_reset(); if (empty($output)) { return null; } @@ -305,9 +305,9 @@ class Helper extends Object { } return $return; } - $this->__tainted = $output; - $this->__clean(); - return $this->__cleaned; + $this->_tainted = $output; + $this->_clean(); + return $this->_cleaned; } /** @@ -348,6 +348,7 @@ class Helper extends Object { * @param string $insertBefore String to be inserted before options. * @param string $insertAfter String to be inserted after options. * @return string Composed attributes. + * @deprecated This method has been moved to HtmlHelper */ protected function _parseAttributes($options, $exclude = null, $insertBefore = ' ', $insertAfter = null) { if (!is_string($options)) { @@ -379,7 +380,9 @@ class Helper extends Object { * * @param string $key The name of the attribute to create * @param string $value The value of the attribute to create. + * @param boolean $escape Define if the value must be escaped * @return string The composed attribute. + * @deprecated This method has been moved to HtmlHelper */ protected function _formatAttribute($key, $value, $escape = true) { $attribute = ''; @@ -454,7 +457,7 @@ class Helper extends Object { // habtm models are special if ( - isset($this->fieldset[$this->_modelScope]['fields'][$parts[0]]['type']) && + isset($this->fieldset[$this->_modelScope]['fields'][$parts[0]]['type']) && $this->fieldset[$this->_modelScope]['fields'][$parts[0]]['type'] === 'multiple' ) { $entity = $parts[0] . '.' . $parts[0]; @@ -542,7 +545,6 @@ class Helper extends Object { * @param string $key The name of the attribute to be set, defaults to 'name' * @return mixed If an array was given for $options, an array with $key set will be returned. * If a string was supplied a string will be returned. - * @access protected * @todo Refactor this method to not have as many input/output options. */ protected function _name($options = array(), $field = null, $key = 'name') { @@ -587,7 +589,6 @@ class Helper extends Object { * @param string $key The name of the attribute to be set, defaults to 'value' * @return mixed If an array was given for $options, an array with $key set will be returned. * If a string was supplied a string will be returned. - * @access public * @todo Refactor this method to not have as many input/output options. */ public function value($options = array(), $field = null, $key = 'value') { @@ -619,7 +620,7 @@ class Helper extends Object { } elseif (empty($result) && isset($data[$habtmKey]) && is_array($data[$habtmKey])) { if (ClassRegistry::isKeySet($habtmKey)) { $model = ClassRegistry::getObject($habtmKey); - $result = $this->__selectedArray($data[$habtmKey], $model->primaryKey); + $result = $this->_selectedArray($data[$habtmKey], $model->primaryKey); } } @@ -743,9 +744,8 @@ class Helper extends Object { * @param mixed $data * @param string $key * @return array - * @access private */ - private function __selectedArray($data, $key = 'id') { + protected function _selectedArray($data, $key = 'id') { if (!is_array($data)) { $model = $data; if (!empty($this->request->data[$model][$model])) { @@ -770,43 +770,41 @@ class Helper extends Object { * Resets the vars used by Helper::clean() to null * * @return void - * @access private */ - private function __reset() { - $this->__tainted = null; - $this->__cleaned = null; + protected function _reset() { + $this->_tainted = null; + $this->_cleaned = null; } /** * Removes harmful content from output * * @return void - * @access private */ - private function __clean() { + protected function _clean() { if (get_magic_quotes_gpc()) { - $this->__cleaned = stripslashes($this->__tainted); + $this->_cleaned = stripslashes($this->_tainted); } else { - $this->__cleaned = $this->__tainted; + $this->_cleaned = $this->_tainted; } - $this->__cleaned = str_replace(array("&", "<", ">"), array("&amp;", "&lt;", "&gt;"), $this->__cleaned); - $this->__cleaned = preg_replace('#(&\#*\w+)[\x00-\x20]+;#u', "$1;", $this->__cleaned); - $this->__cleaned = preg_replace('#(&\#x*)([0-9A-F]+);*#iu', "$1$2;", $this->__cleaned); - $this->__cleaned = html_entity_decode($this->__cleaned, ENT_COMPAT, "UTF-8"); - $this->__cleaned = preg_replace('#(<[^>]+[\x00-\x20\"\'\/])(on|xmlns)[^>]*>#iUu', "$1>", $this->__cleaned); - $this->__cleaned = preg_replace('#([a-z]*)[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*)[\\x00-\x20]*j[\x00-\x20]*a[\x00-\x20]*v[\x00-\x20]*a[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iUu', '$1=$2nojavascript...', $this->__cleaned); - $this->__cleaned = preg_replace('#([a-z]*)[\x00-\x20]*=([\'\"]*)[\x00-\x20]*v[\x00-\x20]*b[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iUu', '$1=$2novbscript...', $this->__cleaned); - $this->__cleaned = preg_replace('#([a-z]*)[\x00-\x20]*=*([\'\"]*)[\x00-\x20]*-moz-binding[\x00-\x20]*:#iUu','$1=$2nomozbinding...', $this->__cleaned); - $this->__cleaned = preg_replace('#([a-z]*)[\x00-\x20]*=([\'\"]*)[\x00-\x20]*data[\x00-\x20]*:#Uu', '$1=$2nodata...', $this->__cleaned); - $this->__cleaned = preg_replace('#(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*).*expression[\x00-\x20]*\([^>]*>#iU', "$1>", $this->__cleaned); - $this->__cleaned = preg_replace('#(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*).*behaviour[\x00-\x20]*\([^>]*>#iU', "$1>", $this->__cleaned); - $this->__cleaned = preg_replace('#(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*).*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:*[^>]*>#iUu', "$1>", $this->__cleaned); - $this->__cleaned = preg_replace('#]*>#i', "", $this->__cleaned); + $this->_cleaned = str_replace(array("&", "<", ">"), array("&amp;", "&lt;", "&gt;"), $this->_cleaned); + $this->_cleaned = preg_replace('#(&\#*\w+)[\x00-\x20]+;#u', "$1;", $this->_cleaned); + $this->_cleaned = preg_replace('#(&\#x*)([0-9A-F]+);*#iu', "$1$2;", $this->_cleaned); + $this->_cleaned = html_entity_decode($this->_cleaned, ENT_COMPAT, "UTF-8"); + $this->_cleaned = preg_replace('#(<[^>]+[\x00-\x20\"\'\/])(on|xmlns)[^>]*>#iUu', "$1>", $this->_cleaned); + $this->_cleaned = preg_replace('#([a-z]*)[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*)[\\x00-\x20]*j[\x00-\x20]*a[\x00-\x20]*v[\x00-\x20]*a[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iUu', '$1=$2nojavascript...', $this->_cleaned); + $this->_cleaned = preg_replace('#([a-z]*)[\x00-\x20]*=([\'\"]*)[\x00-\x20]*v[\x00-\x20]*b[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iUu', '$1=$2novbscript...', $this->_cleaned); + $this->_cleaned = preg_replace('#([a-z]*)[\x00-\x20]*=*([\'\"]*)[\x00-\x20]*-moz-binding[\x00-\x20]*:#iUu','$1=$2nomozbinding...', $this->_cleaned); + $this->_cleaned = preg_replace('#([a-z]*)[\x00-\x20]*=([\'\"]*)[\x00-\x20]*data[\x00-\x20]*:#Uu', '$1=$2nodata...', $this->_cleaned); + $this->_cleaned = preg_replace('#(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*).*expression[\x00-\x20]*\([^>]*>#iU', "$1>", $this->_cleaned); + $this->_cleaned = preg_replace('#(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*).*behaviour[\x00-\x20]*\([^>]*>#iU', "$1>", $this->_cleaned); + $this->_cleaned = preg_replace('#(<[^>]+)style[\x00-\x20]*=[\x00-\x20]*([\`\'\"]*).*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:*[^>]*>#iUu', "$1>", $this->_cleaned); + $this->_cleaned = preg_replace('#]*>#i', "", $this->_cleaned); do { - $oldstring = $this->__cleaned; - $this->__cleaned = preg_replace('#]*>#i', "", $this->__cleaned); - } while ($oldstring != $this->__cleaned); - $this->__cleaned = str_replace(array("&", "<", ">"), array("&amp;", "&lt;", "&gt;"), $this->__cleaned); + $oldstring = $this->_cleaned; + $this->_cleaned = preg_replace('#]*>#i', "", $this->_cleaned); + } while ($oldstring != $this->_cleaned); + $this->_cleaned = str_replace(array("&", "<", ">"), array("&amp;", "&lt;", "&gt;"), $this->_cleaned); } } diff --git a/lib/Cake/View/Helper/CacheHelper.php b/lib/Cake/View/Helper/CacheHelper.php index 3a8e293f0..7ce4e9a74 100644 --- a/lib/Cake/View/Helper/CacheHelper.php +++ b/lib/Cake/View/Helper/CacheHelper.php @@ -46,9 +46,17 @@ class CacheHelper extends AppHelper { */ protected $_match = array(); +/** + * Counter used for counting nocache section tags. + * + * @var integer + */ + protected $_counter = 0; + /** * Parses the view file and stores content for cache file building. * + * @param string $viewFile * @return void */ public function afterRender($viewFile) { @@ -61,6 +69,7 @@ class CacheHelper extends AppHelper { /** * Parses the layout file and stores content for cache file building. * + * @param string $layoutFile * @return void */ public function afterLayout($layoutFile) { @@ -71,13 +80,6 @@ class CacheHelper extends AppHelper { $this->_View->output = preg_replace('//', '', $this->_View->output); } -/** - * Counter used for counting nocache section tags. - * - * @var integer - */ - protected $_counter = 0; - /** * Main method used to cache a view * @@ -144,6 +146,7 @@ class CacheHelper extends AppHelper { * * @param string $file The filename that needs to be parsed. * @param string $cache The cached content + * @return void */ protected function _parseFile($file, $cache) { if (is_file($file)) { @@ -182,10 +185,9 @@ class CacheHelper extends AppHelper { * Munges the output from a view with cache tags, and numbers the sections. * This helps solve issues with empty/duplicate content. * - * @param string $content The content to munge. * @return string The content with cake:nocache tags replaced. */ - protected function _replaceSection($matches) { + protected function _replaceSection() { $this->_counter += 1; return sprintf('', $this->_counter); } @@ -238,7 +240,8 @@ class CacheHelper extends AppHelper { * Write a cached version of the file * * @param string $content view content to write to a cache file. - * @param sting $timestamp Duration to set for cache file. + * @param string $timestamp Duration to set for cache file. + * @param boolean $useCallbacks * @return boolean success of caching view. */ protected function _writeFile($content, $timestamp, $useCallbacks = false) { diff --git a/lib/Cake/View/Helper/FormHelper.php b/lib/Cake/View/Helper/FormHelper.php index fa6f3320c..46ccf3698 100644 --- a/lib/Cake/View/Helper/FormHelper.php +++ b/lib/Cake/View/Helper/FormHelper.php @@ -27,6 +27,7 @@ App::uses('AppHelper', 'View/Helper'); * Automatic generation of HTML FORMs from given data. * * @package Cake.View.Helper + * @property HtmlHelper $Html * @link http://book.cakephp.org/view/1383/Form */ class FormHelper extends AppHelper { @@ -35,7 +36,6 @@ class FormHelper extends AppHelper { * Other helpers used by FormHelper * * @var array - * @access public */ public $helpers = array('Html'); @@ -43,7 +43,7 @@ class FormHelper extends AppHelper { * Holds the fields array('field_name' => array('type'=> 'string', 'length'=> 100), * primaryKey and validates array('field_name') * - * @access public + * @var array */ public $fieldset = array(); @@ -52,7 +52,7 @@ class FormHelper extends AppHelper { * * @var array */ - private $__options = array( + protected $_options = array( 'day' => array(), 'minute' => array(), 'hour' => array(), 'month' => array(), 'year' => array(), 'meridian' => array() ); @@ -65,7 +65,7 @@ class FormHelper extends AppHelper { public $fields = array(); /** - * Constant used internally to skip the securing process, + * Constant used internally to skip the securing process, * and neither add the field to the hash or to the unlocked fields. * * @var string @@ -76,7 +76,6 @@ class FormHelper extends AppHelper { * Defines the type of form being created. Set by FormHelper::create(). * * @var string - * @access public */ public $requestType = null; @@ -84,7 +83,6 @@ class FormHelper extends AppHelper { * The default model being used for the current form. * * @var string - * @access public */ public $defaultModel = null; @@ -93,7 +91,6 @@ class FormHelper extends AppHelper { * Persistent default options used by input(). Set by FormHelper::create(). * * @var array - * @access protected */ protected $_inputDefaults = array(); @@ -101,7 +98,7 @@ class FormHelper extends AppHelper { * An array of fieldnames that have been excluded from * the Token hash used by SecurityComponent's validatePost method * - * @see FormHelper::__secure() + * @see FormHelper::_secure() * @see SecurityComponent::validatePost() * @var array */ @@ -139,6 +136,7 @@ class FormHelper extends AppHelper { * Guess the location for a model based on its name and tries to create a new instance * or get an already created instance of the model * + * @param string $model * @return Model model instance */ protected function _getModel($model) { @@ -242,7 +240,7 @@ class FormHelper extends AppHelper { if (empty($field)) { return $this->fieldset[$model]['validates']; } else { - return isset($this->fieldset[$model]['validates'][$field]) ? + return isset($this->fieldset[$model]['validates'][$field]) ? $this->fieldset[$model]['validates'] : null; } } @@ -251,6 +249,7 @@ class FormHelper extends AppHelper { /** * Returns if a field is required to be filled based on validation properties from the validating object * + * @param array $validateProperties * @return boolean true if field is required to be filled, false otherwise */ protected function _isRequiredField($validateProperties) { @@ -310,7 +309,6 @@ class FormHelper extends AppHelper { * can be overridden when calling input() * - `encoding` Set the accept-charset encoding for the form. Defaults to `Configure::read('App.encoding')` * - * @access public * @param string $model The model object which the form is being defined for * @param array $options An array of html attributes and options. * @return string An formatted opening FORM tag. @@ -490,7 +488,6 @@ class FormHelper extends AppHelper { * * @param mixed $options as a string will use $options as the value of button, * @return string a closing FORM tag optional submit button. - * @access public * @link http://book.cakephp.org/view/1389/Closing-the-Form */ public function end($options = null) { @@ -594,7 +591,7 @@ class FormHelper extends AppHelper { * @param mixed $value Field value, if value should not be tampered with. * @return void */ - protected function __secure($lock, $field = null, $value = null) { + protected function _secure($lock, $field = null, $value = null) { if (!$field) { $field = $this->entity(); } elseif (is_string($field)) { @@ -627,7 +624,6 @@ class FormHelper extends AppHelper { * * @param string $field This should be "Modelname.fieldname" * @return boolean If there are errors this method returns true, else false. - * @access public * @link http://book.cakephp.org/view/1426/isFieldError */ public function isFieldError($field) { @@ -650,7 +646,6 @@ class FormHelper extends AppHelper { * If array contains `attributes` key it will be used as options for error container * @param array $options Rendering options for
wrapper tag * @return string If there are errors this method returns an error message, otherwise null. - * @access public * @link http://book.cakephp.org/view/1423/error */ public function error($field, $text = null, $options = array()) { @@ -893,7 +888,6 @@ class FormHelper extends AppHelper { * @param string $fieldName This should be "Modelname.fieldname" * @param array $options Each type of input takes different options. * @return string Completed form widget. - * @access public * @link http://book.cakephp.org/view/1390/Automagic-Form-Elements */ public function input($fieldName, $options = array()) { @@ -940,7 +934,7 @@ class FormHelper extends AppHelper { $options['type'] = 'hidden'; } if ( - $options['type'] === 'number' && + $options['type'] === 'number' && $type === 'float' && !isset($options['step']) ) { @@ -1126,7 +1120,7 @@ class FormHelper extends AppHelper { * @param string $name The name of the option to pull out. * @param array $options The array of options you want to extract. * @param mixed $default The default option value - * @return the contents of the option or default + * @return mixed the contents of the option or default */ protected function _extractOption($name, $options, $default = null) { if (array_key_exists($name, $options)) { @@ -1138,6 +1132,8 @@ class FormHelper extends AppHelper { /** * Generate a label for an input() call. * + * @param string $fieldName + * @param string $label * @param array $options Options for the label element. * @return string Generated label element */ @@ -1195,7 +1191,6 @@ class FormHelper extends AppHelper { * @param string $fieldName Name of a field, like this "Modelname.fieldname" * @param array $options Array of HTML attributes. * @return string An HTML text input element. - * @access public * @link http://book.cakephp.org/view/1414/checkbox */ public function checkbox($fieldName, $options = array()) { @@ -1250,7 +1245,6 @@ class FormHelper extends AppHelper { * @param array $options Radio button options array. * @param array $attributes Array of HTML attributes, and special attributes above. * @return string Completed radio widget set. - * @access public * @link http://book.cakephp.org/view/1429/radio */ public function radio($fieldName, $options = array(), $attributes = array()) { @@ -1377,7 +1371,6 @@ class FormHelper extends AppHelper { * @param string $fieldName Name of a field, in the form "Modelname.fieldname" * @param array $options Array of HTML attributes, and special options above. * @return string A generated HTML text input element - * @access public * @link http://book.cakephp.org/view/1433/textarea */ public function textarea($fieldName, $options = array()) { @@ -1400,7 +1393,6 @@ class FormHelper extends AppHelper { * @param string $fieldName Name of a field, in the form of "Modelname.fieldname" * @param array $options Array of HTML attributes. * @return string A generated hidden input - * @access public * @link http://book.cakephp.org/view/1425/hidden */ public function hidden($fieldName, $options = array()) { @@ -1415,7 +1407,7 @@ class FormHelper extends AppHelper { )); if ($secure && $secure !== self::SECURE_SKIP) { - $this->__secure(true, null, '' . $options['value']); + $this->_secure(true, null, '' . $options['value']); } return $this->Html->useTag('hidden', $options['name'], array_diff_key($options, array('name' => ''))); @@ -1427,7 +1419,6 @@ class FormHelper extends AppHelper { * @param string $fieldName Name of a field, in the form "Modelname.fieldname" * @param array $options Array of HTML attributes. * @return string A generated file input. - * @access public * @link http://book.cakephp.org/view/1424/file */ public function file($fieldName, $options = array()) { @@ -1439,7 +1430,7 @@ class FormHelper extends AppHelper { $field = $this->entity(); foreach (array('name', 'type', 'tmp_name', 'error', 'size') as $suffix) { - $this->__secure($secure, array_merge($field, array($suffix))); + $this->_secure($secure, array_merge($field, array($suffix))); } return $this->Html->useTag('file', $options['name'], array_diff_key($options, array('name' => ''))); @@ -1456,7 +1447,6 @@ class FormHelper extends AppHelper { * @param string $title The button's caption. Not automatically HTML encoded * @param array $options Array of options and HTML attributes. * @return string A HTML button tag. - * @access public * @link http://book.cakephp.org/view/1415/button */ public function button($title, $options = array()) { @@ -1465,7 +1455,7 @@ class FormHelper extends AppHelper { $title = h($title); } if (isset($options['name'])) { - $this->__secure($options['secure'], $options['name']); + $this->_secure($options['secure'], $options['name']); } return $this->Html->useTag('button', $options['type'], array_diff_key($options, array('type' => '')), $title); } @@ -1500,7 +1490,7 @@ class FormHelper extends AppHelper { } /** - * Creates an HTML link, but access the url using method POST. + * Creates an HTML link, but access the url using method POST. * Requires javascript to be enabled in browser. * * This method creates a `
` element. So do not use this method inside an existing form. @@ -1582,7 +1572,6 @@ class FormHelper extends AppHelper { * OR if the first character is not /, image is relative to webroot/img. * @param array $options Array of options. See above. * @return string A HTML submit button - * @access public * @link http://book.cakephp.org/view/1431/submit */ public function submit($caption = null, $options = array()) { @@ -1610,7 +1599,7 @@ class FormHelper extends AppHelper { } if (isset($options['name'])) { - $this->__secure($options['secure'], $options['name']); + $this->_secure($options['secure'], $options['name']); } unset($options['secure']); @@ -1688,7 +1677,6 @@ class FormHelper extends AppHelper { * SELECT element * @param array $attributes The HTML attributes of the select element. * @return string Formatted SELECT element - * @access public * @link http://book.cakephp.org/view/1430/select */ public function select($fieldName, $options = array(), $attributes = array()) { @@ -1716,8 +1704,8 @@ class FormHelper extends AppHelper { (array)$attributes, array('secure' => self::SECURE_SKIP) )); - if (is_string($options) && isset($this->__options[$options])) { - $options = $this->__generateOptions($options); + if (is_string($options) && isset($this->_options[$options])) { + $options = $this->_generateOptions($options); } elseif (!is_array($options)) { $options = array(); } @@ -1748,7 +1736,7 @@ class FormHelper extends AppHelper { if (!empty($tag) || isset($template)) { if (!isset($secure) || $secure == true) { - $this->__secure(true); + $this->_secure(true); } $select[] = $this->Html->useTag($tag, $attributes['name'], array_diff_key($attributes, array('name' => '', 'value' => ''))); } @@ -1770,7 +1758,7 @@ class FormHelper extends AppHelper { $attributes['id'] = Inflector::camelize($attributes['id']); } - $select = array_merge($select, $this->__selectOptions( + $select = array_merge($select, $this->_selectOptions( array_reverse($options, true), array(), $showParents, @@ -1801,19 +1789,18 @@ class FormHelper extends AppHelper { * @param string $fieldName Prefix name for the SELECT element * @param array $attributes HTML attributes for the select element * @return string A generated day select box. - * @access public * @link http://book.cakephp.org/view/1419/day */ public function day($fieldName = null, $attributes = array()) { $attributes += array('empty' => true, 'value' => null); - $attributes = $this->__dateTimeSelected('day', $fieldName, $attributes); + $attributes = $this->_dateTimeSelected('day', $fieldName, $attributes); if (strlen($attributes['value']) > 2) { $attributes['value'] = date('d', strtotime($attributes['value'])); } elseif ($attributes['value'] === false) { $attributes['value'] = null; } - return $this->select($fieldName . ".day", $this->__generateOptions('day'), $attributes); + return $this->select($fieldName . ".day", $this->_generateOptions('day'), $attributes); } /** @@ -1832,7 +1819,6 @@ class FormHelper extends AppHelper { * @param integer $maxYear Last year in sequence * @param array $attributes Attribute array for the select elements. * @return string Completed year select input - * @access public * @link http://book.cakephp.org/view/1416/year */ public function year($fieldName, $minYear = null, $maxYear = null, $attributes = array()) { @@ -1866,7 +1852,7 @@ class FormHelper extends AppHelper { unset($attributes['orderYear']); } return $this->select( - $fieldName . '.year', $this->__generateOptions('year', $yearOptions), + $fieldName . '.year', $this->_generateOptions('year', $yearOptions), $attributes ); } @@ -1885,12 +1871,11 @@ class FormHelper extends AppHelper { * @param string $fieldName Prefix name for the SELECT element * @param array $attributes Attributes for the select element * @return string A generated month select dropdown. - * @access public * @link http://book.cakephp.org/view/1417/month */ public function month($fieldName, $attributes = array()) { $attributes += array('empty' => true, 'value' => null); - $attributes = $this->__dateTimeSelected('month', $fieldName, $attributes); + $attributes = $this->_dateTimeSelected('month', $fieldName, $attributes); if (strlen($attributes['value']) > 2) { $attributes['value'] = date('m', strtotime($attributes['value'])); @@ -1904,7 +1889,7 @@ class FormHelper extends AppHelper { return $this->select( $fieldName . ".month", - $this->__generateOptions('month', array('monthNames' => $monthNames)), + $this->_generateOptions('month', array('monthNames' => $monthNames)), $attributes ); } @@ -1922,12 +1907,11 @@ class FormHelper extends AppHelper { * @param boolean $format24Hours True for 24 hours format * @param array $attributes List of HTML attributes * @return string Completed hour select input - * @access public * @link http://book.cakephp.org/view/1420/hour */ public function hour($fieldName, $format24Hours = false, $attributes = array()) { $attributes += array('empty' => true, 'value' => null); - $attributes = $this->__dateTimeSelected('hour', $fieldName, $attributes); + $attributes = $this->_dateTimeSelected('hour', $fieldName, $attributes); if (strlen($attributes['value']) > 2) { if ($format24Hours) { @@ -1940,7 +1924,7 @@ class FormHelper extends AppHelper { } return $this->select( $fieldName . ".hour", - $this->__generateOptions($format24Hours ? 'hour24' : 'hour'), + $this->_generateOptions($format24Hours ? 'hour24' : 'hour'), $attributes ); } @@ -1957,12 +1941,11 @@ class FormHelper extends AppHelper { * @param string $fieldName Prefix name for the SELECT element * @param string $attributes Array of Attributes * @return string Completed minute select input. - * @access public * @link http://book.cakephp.org/view/1421/minute */ public function minute($fieldName, $attributes = array()) { $attributes += array('empty' => true, 'value' => null); - $attributes = $this->__dateTimeSelected('min', $fieldName, $attributes); + $attributes = $this->_dateTimeSelected('min', $fieldName, $attributes); if (strlen($attributes['value']) > 2) { $attributes['value'] = date('i', strtotime($attributes['value'])); @@ -1976,7 +1959,7 @@ class FormHelper extends AppHelper { unset($attributes['interval']); } return $this->select( - $fieldName . ".min", $this->__generateOptions('minute', $minuteOptions), + $fieldName . ".min", $this->_generateOptions('minute', $minuteOptions), $attributes ); } @@ -1988,9 +1971,8 @@ class FormHelper extends AppHelper { * @param string $fieldName Name of fieldName being generated ex. Model.created * @param array $attributes Array of attributes, must contain 'empty' key. * @return array Attributes array with currently selected value. - * @access private */ - function __dateTimeSelected($select, $fieldName, $attributes) { + protected function _dateTimeSelected($select, $fieldName, $attributes) { if ((empty($attributes['value']) || $attributes['value'] === true) && $value = $this->value($fieldName)) { if (is_array($value) && isset($value[$select])) { $attributes['value'] = $value[$select]; @@ -2018,9 +2000,7 @@ class FormHelper extends AppHelper { * * @param string $fieldName Prefix name for the SELECT element * @param string $attributes Array of Attributes - * @param bool $showEmpty Show/Hide an empty option * @return string Completed meridian select input - * @access public * @link http://book.cakephp.org/view/1422/meridian */ public function meridian($fieldName, $attributes = array()) { @@ -2044,7 +2024,7 @@ class FormHelper extends AppHelper { $attributes['value'] = null; } return $this->select( - $fieldName . ".meridian", $this->__generateOptions('meridian'), + $fieldName . ".meridian", $this->_generateOptions('meridian'), $attributes ); } @@ -2070,7 +2050,6 @@ class FormHelper extends AppHelper { * @param string $timeFormat 12, 24. * @param string $attributes array of Attributes * @return string Generated set of select boxes for the date and time formats chosen. - * @access public * @link http://book.cakephp.org/view/1418/dateTime */ public function dateTime($fieldName, $dateFormat = 'DMY', $timeFormat = '12', $attributes = array()) { @@ -2231,7 +2210,7 @@ class FormHelper extends AppHelper { * @param boolean $setScope Sets the view scope to the model specified in $tagValue * @return void */ - function setEntity($entity, $setScope = false) { + public function setEntity($entity, $setScope = false) { parent::setEntity($entity, $setScope); $parts = explode('.', $entity); $field = $this->_introspectModel($this->_modelScope, 'fields', $parts[0]); @@ -2244,6 +2223,7 @@ class FormHelper extends AppHelper { * Gets the input field name for the current tag * * @param array $options + * @param string $field * @param string $key * @return array */ @@ -2284,10 +2264,14 @@ class FormHelper extends AppHelper { /** * Returns an array of formatted OPTION/OPTGROUP elements - * @access private + * + * @param array $elements + * @param array $parents + * @param boolean $showParents + * @param array $attributes * @return array */ - function __selectOptions($elements = array(), $parents = array(), $showParents = null, $attributes = array()) { + protected function _selectOptions($elements = array(), $parents = array(), $showParents = null, $attributes = array()) { $select = array(); $attributes = array_merge( array('escape' => true, 'style' => null, 'value' => null, 'class' => null), @@ -2307,7 +2291,7 @@ class FormHelper extends AppHelper { } $parents[] = $name; } - $select = array_merge($select, $this->__selectOptions( + $select = array_merge($select, $this->_selectOptions( $title, $parents, $showParents, $attributes )); @@ -2375,9 +2359,12 @@ class FormHelper extends AppHelper { /** * Generates option lists for common