Browse files

Docblock fixes

  • Loading branch information...
1 parent 6670997 commit 72d6ca636f3cdebaeea92ae6a35ac370ba833bfc @ADmad ADmad committed Nov 29, 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
2 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()) {
View
2 lib/Cake/Cache/Engine/RedisEngine.php
@@ -213,7 +213,7 @@ public function clearGroup($group) {
/**
* Disconnects from the redis server
*
- * @return voind
+ * @return void
**/
public function __destruct() {
if (!$this->settings['persistent']) {
View
2 lib/Cake/Console/Command/CommandListShell.php
@@ -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) {
View
3 lib/Cake/Console/Command/Task/PluginTask.php
@@ -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;
View
2 lib/Cake/Console/Command/TestShell.php
@@ -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) {
View
2 lib/Cake/Console/ConsoleErrorHandler.php
@@ -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);
View
3 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;
View
2 lib/Cake/Console/HelpFormatter.php
@@ -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
10 lib/Cake/Console/Shell.php
@@ -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;
/**
View
2 lib/Cake/Controller/Component.php
@@ -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) {
View
26 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 @@ 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;
View
2 lib/Cake/Controller/Component/Auth/FormAuthenticate.php
@@ -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'];
View
3 lib/Cake/Controller/Component/AuthComponent.php
@@ -38,6 +38,9 @@
*/
class AuthComponent extends Component {
+/**
+ * Constant for 'all'
+ */
const ALL = 'all';
/**
View
1 lib/Cake/Controller/Component/CookieComponent.php
@@ -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) {
View
2 lib/Cake/Controller/Component/RequestHandlerComponent.php
@@ -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])) {
View
2 lib/Cake/Controller/ComponentCollection.php
@@ -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;
View
9 lib/Cake/Controller/Controller.php
@@ -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') {
View
4 lib/Cake/Controller/Scaffold.php
@@ -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.
*/
View
1 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);
View
1 lib/Cake/Event/CakeEventManager.php
@@ -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
8 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;
/**
View
2 lib/Cake/Log/CakeLog.php
@@ -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)) {
View
1 lib/Cake/Log/Engine/BaseLog.php
@@ -36,6 +36,7 @@
/**
* __construct method
*
+ * @param array $config Configuration array
* @return void
*/
public function __construct($config = array()) {
View
3 lib/Cake/Model/Behavior/TranslateBehavior.php
@@ -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) {
View
4 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 @@ 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
5 lib/Cake/Model/Model.php
@@ -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) {
View
1 lib/Cake/Model/ModelValidator.php
@@ -203,7 +203,6 @@ public function validateAssociated(&$data, $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.
* Otherwise: array similar to the $data array passed, but values are set to true/false
* depending on whether each record validated successfully.
View
17 lib/Cake/Model/Validator/CakeValidationRule.php
@@ -158,7 +158,8 @@ public function isRequired() {
/**
* 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 @@ public function checkRequired($field, &$data) {
/**
* 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 @@ protected function _getPropertiesArray() {
* 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 @@ public function isUpdate($exists = null) {
/**
* 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 @@ public function process($field, &$data, &$methods) {
* and it will set isUpdate() to false
*
* @return void
- **/
+ */
public function reset() {
$this->_valid = true;
$this->_recordExists = false;
@@ -295,8 +301,9 @@ public function reset() {
/**
* 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 @@ protected function _addValidatorProps($validator = array()) {
/**
* 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) {
View
3 lib/Cake/Model/Validator/CakeValidationSet.php
@@ -94,6 +94,7 @@ public function __construct($fieldName, $ruleSet) {
/**
* Sets the list of methods to use for validation
*
+ * @param array $methods Methods list
* @return void
**/
public function setMethods(&$methods) {
@@ -114,6 +115,8 @@ public function setValidationDomain($validationDomain) {
* 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) {
View
1 lib/Cake/Network/CakeRequest.php
@@ -764,6 +764,7 @@ protected static function _parseAcceptWithQualifier($header) {
* 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) {
View
9 lib/Cake/Network/CakeResponse.php
@@ -1057,7 +1057,8 @@ public function download($filename) {
* 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 @@ public function protocol($protocol = null) {
* 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 @@ public function length($bytes = null) {
* 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 @@ public function __toString() {
* 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)
View
2 lib/Cake/Network/Email/AbstractTransport.php
@@ -34,7 +34,7 @@
/**
* Send mail
*
- * @params CakeEmail $email
+ * @param CakeEmail $email
* @return array
*/
abstract public function send(CakeEmail $email);
View
4 lib/Cake/Network/Email/CakeEmail.php
@@ -33,6 +33,7 @@
* @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 @@ public static function deliver($to = null, $subject = null, $message = null, $tr
/**
* 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
View
2 lib/Cake/Routing/Router.php
@@ -184,7 +184,7 @@ public static function defaultRouteClass($routeClass = null) {
/**
* 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
*/
View
7 lib/Cake/TestSuite/CakeTestCase.php
@@ -170,7 +170,6 @@ public static function date($format = 'Y-m-d H:i:s') {
/**
* Announces the start of a test.
*
- * @param string $method Test method just started.
* @return void
*/
protected function assertPreConditions() {
@@ -181,7 +180,6 @@ protected function assertPreConditions() {
/**
* Announces the end of a test.
*
- * @param string $method Test method just finished.
* @return void
*/
protected function assertPostConditions() {
@@ -496,6 +494,7 @@ public function assertTags($string, $expected, $fullDebug = false) {
* 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 @@ protected static function assertNoPattern($pattern, $string, $message = '') {
return self::assertNotRegExp($pattern, $string, $message);
}
+/**
+ * assert no errors
+ */
protected function assertNoErrors() {
}
@@ -681,6 +683,7 @@ protected function skipUnless($condition, $message = '') {
*
* @param string $model
* @param mixed $methods
+ * @param mixed $config
* @return Model
*/
public function getMockForModel($model, $methods = array(), $config = null) {
View
7 lib/Cake/TestSuite/CakeTestLoader.php
@@ -43,6 +43,8 @@ public function load($filePath, $params = '') {
/**
* 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 @@ protected static function _basePath($params) {
/**
* 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 @@ public static function generateTestList($params) {
* 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();
View
5 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 @@ protected function createTestResult() {
/**
* 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) {
View
4 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 @@ public function run(array $argv, $exit = true) {
/**
* 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 @@ public function handleFixture($class) {
/**
* Handles output flag used to change printing on webrunner.
*
+ * @param string $reporter
* @return void
*/
public function handleReporter($reporter) {
View
1 lib/Cake/TestSuite/ControllerTestCase.php
@@ -210,6 +210,7 @@ public function __call($name, $arguments) {
*
* @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;
View
2 lib/Cake/TestSuite/Coverage/BaseCoverageReport.php
@@ -136,7 +136,7 @@ public function filterCoverageDataByPath($path) {
*
* @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;
View
6 lib/Cake/TestSuite/Coverage/HtmlCoverageReport.php
@@ -122,6 +122,10 @@ protected function _guessSubjectName($testReflection) {
/**
* 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 @@ function coverage_toggle_all() {
/**
* Generate an HTML snippet for coverage headers
*
+ * @param string $filename
+ * @param string $percent
* @return void
*/
public function coverageHeader($filename, $percent) {
View
15 lib/Cake/TestSuite/Reporter/CakeBaseReporter.php
@@ -24,6 +24,11 @@
*/
class CakeBaseReporter extends PHPUnit_TextUI_ResultPrinter {
+/**
+ * Headers sent
+ *
+ * @var boolean
+ */
protected $_headerSent = false;
/**
@@ -113,10 +118,20 @@ public function baseUrl() {
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);
}
View
3 lib/Cake/TestSuite/Reporter/CakeHtmlReporter.php
@@ -169,6 +169,7 @@ public function paintFooter($result) {
/**
* Paints a code coverage report.
*
+ * @param array $coverage
* @return void
*/
public function paintCoverage(array $coverage) {
@@ -242,6 +243,7 @@ public function paintDocumentEnd() {
*
* @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 @@ public function paintPass(PHPUnit_Framework_Test $test, $time = null) {
* Paints a PHP exception.
*
* @param Exception $exception Exception to display.
+ * @param mixed $test
* @return void
*/
public function paintException($message, $test) {
View
5 lib/Cake/TestSuite/Reporter/CakeTextReporter.php
@@ -48,7 +48,7 @@ public function paintPass() {
/**
* 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 @@ public function paintFooter($result) {
/**
* Paints the title only.
*
- * @param string $test_name Name class of test.
* @return void
*/
public function paintHeader() {
@@ -177,7 +176,7 @@ public function testCaseList() {
* 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);
View
10 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 @@ public function __set($name, $value) {
/**
* 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) {
View
2 lib/Cake/Utility/Hash.php
@@ -687,6 +687,7 @@ public static function map(array $data, $path, $function) {
*
* @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 @@ public static function reduce(array $data, $path, $function) {
*
* @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) {
View
2 lib/Cake/Utility/Validation.php
@@ -925,7 +925,7 @@ public static function fileSize($check, $operator = null, $size = null) {
* 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) {
View
2 lib/Cake/Utility/Xml.php
@@ -118,7 +118,7 @@ public static function build($input, $options = array()) {
*
* @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');
View
4 lib/Cake/View/Helper/HtmlHelper.php
@@ -686,7 +686,7 @@ public function getCrumbs($separator = '»', $startText = false) {
* - `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 @@ public function getCrumbList($options = array(), $startText = false) {
/**
* 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) {
View
3 lib/Cake/View/Helper/JsBaseEngineHelper.php
@@ -69,8 +69,7 @@ public function alert($message) {
* 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) {
View
4 lib/Cake/View/Helper/JsHelper.php
@@ -259,9 +259,9 @@ public function getBuffer($clear = true) {
}
/**
- * 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)) {
View
14 lib/Cake/View/Helper/NumberHelper.php
@@ -73,7 +73,7 @@ public function __call($method, $params) {
}
/**
- * @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 @@ public function precision($number, $precision = 3) {
}
/**
- * @see: CakeNumber::toReadableSize()
+ * @see CakeNumber::toReadableSize()
*
* @param integer $size Size in bytes
* @return string Human readable size
@@ -96,7 +96,7 @@ public function toReadableSize($size) {
}
/**
- * @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 @@ public function toPercentage($number, $precision = 2) {
}
/**
- * @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 @@ public function format($number, $options = false) {
}
/**
- * @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 @@ public function currency($number, $currency = null, $options = array()) {
}
/**
- * @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 @@ public function addFormat($formatName, $options) {
}
/**
- * @see: CakeNumber::defaultCurrency()
+ * @see CakeNumber::defaultCurrency()
*
* @param string $currency The currency to be used in the future.
* @return void
View
2 lib/Cake/View/Helper/TextHelper.php
@@ -51,6 +51,8 @@ class TextHelper extends AppHelper {
/**
* String utility instance
+ *
+ * @var stdClass
*/
protected $_engine;
View
4 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 @@ public function __construct(View $View, $settings = array()) {
*
* @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) {
View
19 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 @@ public function assign($name, $value) {
* 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 @@ protected function _paths($plugin = null, $cached = true) {
* 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 @@ protected function _elementCache($name, $data, $options) {
* @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) {
View
1 lib/Cake/View/ViewBlock.php
@@ -157,6 +157,7 @@ public function set($name, $value) {
* 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 = '') {

0 comments on commit 72d6ca6

Please sign in to comment.