Permalink
Browse files

Merge pull request #991 from ADmad/2.3-docblock

Docblock fixes
  • Loading branch information...
2 parents 6670997 + 72d6ca6 commit 4366f9c1e0e8eeebaf610accdf0443439237354e @lorenzo lorenzo committed Nov 28, 2012
Showing with 191 additions and 74 deletions.
  1. +1 −1 lib/Cake/Cache/Cache.php
  2. +1 −1 lib/Cake/Cache/Engine/RedisEngine.php
  3. +1 −1 lib/Cake/Console/Command/CommandListShell.php
  4. +2 −1 lib/Cake/Console/Command/Task/PluginTask.php
  5. +1 −1 lib/Cake/Console/Command/TestShell.php
  6. +1 −1 lib/Cake/Console/ConsoleErrorHandler.php
  7. +2 −1 lib/Cake/Console/ConsoleOutput.php
  8. +1 −1 lib/Cake/Console/HelpFormatter.php
  9. +9 −1 lib/Cake/Console/Shell.php
  10. +1 −1 lib/Cake/Controller/Component.php
  11. +24 −2 lib/Cake/Controller/Component/Acl/PhpAcl.php
  12. +1 −1 lib/Cake/Controller/Component/Auth/FormAuthenticate.php
  13. +3 −0 lib/Cake/Controller/Component/AuthComponent.php
  14. +0 −1 lib/Cake/Controller/Component/CookieComponent.php
  15. +1 −1 lib/Cake/Controller/Component/RequestHandlerComponent.php
  16. +1 −1 lib/Cake/Controller/ComponentCollection.php
  17. +4 −5 lib/Cake/Controller/Controller.php
  18. +2 −2 lib/Cake/Controller/Scaffold.php
  19. +1 −0 lib/Cake/Error/ExceptionRenderer.php
  20. +1 −0 lib/Cake/Event/CakeEventManager.php
  21. +5 −3 lib/Cake/I18n/I18n.php
  22. +1 −1 lib/Cake/Log/CakeLog.php
  23. +1 −0 lib/Cake/Log/Engine/BaseLog.php
  24. +2 −1 lib/Cake/Model/Behavior/TranslateBehavior.php
  25. +2 −2 lib/Cake/Model/Datasource/DboSource.php
  26. +3 −2 lib/Cake/Model/Model.php
  27. +0 −1 lib/Cake/Model/ModelValidator.php
  28. +13 −4 lib/Cake/Model/Validator/CakeValidationRule.php
  29. +3 −0 lib/Cake/Model/Validator/CakeValidationSet.php
  30. +1 −0 lib/Cake/Network/CakeRequest.php
  31. +6 −3 lib/Cake/Network/CakeResponse.php
  32. +1 −1 lib/Cake/Network/Email/AbstractTransport.php
  33. +2 −2 lib/Cake/Network/Email/CakeEmail.php
  34. +1 −1 lib/Cake/Routing/Router.php
  35. +5 −2 lib/Cake/TestSuite/CakeTestCase.php
  36. +5 −2 lib/Cake/TestSuite/CakeTestLoader.php
  37. +4 −1 lib/Cake/TestSuite/CakeTestRunner.php
  38. +3 −1 lib/Cake/TestSuite/CakeTestSuiteCommand.php
  39. +1 −0 lib/Cake/TestSuite/ControllerTestCase.php
  40. +1 −1 lib/Cake/TestSuite/Coverage/BaseCoverageReport.php
  41. +6 −0 lib/Cake/TestSuite/Coverage/HtmlCoverageReport.php
  42. +15 −0 lib/Cake/TestSuite/Reporter/CakeBaseReporter.php
  43. +3 −0 lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php
  44. +2 −3 lib/Cake/TestSuite/Reporter/CakeTextReporter.php
  45. +8 −2 lib/Cake/Utility/CakeTime.php
  46. +2 −0 lib/Cake/Utility/Hash.php
  47. +1 −1 lib/Cake/Utility/Validation.php
  48. +1 −1 lib/Cake/Utility/Xml.php
  49. +2 −2 lib/Cake/View/Helper/HtmlHelper.php
  50. +1 −2 lib/Cake/View/Helper/JsBaseEngineHelper.php
  51. +2 −2 lib/Cake/View/Helper/JsHelper.php
  52. +7 −7 lib/Cake/View/Helper/NumberHelper.php
  53. +2 −0 lib/Cake/View/Helper/TextHelper.php
  54. +3 −1 lib/Cake/View/Helper/TimeHelper.php
  55. +17 −2 lib/Cake/View/View.php
  56. +1 −0 lib/Cake/View/ViewBlock.php
