From 72d6ca636f3cdebaeea92ae6a35ac370ba833bfc Mon Sep 17 00:00:00 2001 From: ADmad Date: Thu, 29 Nov 2012 04:00:47 +0530 Subject: [PATCH] Docblock fixes --- lib/Cake/Cache/Cache.php | 2 +- lib/Cake/Cache/Engine/RedisEngine.php | 2 +- lib/Cake/Console/Command/CommandListShell.php | 2 +- lib/Cake/Console/Command/Task/PluginTask.php | 3 ++- lib/Cake/Console/Command/TestShell.php | 2 +- lib/Cake/Console/ConsoleErrorHandler.php | 2 +- lib/Cake/Console/ConsoleOutput.php | 3 ++- lib/Cake/Console/HelpFormatter.php | 2 +- lib/Cake/Console/Shell.php | 10 ++++++- lib/Cake/Controller/Component.php | 2 +- lib/Cake/Controller/Component/Acl/PhpAcl.php | 26 +++++++++++++++++-- .../Component/Auth/FormAuthenticate.php | 2 +- .../Controller/Component/AuthComponent.php | 3 +++ .../Controller/Component/CookieComponent.php | 1 - .../Component/RequestHandlerComponent.php | 2 +- lib/Cake/Controller/ComponentCollection.php | 2 +- lib/Cake/Controller/Controller.php | 9 +++---- lib/Cake/Controller/Scaffold.php | 4 +-- lib/Cake/Error/ExceptionRenderer.php | 1 + lib/Cake/Event/CakeEventManager.php | 1 + lib/Cake/I18n/I18n.php | 8 +++--- lib/Cake/Log/CakeLog.php | 2 +- lib/Cake/Log/Engine/BaseLog.php | 1 + lib/Cake/Model/Behavior/TranslateBehavior.php | 3 ++- lib/Cake/Model/Datasource/DboSource.php | 4 +-- lib/Cake/Model/Model.php | 5 ++-- lib/Cake/Model/ModelValidator.php | 1 - .../Model/Validator/CakeValidationRule.php | 17 +++++++++--- .../Model/Validator/CakeValidationSet.php | 3 +++ lib/Cake/Network/CakeRequest.php | 1 + lib/Cake/Network/CakeResponse.php | 9 ++++--- lib/Cake/Network/Email/AbstractTransport.php | 2 +- lib/Cake/Network/Email/CakeEmail.php | 4 +-- lib/Cake/Routing/Router.php | 2 +- lib/Cake/TestSuite/CakeTestCase.php | 7 +++-- lib/Cake/TestSuite/CakeTestLoader.php | 7 +++-- lib/Cake/TestSuite/CakeTestRunner.php | 5 +++- lib/Cake/TestSuite/CakeTestSuiteCommand.php | 4 ++- lib/Cake/TestSuite/ControllerTestCase.php | 1 + .../TestSuite/Coverage/BaseCoverageReport.php | 2 +- .../TestSuite/Coverage/HtmlCoverageReport.php | 6 +++++ .../TestSuite/Reporter/CakeBaseReporter.php | 15 +++++++++++ .../TestSuite/Reporter/CakeHtmlReporter.php | 3 +++ .../TestSuite/Reporter/CakeTextReporter.php | 5 ++-- lib/Cake/Utility/CakeTime.php | 10 +++++-- lib/Cake/Utility/Hash.php | 2 ++ lib/Cake/Utility/Validation.php | 2 +- lib/Cake/Utility/Xml.php | 2 +- lib/Cake/View/Helper/HtmlHelper.php | 4 +-- lib/Cake/View/Helper/JsBaseEngineHelper.php | 3 +-- lib/Cake/View/Helper/JsHelper.php | 4 +-- lib/Cake/View/Helper/NumberHelper.php | 14 +++++----- lib/Cake/View/Helper/TextHelper.php | 2 ++ lib/Cake/View/Helper/TimeHelper.php | 4 ++- lib/Cake/View/View.php | 19 ++++++++++++-- lib/Cake/View/ViewBlock.php | 1 + 56 files changed, 191 insertions(+), 74 deletions(-) diff --git a/lib/Cake/Cache/Cache.php b/lib/Cake/Cache/Cache.php index 982f5970e..d3aa023a7 100644 --- a/lib/Cake/Cache/Cache.php +++ b/lib/Cake/Cache/Cache.php @@ -108,7 +108,7 @@ class Cache { * @see app/Config/core.php for configuration settings * @param string $name Name of the configuration * @param array $settings Optional associative array of settings passed to the engine - * @return array(engine, settings) on success, false on failure + * @return array array(engine, settings) on success, false on failure * @throws CacheException */ public static function config($name = null, $settings = array()) { diff --git a/lib/Cake/Cache/Engine/RedisEngine.php b/lib/Cake/Cache/Engine/RedisEngine.php index 0d38a0597..71bbdb181 100644 --- a/lib/Cake/Cache/Engine/RedisEngine.php +++ b/lib/Cake/Cache/Engine/RedisEngine.php @@ -213,7 +213,7 @@ class RedisEngine extends CacheEngine { /** * Disconnects from the redis server * - * @return voind + * @return void **/ public function __destruct() { if (!$this->settings['persistent']) { diff --git a/lib/Cake/Console/Command/CommandListShell.php b/lib/Cake/Console/Command/CommandListShell.php index 512349c6e..19a7eb876 100644 --- a/lib/Cake/Console/Command/CommandListShell.php +++ b/lib/Cake/Console/Command/CommandListShell.php @@ -100,7 +100,7 @@ class CommandListShell extends AppShell { * @param string $type * @param array $shells * @param array $shellList - * @return array + * @return void */ protected function _appendShells($type, $shells, &$shellList) { foreach ($shells as $shell) { diff --git a/lib/Cake/Console/Command/Task/PluginTask.php b/lib/Cake/Console/Command/Task/PluginTask.php index 2f972b68d..028db8e91 100644 --- a/lib/Cake/Console/Command/Task/PluginTask.php +++ b/lib/Cake/Console/Command/Task/PluginTask.php @@ -168,6 +168,7 @@ class PluginTask extends AppShell { /** * Update the app's bootstrap.php file. * + * @param string $plugin Name of plugin * @return void */ protected function _modifyBootstrap($plugin) { @@ -184,7 +185,7 @@ class PluginTask extends AppShell { * find and change $this->path to the user selection * * @param array $pathOptions - * @return string plugin path + * @return void */ public function findPath($pathOptions) { $valid = false; diff --git a/lib/Cake/Console/Command/TestShell.php b/lib/Cake/Console/Command/TestShell.php index c96279305..2a8ace55e 100644 --- a/lib/Cake/Console/Command/TestShell.php +++ b/lib/Cake/Console/Command/TestShell.php @@ -338,7 +338,7 @@ class TestShell extends Shell { * @param string $category * @param boolean $throwOnMissingFile * @access protected - * @return array(type, case) + * @return array array(type, case) * @throws Exception */ protected function _mapFileToCase($file, $category, $throwOnMissingFile = true) { diff --git a/lib/Cake/Console/ConsoleErrorHandler.php b/lib/Cake/Console/ConsoleErrorHandler.php index 8941666bf..c523b917a 100644 --- a/lib/Cake/Console/ConsoleErrorHandler.php +++ b/lib/Cake/Console/ConsoleErrorHandler.php @@ -93,7 +93,7 @@ class ConsoleErrorHandler { /** * Wrapper for exit(), used for testing. * - * @param $code int The exit code. + * @param int $code The exit code. */ protected function _stop($code = 0) { exit($code); diff --git a/lib/Cake/Console/ConsoleOutput.php b/lib/Cake/Console/ConsoleOutput.php index 04ceb9a6e..a781e0b9a 100644 --- a/lib/Cake/Console/ConsoleOutput.php +++ b/lib/Cake/Console/ConsoleOutput.php @@ -43,6 +43,7 @@ * @package Cake.Console */ class ConsoleOutput { + /** * Raw output constant - no modification of output text. */ @@ -73,7 +74,7 @@ class ConsoleOutput { /** * The current output type. Manipulated with ConsoleOutput::outputAs(); * - * @var integer. + * @var integer */ protected $_outputAs = self::COLOR; diff --git a/lib/Cake/Console/HelpFormatter.php b/lib/Cake/Console/HelpFormatter.php index 2b495b9e1..6ac43717b 100644 --- a/lib/Cake/Console/HelpFormatter.php +++ b/lib/Cake/Console/HelpFormatter.php @@ -174,7 +174,7 @@ class HelpFormatter { * Get the help as an xml string. * * @param boolean $string Return the SimpleXml object or a string. Defaults to true. - * @return mixed. See $string + * @return string|SimpleXmlElement See $string */ public function xml($string = true) { $parser = $this->_parser; diff --git a/lib/Cake/Console/Shell.php b/lib/Cake/Console/Shell.php index 3872efae8..4813a0682 100644 --- a/lib/Cake/Console/Shell.php +++ b/lib/Cake/Console/Shell.php @@ -31,10 +31,18 @@ App::uses('File', 'Utility'); class Shell extends Object { /** - * Output constants for making verbose and quiet shells. + * Output constant making verbose shells. */ const VERBOSE = 2; + +/** + * Output constant for making normal shells. + */ const NORMAL = 1; + +/** + * Output constants for making quiet shells. + */ const QUIET = 0; /** diff --git a/lib/Cake/Controller/Component.php b/lib/Cake/Controller/Component.php index 42815e534..658db6df8 100644 --- a/lib/Cake/Controller/Component.php +++ b/lib/Cake/Controller/Component.php @@ -156,7 +156,7 @@ class Component extends Object { * @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. + * @return array|void Either an array or null. * @link @link http://book.cakephp.org/2.0/en/controllers/components.html#Component::beforeRedirect */ public function beforeRedirect(Controller $controller, $url, $status = null, $exit = true) { diff --git a/lib/Cake/Controller/Component/Acl/PhpAcl.php b/lib/Cake/Controller/Component/Acl/PhpAcl.php index c3bdeb53b..c7e12cb25 100644 --- a/lib/Cake/Controller/Component/Acl/PhpAcl.php +++ b/lib/Cake/Controller/Component/Acl/PhpAcl.php @@ -25,7 +25,14 @@ */ class PhpAcl extends Object implements AclInterface { +/** + * Constant for deny + */ const DENY = false; + +/** + * Constant for allow + */ const ALLOW = true; /** @@ -206,6 +213,11 @@ class PhpAco { '*' => '.*', ); +/** + * Constructor + * + * @param array $rules Rules array + */ public function __construct(array $rules = array()) { foreach (array('allow', 'deny') as $type) { if (empty($rules[$type])) { @@ -219,6 +231,7 @@ class PhpAco { /** * return path to the requested ACO with allow and deny rules attached on each level * + * @param string $aco ACO string * @return array */ public function path($aco) { @@ -263,6 +276,10 @@ class PhpAco { /** * allow/deny ARO access to ARO * + * @param string $aro ARO string + * @param string $aco ACO string + * @param string $action Action string + * @param string $type access type * @return void */ public function access($aro, $aco, $action, $type = 'deny') { @@ -349,8 +366,6 @@ class PhpAro { /** * role to resolve to when a provided ARO is not listed in * the internal tree - * - * @var string */ const DEFAULT_ROLE = 'Role/default'; @@ -385,6 +400,13 @@ class PhpAro { */ protected $_tree = array(); +/** + * Constructor + * + * @param array $aro + * @param array $map + * @param array $aliases + */ public function __construct(array $aro = array(), array $map = array(), array $aliases = array()) { if (!empty($map)) { $this->map = $map; diff --git a/lib/Cake/Controller/Component/Auth/FormAuthenticate.php b/lib/Cake/Controller/Component/Auth/FormAuthenticate.php index c6bc5a8bf..f2f3c35f1 100644 --- a/lib/Cake/Controller/Component/Auth/FormAuthenticate.php +++ b/lib/Cake/Controller/Component/Auth/FormAuthenticate.php @@ -64,7 +64,7 @@ class FormAuthenticate extends BaseAuthenticate { * * @param CakeRequest $request The request that contains login information. * @param CakeResponse $response Unused response object. - * @return mixed. False on login failure. An array of User data on success. + * @return mixed False on login failure. An array of User data on success. */ public function authenticate(CakeRequest $request, CakeResponse $response) { $userModel = $this->settings['userModel']; diff --git a/lib/Cake/Controller/Component/AuthComponent.php b/lib/Cake/Controller/Component/AuthComponent.php index 5b667bf36..96ac195c7 100644 --- a/lib/Cake/Controller/Component/AuthComponent.php +++ b/lib/Cake/Controller/Component/AuthComponent.php @@ -38,6 +38,9 @@ App::uses('BaseAuthenticate', 'Controller/Component/Auth'); */ class AuthComponent extends Component { +/** + * Constant for 'all' + */ const ALL = 'all'; /** diff --git a/lib/Cake/Controller/Component/CookieComponent.php b/lib/Cake/Controller/Component/CookieComponent.php index 7fd5e9e94..67b154eb7 100644 --- a/lib/Cake/Controller/Component/CookieComponent.php +++ b/lib/Cake/Controller/Component/CookieComponent.php @@ -447,7 +447,6 @@ class CookieComponent extends Component { * Encrypts $value using public $type method in Security class * * @param string $value Value to encrypt - * @return string encrypted string * @return string Encoded values */ protected function _encrypt($value) { diff --git a/lib/Cake/Controller/Component/RequestHandlerComponent.php b/lib/Cake/Controller/Component/RequestHandlerComponent.php index f46ad5571..cfcbf5393 100644 --- a/lib/Cake/Controller/Component/RequestHandlerComponent.php +++ b/lib/Cake/Controller/Component/RequestHandlerComponent.php @@ -748,7 +748,7 @@ class RequestHandlerComponent extends Component { * * @param array|string $type The type string or array with format `array('type' => 'viewClass')` to map one or more * @param array $viewClass The viewClass to be used for the type without `View` appended - * @return array]string Returns viewClass when only string $type is set, else array with viewClassMap + * @return array|string Returns viewClass when only string $type is set, else array with viewClassMap */ public function viewClassMap($type = null, $viewClass = null) { if (!$viewClass && is_string($type) && isset($this->_viewClassMap[$type])) { diff --git a/lib/Cake/Controller/ComponentCollection.php b/lib/Cake/Controller/ComponentCollection.php index 43dca086f..ade39f036 100644 --- a/lib/Cake/Controller/ComponentCollection.php +++ b/lib/Cake/Controller/ComponentCollection.php @@ -56,7 +56,7 @@ class ComponentCollection extends ObjectCollection implements CakeEventListener /** * Get the controller associated with the collection. * - * @return Controller. + * @return Controller Controller instance */ public function getController() { return $this->_Controller; diff --git a/lib/Cake/Controller/Controller.php b/lib/Cake/Controller/Controller.php index a54cfde5e..7fc3500de 100644 --- a/lib/Cake/Controller/Controller.php +++ b/lib/Cake/Controller/Controller.php @@ -745,7 +745,7 @@ class Controller extends Object implements CakeEventListener { * or an absolute URL * @param integer $status Optional HTTP status code (eg: 404) * @param boolean $exit If true, exit() will be called after the redirect - * @return mixed void if $exit = false. Terminates script if $exit = true + * @return void * @link http://book.cakephp.org/2.0/en/controllers.html#Controller::redirect */ public function redirect($url, $status = null, $exit = true) { @@ -853,9 +853,8 @@ class Controller extends Object implements CakeEventListener { * setAction('action_with_parameters', $parameter1); * }}} * - * @param string $action The new action to be 'redirected' to - * @param mixed Any other parameters passed to this method will be passed as - * parameters to the new action. + * @param string $action The new action to be 'redirected' to. + * Any other parameters passed to this method will be passed as parameters to the new action. * @return mixed Returns the return value of the called action */ public function setAction($action) { @@ -997,7 +996,7 @@ class Controller extends Object implements CakeEventListener { * @param string|array $url Relative string or array-based URL to redirect to after the time expires * @param integer $pause Time to show the message * @param string $layout Layout you want to use, defaults to 'flash' - * @return void Renders flash layout + * @return void * @link http://book.cakephp.org/2.0/en/controllers.html#Controller::flash */ public function flash($message, $url, $pause = 1, $layout = 'flash') { diff --git a/lib/Cake/Controller/Scaffold.php b/lib/Cake/Controller/Scaffold.php index 434146eb4..686ce07a3 100644 --- a/lib/Cake/Controller/Scaffold.php +++ b/lib/Cake/Controller/Scaffold.php @@ -199,7 +199,7 @@ class Scaffold { * Renders an add or edit action for scaffolded model. * * @param string $action Action (add or edit) - * @return mixed A rendered view with a form to edit or add a record in the Models database table + * @return void */ protected function _scaffoldForm($action = 'edit') { $this->controller->viewVars['scaffoldFields'] = array_merge( @@ -351,7 +351,7 @@ class Scaffold { * `public $scaffold;` is placed in the controller's class definition. * * @param CakeRequest $request Request object for scaffolding - * @return mixed A rendered view of scaffold action, or showing the error + * @return void * @throws MissingActionException When methods are not scaffolded. * @throws MissingDatabaseException When the database connection is undefined. */ diff --git a/lib/Cake/Error/ExceptionRenderer.php b/lib/Cake/Error/ExceptionRenderer.php index a200cce03..130bee59c 100644 --- a/lib/Cake/Error/ExceptionRenderer.php +++ b/lib/Cake/Error/ExceptionRenderer.php @@ -88,6 +88,7 @@ class ExceptionRenderer { * code error depending on the code used to construct the error. * * @param Exception $exception Exception + * @return mixed Return void or value returned by controller's `appError()` function */ public function __construct(Exception $exception) { $this->controller = $this->_getController($exception); diff --git a/lib/Cake/Event/CakeEventManager.php b/lib/Cake/Event/CakeEventManager.php index fde456a8c..db2846e33 100644 --- a/lib/Cake/Event/CakeEventManager.php +++ b/lib/Cake/Event/CakeEventManager.php @@ -163,6 +163,7 @@ class CakeEventManager { * Removes a listener from the active listeners. * * @param callback|CakeEventListener $callable any valid PHP callback type or an instance of CakeEventListener + * @param string $eventKey The event unique identifier name with which the callback has been associated * @return void */ public function detach($callable, $eventKey = null) { diff --git a/lib/Cake/I18n/I18n.php b/lib/Cake/I18n/I18n.php index 2c05ba359..bc2fcb5f5 100644 --- a/lib/Cake/I18n/I18n.php +++ b/lib/Cake/I18n/I18n.php @@ -17,9 +17,6 @@ * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ -/** - * Included libraries. - */ App::uses('CakePlugin', 'Core'); App::uses('L10n', 'I18n'); App::uses('Multibyte', 'I18n'); @@ -90,6 +87,11 @@ class I18n { 'LC_ALL', 'LC_COLLATE', 'LC_CTYPE', 'LC_MONETARY', 'LC_NUMERIC', 'LC_TIME', 'LC_MESSAGES' ); +/** + * Escape string + * + * @var string + */ protected $_escape = null; /** diff --git a/lib/Cake/Log/CakeLog.php b/lib/Cake/Log/CakeLog.php index 776ea9e6f..7ad294818 100644 --- a/lib/Cake/Log/CakeLog.php +++ b/lib/Cake/Log/CakeLog.php @@ -358,7 +358,7 @@ class CakeLog { * * @see BaseLog * @param string $streamName Key name of a configured stream to get. - * @return $mixed instance of BaseLog or false if not found + * @return mixed instance of BaseLog or false if not found */ public static function stream($streamName) { if (empty(self::$_Collection)) { diff --git a/lib/Cake/Log/Engine/BaseLog.php b/lib/Cake/Log/Engine/BaseLog.php index f731851d4..e25a76482 100644 --- a/lib/Cake/Log/Engine/BaseLog.php +++ b/lib/Cake/Log/Engine/BaseLog.php @@ -36,6 +36,7 @@ abstract class BaseLog implements CakeLogInterface { /** * __construct method * + * @param array $config Configuration array * @return void */ public function __construct($config = array()) { diff --git a/lib/Cake/Model/Behavior/TranslateBehavior.php b/lib/Cake/Model/Behavior/TranslateBehavior.php index 3700446ac..ebd401d30 100644 --- a/lib/Cake/Model/Behavior/TranslateBehavior.php +++ b/lib/Cake/Model/Behavior/TranslateBehavior.php @@ -214,7 +214,6 @@ class TranslateBehavior extends ModelBehavior { * Appends a join for translated fields. * * @param Model $Model The model being worked on. - * @param object $joinTable The jointable object. * @param array $query The query array to append a join to. * @param string $field The field name being joined. * @param string $aliasField The aliased field name being joined. @@ -466,6 +465,7 @@ class TranslateBehavior extends ModelBehavior { * Prepares the data to be saved for translated records. * Add blank fields, and populates data for multi-locale saves. * + * @param Model $Model Model instance * @param array $data The sparse data that was provided. * @return array The fully populated data to save. */ @@ -625,6 +625,7 @@ class TranslateBehavior extends ModelBehavior { /** * Update runtime setting for a given field. * + * @param Model $Model Model instance * @param string $field The field to update. */ protected function _removeField(Model $Model, $field) { diff --git a/lib/Cake/Model/Datasource/DboSource.php b/lib/Cake/Model/Datasource/DboSource.php index 0ebe6163a..aca1e3b3f 100644 --- a/lib/Cake/Model/Datasource/DboSource.php +++ b/lib/Cake/Model/Datasource/DboSource.php @@ -64,7 +64,7 @@ class DboSource extends DataSource { * Whether or not to cache the results of DboSource::name() and DboSource::conditions() * into the memory cache. Set to false to disable the use of the memory cache. * - * @var boolean. + * @var boolean */ public $cacheMethods = true; @@ -2937,7 +2937,7 @@ class DboSource extends DataSource { * * @param string $table The name of the table to update. * @param string $column The column to use when reseting the sequence value. - * @return boolean success. + * @return boolean|void success. */ public function resetSequence($table, $column) { } diff --git a/lib/Cake/Model/Model.php b/lib/Cake/Model/Model.php index 0d8847447..c16ebbd2b 100644 --- a/lib/Cake/Model/Model.php +++ b/lib/Cake/Model/Model.php @@ -2144,8 +2144,7 @@ class Model extends Object implements CakeEventListener { * * @param array $data Record data to validate. This should be a numerically-indexed array * @param array $options Options to use when validating record data (see above), See also $options of validates(). - * @return boolean True on success, or false on failure. - * @return mixed If atomic: True on success, or false on failure. + * @return boolean|array 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. */ @@ -3427,6 +3426,8 @@ class Model extends Object implements CakeEventListener { /** * Retunrs an instance of a model validator for this class * + * @param ModelValidator Model validator instance. + * If null a new ModelValidator instance will be made using current model object * @return ModelValidator */ public function validator($instance = null) { diff --git a/lib/Cake/Model/ModelValidator.php b/lib/Cake/Model/ModelValidator.php index 1a1937939..41b4620e0 100644 --- a/lib/Cake/Model/ModelValidator.php +++ b/lib/Cake/Model/ModelValidator.php @@ -203,7 +203,6 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable { * * @param array $data Record data to validate. This should be a numerically-indexed array * @param array $options Options to use when validating record data (see above), See also $options of validates(). - * @return boolean True on success, or false on failure. * @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. diff --git a/lib/Cake/Model/Validator/CakeValidationRule.php b/lib/Cake/Model/Validator/CakeValidationRule.php index a0c693fb0..97bc32b5a 100644 --- a/lib/Cake/Model/Validator/CakeValidationRule.php +++ b/lib/Cake/Model/Validator/CakeValidationRule.php @@ -158,7 +158,8 @@ class CakeValidationRule { /** * Checks whether the field failed the `field should be present` validation * - * @param array $data data to check rule against + * @param string $field Field name + * @param array $data Data to check rule against * @return boolean */ public function checkRequired($field, &$data) { @@ -174,6 +175,7 @@ class CakeValidationRule { /** * Checks if the allowEmpty key applies * + * @param string $field Field name * @param array $data data to check rule against * @return boolean */ @@ -245,8 +247,9 @@ class CakeValidationRule { * If called with no parameters it will return whether this rule * is configured for update operations or not. * + * @param boolean $exists Boolean to indicate if records exists * @return boolean - **/ + */ public function isUpdate($exists = null) { if ($exists === null) { return $this->_recordExists; @@ -257,6 +260,9 @@ class CakeValidationRule { /** * Dispatches the validation rule to the given validator method * + * @param string $field Field name + * @param array $data Data array + * @param array $methods Methods list * @return boolean True if the rule could be dispatched, false otherwise */ public function process($field, &$data, &$methods) { @@ -286,7 +292,7 @@ class CakeValidationRule { * and it will set isUpdate() to false * * @return void - **/ + */ public function reset() { $this->_valid = true; $this->_recordExists = false; @@ -295,8 +301,9 @@ class CakeValidationRule { /** * Returns passed options for this rule * + * @param string|integer $key Array index * @return array - **/ + */ public function getOptions($key) { if (!isset($this->_passedOptions[$key])) { return null; @@ -328,6 +335,8 @@ class CakeValidationRule { /** * Parses the rule and sets the rule and ruleParams * + * @param string $field Field name + * @param array $data Data array * @return void */ protected function _parseRule($field, &$data) { diff --git a/lib/Cake/Model/Validator/CakeValidationSet.php b/lib/Cake/Model/Validator/CakeValidationSet.php index 4ada8bd27..373e1f510 100644 --- a/lib/Cake/Model/Validator/CakeValidationSet.php +++ b/lib/Cake/Model/Validator/CakeValidationSet.php @@ -94,6 +94,7 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable { /** * Sets the list of methods to use for validation * + * @param array $methods Methods list * @return void **/ public function setMethods(&$methods) { @@ -114,6 +115,8 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable { * Runs all validation rules in this set and returns a list of * validation errors * + * @param array $data Data array + * @param boolean $isUpdate Is record being updated or created * @return array list of validation errors for this field */ public function validate($data, $isUpdate = false) { diff --git a/lib/Cake/Network/CakeRequest.php b/lib/Cake/Network/CakeRequest.php index 426906135..8aa3343fc 100644 --- a/lib/Cake/Network/CakeRequest.php +++ b/lib/Cake/Network/CakeRequest.php @@ -764,6 +764,7 @@ class CakeRequest implements ArrayAccess { * Provides a read accessor for `$this->query`. Allows you * to use a syntax similar to `CakeSession` for reading url query data. * + * @param string $name Query string variable name * @return mixed The value being read */ public function query($name) { diff --git a/lib/Cake/Network/CakeResponse.php b/lib/Cake/Network/CakeResponse.php index 90b3ee170..71dea84fa 100644 --- a/lib/Cake/Network/CakeResponse.php +++ b/lib/Cake/Network/CakeResponse.php @@ -1057,7 +1057,8 @@ class CakeResponse { * Sets the protocol to be used when sending the response. Defaults to HTTP/1.1 * If called with no arguments, it will return the current configured protocol * - * @return string protocol to be used for sending response + * @param string protocol to be used for sending response + * @return string protocol currently set */ public function protocol($protocol = null) { if ($protocol !== null) { @@ -1070,7 +1071,8 @@ class CakeResponse { * Sets the Content-Length header for the response * If called with no arguments returns the last Content-Length set * - * @return int + * @param integer $bytes Number of bytes + * @return integer|null */ public function length($bytes = null) { if ($bytes !== null) { @@ -1092,6 +1094,7 @@ class CakeResponse { * the Last-Modified etag response header before calling this method. Otherwise * a comparison will not be possible. * + * @param CakeRequest $request Request object * @return boolean whether the response was marked as not modified or not. */ public function checkNotModified(CakeRequest $request) { @@ -1136,7 +1139,7 @@ class CakeResponse { * If the method is called with an array as argument, it will set the cookie * configuration to the cookie container. * - * @param $options Either null to get all cookies, string for a specific cookie + * @param array $options Either null to get all cookies, string for a specific cookie * or array to set cookie. * * ### Options (when setting a configuration) diff --git a/lib/Cake/Network/Email/AbstractTransport.php b/lib/Cake/Network/Email/AbstractTransport.php index 401d51152..9355f3f12 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 CakeEmail $email + * @param CakeEmail $email * @return array */ abstract public function send(CakeEmail $email); diff --git a/lib/Cake/Network/Email/CakeEmail.php b/lib/Cake/Network/Email/CakeEmail.php index 8f53cd217..c081966b2 100644 --- a/lib/Cake/Network/Email/CakeEmail.php +++ b/lib/Cake/Network/Email/CakeEmail.php @@ -33,6 +33,7 @@ App::import('I18n', 'Multibyte'); * @package Cake.Network.Email */ class CakeEmail { + /** * Default X-Mailer * @@ -85,7 +86,7 @@ class CakeEmail { /** * The sender email * - * @var array(); + * @var array */ protected $_sender = array(); @@ -1109,7 +1110,6 @@ class CakeEmail { /** * Apply the config to an instance * - * @param CakeEmail $obj CakeEmail * @param array $config * @return void * @throws ConfigureException When configuration file cannot be found, or is missing diff --git a/lib/Cake/Routing/Router.php b/lib/Cake/Routing/Router.php index ae76a5344..801e88e7a 100644 --- a/lib/Cake/Routing/Router.php +++ b/lib/Cake/Routing/Router.php @@ -184,7 +184,7 @@ class Router { /** * Validates that the passed route class exists and is a subclass of CakeRoute * - * @param $routeClass + * @param string $routeClass Route class name * @return string * @throws RouterException */ diff --git a/lib/Cake/TestSuite/CakeTestCase.php b/lib/Cake/TestSuite/CakeTestCase.php index a84e92449..c49704f27 100644 --- a/lib/Cake/TestSuite/CakeTestCase.php +++ b/lib/Cake/TestSuite/CakeTestCase.php @@ -170,7 +170,6 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase { /** * Announces the start of a test. * - * @param string $method Test method just started. * @return void */ protected function assertPreConditions() { @@ -181,7 +180,6 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase { /** * Announces the end of a test. * - * @param string $method Test method just finished. * @return void */ protected function assertPostConditions() { @@ -496,6 +494,7 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase { * Generates all permutation of an array $items and returns them in a new array. * * @param array $items An array of items + * @param array $perms * @return array */ protected function _arrayPermute($items, $perms = array()) { @@ -594,6 +593,9 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase { return self::assertNotRegExp($pattern, $string, $message); } +/** + * assert no errors + */ protected function assertNoErrors() { } @@ -681,6 +683,7 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase { * * @param string $model * @param mixed $methods + * @param mixed $config * @return Model */ public function getMockForModel($model, $methods = array(), $config = null) { diff --git a/lib/Cake/TestSuite/CakeTestLoader.php b/lib/Cake/TestSuite/CakeTestLoader.php index 83a3607dd..32d74e1ca 100644 --- a/lib/Cake/TestSuite/CakeTestLoader.php +++ b/lib/Cake/TestSuite/CakeTestLoader.php @@ -43,6 +43,8 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader { /** * Convert path fragments used by Cake's test runner to absolute paths that can be fed to PHPUnit. * + * @param string $filePath + * @param string $params * @return void */ protected function _resolveTestFile($filePath, $params) { @@ -80,7 +82,8 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader { /** * Get the list of files for the test listing. * - * @return void + * @param string $params + * @return array */ public static function generateTestList($params) { $directory = self::_basePath($params); @@ -101,7 +104,7 @@ class CakeTestLoader extends PHPUnit_Runner_StandardTestSuiteLoader { * a given fileTestFunction, like isTestCaseFile() * * @param string $directory The directory to scan for files. - * @param mixed $fileTestFunction + * @return array */ protected static function _getRecursiveFileList($directory = '.') { $fileList = array(); diff --git a/lib/Cake/TestSuite/CakeTestRunner.php b/lib/Cake/TestSuite/CakeTestRunner.php index ad96c9783..e007fbf20 100644 --- a/lib/Cake/TestSuite/CakeTestRunner.php +++ b/lib/Cake/TestSuite/CakeTestRunner.php @@ -29,6 +29,8 @@ class CakeTestRunner extends PHPUnit_TextUI_TestRunner { /** * Lets us pass in some options needed for cake's webrunner. * + * @param mixed $loader + * @param array $params list of options to be used for this run * @return void */ public function __construct($loader, $params) { @@ -84,7 +86,8 @@ class CakeTestRunner extends PHPUnit_TextUI_TestRunner { /** * Get the fixture manager class specified or use the default one. * - * @return instance of a fixture manager. + * @param array $arguments + * @return mixed instance of a fixture manager. * @throws RuntimeException When fixture manager class cannot be loaded. */ protected function _getFixtureManager($arguments) { diff --git a/lib/Cake/TestSuite/CakeTestSuiteCommand.php b/lib/Cake/TestSuite/CakeTestSuiteCommand.php index 7c9793180..a649705b9 100644 --- a/lib/Cake/TestSuite/CakeTestSuiteCommand.php +++ b/lib/Cake/TestSuite/CakeTestSuiteCommand.php @@ -36,6 +36,7 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command { /** * Construct method * + * @param mixed $loader * @param array $params list of options to be used for this run * @throws MissingTestLoaderException When a loader class could not be found. */ @@ -129,7 +130,7 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command { /** * Create a runner for the command. * - * @param $loader The loader to be used for the test run. + * @param mixed $loader The loader to be used for the test run. * @return CakeTestRunner */ public function getRunner($loader) { @@ -149,6 +150,7 @@ class CakeTestSuiteCommand extends PHPUnit_TextUI_Command { /** * Handles output flag used to change printing on webrunner. * + * @param string $reporter * @return void */ public function handleReporter($reporter) { diff --git a/lib/Cake/TestSuite/ControllerTestCase.php b/lib/Cake/TestSuite/ControllerTestCase.php index 28412b43b..e079bd94f 100644 --- a/lib/Cake/TestSuite/ControllerTestCase.php +++ b/lib/Cake/TestSuite/ControllerTestCase.php @@ -210,6 +210,7 @@ abstract class ControllerTestCase extends CakeTestCase { * * @param string $url The url to test * @param array $options See options + * @return mixed */ protected function _testAction($url = '', $options = array()) { $this->vars = $this->result = $this->view = $this->contents = $this->headers = null; diff --git a/lib/Cake/TestSuite/Coverage/BaseCoverageReport.php b/lib/Cake/TestSuite/Coverage/BaseCoverageReport.php index 0cf23e879..f203fd18e 100644 --- a/lib/Cake/TestSuite/Coverage/BaseCoverageReport.php +++ b/lib/Cake/TestSuite/Coverage/BaseCoverageReport.php @@ -136,7 +136,7 @@ abstract class BaseCoverageReport { * * @param array $fileLines * @param array $coverageData - * @return array. Array of covered, total lines. + * @return array Array of covered, total lines. */ protected function _calculateCoveredLines($fileLines, $coverageData) { $covered = $total = 0; diff --git a/lib/Cake/TestSuite/Coverage/HtmlCoverageReport.php b/lib/Cake/TestSuite/Coverage/HtmlCoverageReport.php index 8706888f2..7a6483edd 100644 --- a/lib/Cake/TestSuite/Coverage/HtmlCoverageReport.php +++ b/lib/Cake/TestSuite/Coverage/HtmlCoverageReport.php @@ -122,6 +122,10 @@ HTML; /** * Renders the html for a single line in the html diff. * + * @param string $line + * @param integer $linenumber + * @param string $class + * @param array $coveringTests * @return void */ protected function _paintLine($line, $linenumber, $class, $coveringTests) { @@ -170,6 +174,8 @@ HTML; /** * Generate an HTML snippet for coverage headers * + * @param string $filename + * @param string $percent * @return void */ public function coverageHeader($filename, $percent) { diff --git a/lib/Cake/TestSuite/Reporter/CakeBaseReporter.php b/lib/Cake/TestSuite/Reporter/CakeBaseReporter.php index 27dfbd790..c9ec6eeda 100644 --- a/lib/Cake/TestSuite/Reporter/CakeBaseReporter.php +++ b/lib/Cake/TestSuite/Reporter/CakeBaseReporter.php @@ -24,6 +24,11 @@ require_once 'PHPUnit/TextUI/ResultPrinter.php'; */ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter { +/** + * Headers sent + * + * @var boolean + */ protected $_headerSent = false; /** @@ -113,10 +118,20 @@ class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter { return ''; } +/** + * Print result + * + * @param PHPUnit_Framework_TestResult $result + */ public function printResult(PHPUnit_Framework_TestResult $result) { $this->paintFooter($result); } +/** + * Paint result + * + * @param PHPUnit_Framework_TestResult $result + */ public function paintResult(PHPUnit_Framework_TestResult $result) { $this->paintFooter($result); } diff --git a/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php b/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php index f0c79a9b9..6156d82c7 100644 --- a/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php +++ b/lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php @@ -169,6 +169,7 @@ class CakeHtmlReporter extends CakeBaseReporter { /** * Paints a code coverage report. * + * @param array $coverage * @return void */ public function paintCoverage(array $coverage) { @@ -242,6 +243,7 @@ class CakeHtmlReporter extends CakeBaseReporter { * * @param PHPUnit_Framework_AssertionFailedError $message Failure object displayed in * the context of the other tests. + * @param mixed $test * @return void */ public function paintFail($message, $test) { @@ -294,6 +296,7 @@ class CakeHtmlReporter extends CakeBaseReporter { * Paints a PHP exception. * * @param Exception $exception Exception to display. + * @param mixed $test * @return void */ public function paintException($message, $test) { diff --git a/lib/Cake/TestSuite/Reporter/CakeTextReporter.php b/lib/Cake/TestSuite/Reporter/CakeTextReporter.php index e127f1d02..1132c436e 100644 --- a/lib/Cake/TestSuite/Reporter/CakeTextReporter.php +++ b/lib/Cake/TestSuite/Reporter/CakeTextReporter.php @@ -48,7 +48,7 @@ class CakeTextReporter extends CakeBaseReporter { /** * Paints a failing test. * - * @param $message PHPUnit_Framework_AssertionFailedError $message Failure object displayed in + * @param PHPUnit_Framework_AssertionFailedError $message Failure object displayed in * the context of the other tests. * @return void */ @@ -95,7 +95,6 @@ class CakeTextReporter extends CakeBaseReporter { /** * Paints the title only. * - * @param string $test_name Name class of test. * @return void */ public function paintHeader() { @@ -177,7 +176,7 @@ class CakeTextReporter extends CakeBaseReporter { * Generates a Text summary of the coverage data. * * @param array $coverage Array of coverage data. - * @return string + * @return void */ public function paintCoverage($coverage) { $reporter = new TextCoverageReport($coverage, $this); diff --git a/lib/Cake/Utility/CakeTime.php b/lib/Cake/Utility/CakeTime.php index a225c1516..455d07da1 100644 --- a/lib/Cake/Utility/CakeTime.php +++ b/lib/Cake/Utility/CakeTime.php @@ -85,13 +85,17 @@ class CakeTime { /** * Temporary variable containing timestamp value, used internally convertSpecifiers() + * + * @var integer */ protected static $_time = null; /** * Magic set method for backward compatibility. - * * Used by TimeHelper to modify static variables in CakeTime + * + * @param string $name Variable name + * @param mixes $value Variable value */ public function __set($name, $value) { switch ($name) { @@ -105,8 +109,10 @@ class CakeTime { /** * Magic set method for backward compatibility. - * * Used by TimeHelper to get static variables in CakeTime + * + * @param string $name Variable name + * @return mixed */ public function __get($name) { switch ($name) { diff --git a/lib/Cake/Utility/Hash.php b/lib/Cake/Utility/Hash.php index 8f01beb5d..5b8308f88 100644 --- a/lib/Cake/Utility/Hash.php +++ b/lib/Cake/Utility/Hash.php @@ -687,6 +687,7 @@ class Hash { * * @param array $data The data to reduce. * @param string $path The path to extract from $data. + * @param callable $function The function to call on each extracted value. * @return mixed The reduced value. */ public static function reduce(array $data, $path, $function) { @@ -700,6 +701,7 @@ class Hash { * * @param array $data The data to reduce. * @param string $path The path to extract from $data. + * @param callable $function The function to call on each extracted value. * @return mixed The results of the applied method. */ public static function apply(array $data, $path, $function) { diff --git a/lib/Cake/Utility/Validation.php b/lib/Cake/Utility/Validation.php index 40b8696d7..a8f0d225a 100644 --- a/lib/Cake/Utility/Validation.php +++ b/lib/Cake/Utility/Validation.php @@ -925,7 +925,7 @@ class Validation { * Checking for upload errors * * @param string|array $check - * @retrun boolean + * @return boolean * @see http://www.php.net/manual/en/features.file-upload.errors.php */ public static function uploadError($check) { diff --git a/lib/Cake/Utility/Xml.php b/lib/Cake/Utility/Xml.php index 20563e911..16ae442cc 100644 --- a/lib/Cake/Utility/Xml.php +++ b/lib/Cake/Utility/Xml.php @@ -118,7 +118,7 @@ class Xml { * * @param string $input The input to load. * @param array $options The options to use. See Xml::build() - * @return SimpleXmlElement|DOMDocument. + * @return SimpleXmlElement|DOMDocument */ protected static function _loadXml($input, $options) { $hasDisable = function_exists('libxml_disable_entity_loader'); diff --git a/lib/Cake/View/Helper/HtmlHelper.php b/lib/Cake/View/Helper/HtmlHelper.php index 02e4e4abe..20736b950 100644 --- a/lib/Cake/View/Helper/HtmlHelper.php +++ b/lib/Cake/View/Helper/HtmlHelper.php @@ -686,7 +686,7 @@ class HtmlHelper extends AppHelper { * - `separator` Separator content to insert in between breadcrumbs, defaults to '' * - `firstClass` Class for wrapper tag on the first breadcrumb, defaults to 'first' * - `lastClass` Class for wrapper tag on current active page, defaults to 'last' - * + * * @param array $options Array of html attributes to apply to the generated list elements. * @param string|array|boolean $startText This will be the first crumb, if false it defaults to first crumb in array. Can * also be an array, see `HtmlHelper::getCrumbs` for details. @@ -732,7 +732,7 @@ class HtmlHelper extends AppHelper { /** * Prepends startText to crumbs array if set * - * @param $startText + * @param string $startText Text to prepend * @return array Crumb list including startText (if provided) */ protected function _prepareCrumbs($startText) { diff --git a/lib/Cake/View/Helper/JsBaseEngineHelper.php b/lib/Cake/View/Helper/JsBaseEngineHelper.php index bd83c387d..7165f3d4f 100644 --- a/lib/Cake/View/Helper/JsBaseEngineHelper.php +++ b/lib/Cake/View/Helper/JsBaseEngineHelper.php @@ -69,8 +69,7 @@ abstract class JsBaseEngineHelper extends AppHelper { * Redirects to a URL. Creates a window.location modification snippet * that can be used to trigger 'redirects' from Javascript. * - * @param string|array $url - * @param array $options + * @param string|array $url URL * @return string completed redirect in javascript */ public function redirect($url = null) { diff --git a/lib/Cake/View/Helper/JsHelper.php b/lib/Cake/View/Helper/JsHelper.php index 8bce3f87a..656d4ee32 100644 --- a/lib/Cake/View/Helper/JsHelper.php +++ b/lib/Cake/View/Helper/JsHelper.php @@ -259,9 +259,9 @@ class JsHelper extends AppHelper { } /** - * Generates the object string for variables passed to javascript. + * Generates the object string for variables passed to javascript and adds to buffer * - * @return string Generated JSON object of all set vars + * @return void */ protected function _createVars() { if (!empty($this->_jsVars)) { diff --git a/lib/Cake/View/Helper/NumberHelper.php b/lib/Cake/View/Helper/NumberHelper.php index e286c36f4..ffbabb91d 100644 --- a/lib/Cake/View/Helper/NumberHelper.php +++ b/lib/Cake/View/Helper/NumberHelper.php @@ -73,7 +73,7 @@ class NumberHelper extends AppHelper { } /** - * @see: CakeNumber::precision() + * @see CakeNumber::precision() * * @param float $number A floating point number. * @param integer $precision The precision of the returned number. @@ -85,7 +85,7 @@ class NumberHelper extends AppHelper { } /** - * @see: CakeNumber::toReadableSize() + * @see CakeNumber::toReadableSize() * * @param integer $size Size in bytes * @return string Human readable size @@ -96,7 +96,7 @@ class NumberHelper extends AppHelper { } /** - * @see: CakeNumber::toPercentage() + * @see CakeNumber::toPercentage() * * @param float $number A floating point number * @param integer $precision The precision of the returned number @@ -108,7 +108,7 @@ class NumberHelper extends AppHelper { } /** - * @see: CakeNumber::format() + * @see CakeNumber::format() * * @param float $number A floating point number * @param integer $options if int then places, if string then before, if (,.-) then use it @@ -121,7 +121,7 @@ class NumberHelper extends AppHelper { } /** - * @see: CakeNumber::currency() + * @see CakeNumber::currency() * * @param float $number * @param string $currency Shortcut to default options. Valid values are 'USD', 'EUR', 'GBP', otherwise @@ -136,7 +136,7 @@ class NumberHelper extends AppHelper { } /** - * @see: CakeNumber::addFormat() + * @see CakeNumber::addFormat() * * @param string $formatName The format name to be used in the future. * @param array $options The array of options for this format. @@ -149,7 +149,7 @@ class NumberHelper extends AppHelper { } /** - * @see: CakeNumber::defaultCurrency() + * @see CakeNumber::defaultCurrency() * * @param string $currency The currency to be used in the future. * @return void diff --git a/lib/Cake/View/Helper/TextHelper.php b/lib/Cake/View/Helper/TextHelper.php index 13730a54a..aa79bbe0e 100644 --- a/lib/Cake/View/Helper/TextHelper.php +++ b/lib/Cake/View/Helper/TextHelper.php @@ -51,6 +51,8 @@ class TextHelper extends AppHelper { /** * String utility instance + * + * @var stdClass */ protected $_engine; diff --git a/lib/Cake/View/Helper/TimeHelper.php b/lib/Cake/View/Helper/TimeHelper.php index 630952817..5f0fb3b8e 100644 --- a/lib/Cake/View/Helper/TimeHelper.php +++ b/lib/Cake/View/Helper/TimeHelper.php @@ -34,6 +34,8 @@ class TimeHelper extends AppHelper { /** * CakeTime instance + * + * @var stdClass */ protected $_engine = null; @@ -66,7 +68,7 @@ class TimeHelper extends AppHelper { * * @param string $name Name of the attribute to set. * @param string $value Value of the attribute to set. - * @return mixed + * @return void */ public function __set($name, $value) { switch ($name) { diff --git a/lib/Cake/View/View.php b/lib/Cake/View/View.php index fc6daf098..1000020c8 100644 --- a/lib/Cake/View/View.php +++ b/lib/Cake/View/View.php @@ -222,6 +222,7 @@ class View extends Object { /** * Element cache settings * + * @var array * @see View::_elementCache(); * @see View::_renderElement */ @@ -304,8 +305,19 @@ class View extends Object { */ protected $_eventManagerConfigured = false; +/** + * Constant for view file type 'view' + */ const TYPE_VIEW = 'view'; + +/** + * Constant for view file type 'element' + */ const TYPE_ELEMENT = 'element'; + +/** + * Constant for view file type 'layout' + */ const TYPE_LAYOUT = 'layout'; /** @@ -647,7 +659,8 @@ class View extends Object { * empty or undefined '' will be returned. * * @param string $name Name of the block - * @return string The block content or $default if the block does not exist. + * @param string $default Default text + * @return string $default The block content or $default if the block does not exist. * @see ViewBlock::get() */ public function fetch($name, $default = '') { @@ -1119,8 +1132,9 @@ class View extends Object { * Checks if an element is cached and returns the cached data if present * * @param string $name Element name - * @param string $plugin Plugin name + * @param string $data Data * @param array $options Element options + * @return string|null */ protected function _elementCache($name, $data, $options) { $plugin = null; @@ -1153,6 +1167,7 @@ class View extends Object { * @param string $file Element file path * @param array $data Data to render * @param array $options Element options + * @return string */ protected function _renderElement($file, $data, $options) { if (!$this->_helpersLoaded) { diff --git a/lib/Cake/View/ViewBlock.php b/lib/Cake/View/ViewBlock.php index c41fe4eee..34182d137 100644 --- a/lib/Cake/View/ViewBlock.php +++ b/lib/Cake/View/ViewBlock.php @@ -157,6 +157,7 @@ class ViewBlock { * Get the content for a block. * * @param string $name Name of the block + * @param string $default Default string * @return string The block content or $default if the block does not exist. */ public function get($name, $default = '') {