Skip to content

Commit

Permalink
Docblock fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Nov 28, 2012
1 parent 6670997 commit 72d6ca6
Show file tree
Hide file tree
Showing 56 changed files with 191 additions and 74 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Cache/Cache.php
Expand Up @@ -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()) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Cache/Engine/RedisEngine.php
Expand Up @@ -213,7 +213,7 @@ public function clearGroup($group) {
/**
* Disconnects from the redis server
*
* @return voind
* @return void
**/
public function __destruct() {
if (!$this->settings['persistent']) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Console/Command/CommandListShell.php
Expand Up @@ -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) {
Expand Down
3 changes: 2 additions & 1 deletion lib/Cake/Console/Command/Task/PluginTask.php
Expand Up @@ -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) {
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Console/Command/TestShell.php
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Console/ConsoleErrorHandler.php
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion lib/Cake/Console/ConsoleOutput.php
Expand Up @@ -43,6 +43,7 @@
* @package Cake.Console
*/
class ConsoleOutput {

/**
* Raw output constant - no modification of output text.
*/
Expand Down Expand Up @@ -73,7 +74,7 @@ class ConsoleOutput {
/**
* The current output type. Manipulated with ConsoleOutput::outputAs();
*
* @var integer.
* @var integer
*/
protected $_outputAs = self::COLOR;

Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Console/HelpFormatter.php
Expand Up @@ -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;
Expand Down
10 changes: 9 additions & 1 deletion lib/Cake/Console/Shell.php
Expand Up @@ -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;

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component.php
Expand Up @@ -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) {
Expand Down
26 changes: 24 additions & 2 deletions lib/Cake/Controller/Component/Acl/PhpAcl.php
Expand Up @@ -25,7 +25,14 @@
*/
class PhpAcl extends Object implements AclInterface {

/**
* Constant for deny
*/
const DENY = false;

/**
* Constant for allow
*/
const ALLOW = true;

/**
Expand Down Expand Up @@ -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])) {
Expand All @@ -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) {
Expand Down Expand Up @@ -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') {
Expand Down Expand Up @@ -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';

Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/Auth/FormAuthenticate.php
Expand Up @@ -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'];
Expand Down
3 changes: 3 additions & 0 deletions lib/Cake/Controller/Component/AuthComponent.php
Expand Up @@ -38,6 +38,9 @@
*/
class AuthComponent extends Component {

/**
* Constant for 'all'
*/
const ALL = 'all';

/**
Expand Down
1 change: 0 additions & 1 deletion lib/Cake/Controller/Component/CookieComponent.php
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/RequestHandlerComponent.php
Expand Up @@ -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])) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/ComponentCollection.php
Expand Up @@ -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;
Expand Down
9 changes: 4 additions & 5 deletions lib/Cake/Controller/Controller.php
Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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') {
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Controller/Scaffold.php
Expand Up @@ -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(
Expand Down Expand Up @@ -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.
*/
Expand Down
1 change: 1 addition & 0 deletions lib/Cake/Error/ExceptionRenderer.php
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions lib/Cake/Event/CakeEventManager.php
Expand Up @@ -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) {
Expand Down
8 changes: 5 additions & 3 deletions lib/Cake/I18n/I18n.php
Expand Up @@ -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');
Expand Down Expand Up @@ -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;

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Log/CakeLog.php
Expand Up @@ -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)) {
Expand Down
1 change: 1 addition & 0 deletions lib/Cake/Log/Engine/BaseLog.php
Expand Up @@ -36,6 +36,7 @@ abstract class BaseLog implements CakeLogInterface {
/**
* __construct method
*
* @param array $config Configuration array
* @return void
*/
public function __construct($config = array()) {
Expand Down
3 changes: 2 additions & 1 deletion lib/Cake/Model/Behavior/TranslateBehavior.php
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Model/Datasource/DboSource.php
Expand Up @@ -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;

Expand Down Expand Up @@ -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) {
}
Expand Down
5 changes: 3 additions & 2 deletions lib/Cake/Model/Model.php
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 72d6ca6

Please sign in to comment.