View
@@ -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()) {
@@ -213,7 +213,7 @@ public function clearGroup($group) {
/**
* Disconnects from the redis server
*
- * @return voind
+ * @return void
**/
public function __destruct() {
if (!$this->settings['persistent']) {
@@ -100,7 +100,7 @@ protected function _getShellList() {
* @param string $type
* @param array $shells
* @param array $shellList
- * @return array
+ * @return void
*/
protected function _appendShells($type, $shells, &$shellList) {
foreach ($shells as $shell) {
@@ -168,6 +168,7 @@ public function bake($plugin) {
/**
* Update the app's bootstrap.php file.
*
+ * @param string $plugin Name of plugin
* @return void
*/
protected function _modifyBootstrap($plugin) {
@@ -184,7 +185,7 @@ protected function _modifyBootstrap($plugin) {
* find and change $this->path to the user selection
*
* @param array $pathOptions
- * @return string plugin path
+ * @return void
*/
public function findPath($pathOptions) {
$valid = false;
@@ -338,7 +338,7 @@ public function available() {
* @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) {
@@ -93,7 +93,7 @@ public function handleError($code, $description, $file = null, $line = null, $co
/**
* 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);
@@ -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;
@@ -174,7 +174,7 @@ protected function _getMaxLength($collection) {
* 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;
View
@@ -31,10 +31,18 @@
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;
/**
@@ -156,7 +156,7 @@ public function shutdown(Controller $controller) {
* @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) {
@@ -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 @@ public function __construct(array $rules = array()) {
/**
* 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 @@ public function path($aco) {
/**
* 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;
@@ -64,7 +64,7 @@ protected function _checkFields(CakeRequest $request, $model, $fields) {
*
* @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'];
@@ -38,6 +38,9 @@
*/
class AuthComponent extends Component {
+/**
+ * Constant for 'all'
+ */
const ALL = 'all';
/**
@@ -447,7 +447,6 @@ protected function _delete($name) {
* 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) {
@@ -748,7 +748,7 @@ public function addInputType($type, $handler) {
*
* @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])) {
@@ -56,7 +56,7 @@ public function init(Controller $Controller) {
/**
* Get the controller associated with the collection.
*
- * @return Controller.
+ * @return Controller Controller instance
*/
public function getController() {
return $this->_Controller;
@@ -745,7 +745,7 @@ public function loadModel($modelClass = null, $id = null) {
* 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 @@ public function set($one, $two = null) {
* 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 @@ public function disableCache() {
* @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') {
@@ -199,7 +199,7 @@ protected function _scaffoldIndex($params) {
* 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 @@ protected function _scaffoldError() {
* `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.
*/
@@ -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);
@@ -163,6 +163,7 @@ protected function _extractCallable($function, $object) {
* 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) {
View
@@ -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;
/**
View
@@ -358,7 +358,7 @@ public static function disable($streamName) {
*
* @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)) {
@@ -36,6 +36,7 @@
/**
* __construct method
*
+ * @param array $config Configuration array
* @return void
*/
public function __construct($config = array()) {
@@ -214,7 +214,6 @@ protected function _checkConditions(Model $Model, $query) {
* 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 @@ public function afterSave(Model $Model, $created) {
* 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 @@ public function bindTranslation(Model $Model, $fields, $reset = true) {
/**
* 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) {
@@ -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 @@ public function insertMulti($table, $fields, $values) {
*
* @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) {
}
View
@@ -2144,8 +2144,7 @@ public function saveMany($data = null, $options = array()) {
*
* @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 @@ protected function _clearCache($type = null) {
/**
* 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) {
Oops, something went wrong.

0 comments on commit 4366f9c

Please sign in to comment.