Skip to content

Commit

Permalink
Adjusted some types in @param, @return and @var.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrbasso committed Aug 1, 2011
1 parent 4df585e commit 895c10a
Show file tree
Hide file tree
Showing 65 changed files with 192 additions and 209 deletions.
6 changes: 3 additions & 3 deletions lib/Cake/Cache/Cache.php
Expand Up @@ -186,7 +186,7 @@ public static function configured() {
* the Engine instance is also unset.
*
* @param string $name A currently configured cache config you wish to remove.
* @return boolen success of the removal, returns false when the config does not exist.
* @return boolean success of the removal, returns false when the config does not exist.
*/
public static function drop($name) {
if (!isset(self::$_config[$name])) {
Expand Down Expand Up @@ -456,7 +456,7 @@ public static function clear($check = false, $config = 'default') {
* Check if Cache has initialized a working config for the given name.
*
* @param string $config name of the configuration to use. Defaults to 'default'
* @return bool Whether or not the config name has been initialized.
* @return boolean Whether or not the config name has been initialized.
*/
public static function isInitialized($config = 'default') {
if (Configure::read('Cache.disable')) {
Expand Down Expand Up @@ -490,7 +490,7 @@ abstract class CacheEngine {
/**
* Settings of current engine instance
*
* @var int
* @var array
*/
public $settings = array();

Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Cache/Engine/FileEngine.php
Expand Up @@ -30,7 +30,7 @@ class FileEngine extends CacheEngine {
/**
* Instance of SplFileObject class
*
* @var _File
* @var File
*/
protected $_File = null;

Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Console/Command/AclShell.php
Expand Up @@ -544,7 +544,7 @@ public function parseIdentifier($identifier) {
*
* @param string $class Class type you want (Aro/Aco)
* @param mixed $identifier A mixed identifier for finding the node.
* @return int Integer of NodeId. Will trigger an error if nothing is found.
* @return integer Integer of NodeId. Will trigger an error if nothing is found.
*/
function _getNodeId($class, $identifier) {
$node = $this->Acl->{$class}->node($identifier);
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Console/Command/Task/ControllerTask.php
Expand Up @@ -365,7 +365,7 @@ public function doComponents() {
* Common code for property choice handling.
*
* @param string $prompt A yes/no question to precede the list
* @param sting $example A question for a comma separated list, with examples.
* @param string $example A question for a comma separated list, with examples.
* @return array Array of values for property.
*/
protected function _doPropertyChoices($prompt, $example) {
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Console/Command/Task/ExtractTask.php
Expand Up @@ -511,8 +511,8 @@ protected function _writeHeader() {
/**
* Get the strings from the position forward
*
* @param int $position Actual position on tokens array
* @param int $target Number of strings to extract
* @param integer $position Actual position on tokens array
* @param integer $target Number of strings to extract
* @return array Strings extracted
*/
protected function _getStrings(&$position, $target) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Console/Command/Task/FixtureTask.php
Expand Up @@ -43,7 +43,7 @@ class FixtureTask extends BakeTask {
/**
* Schema instance
*
* @var object
* @var CakeSchema
*/
protected $_Schema = null;

Expand Down
14 changes: 7 additions & 7 deletions lib/Cake/Console/Command/Task/ModelTask.php
Expand Up @@ -146,7 +146,7 @@ protected function &_getModelObject($className, $table = null) {
* @param array $options Array of options to use for the selections. indexes must start at 0
* @param string $prompt Prompt to use for options list.
* @param integer $default The default option for the given prompt.
* @return result of user choice.
* @return integer result of user choice.
*/
public function inOptions($options, $prompt = null, $default = null) {
$valid = false;
Expand Down Expand Up @@ -312,7 +312,7 @@ public function findDisplayField($fields) {
/**
* Handles Generation and user interaction for creating validation.
*
* @param object $model Model to have validations generated for.
* @param Model $model Model to have validations generated for.
* @return array $validate Array of user selected validations.
*/
public function doValidation($model) {
Expand Down Expand Up @@ -448,7 +448,7 @@ public function fieldValidation($fieldName, $metaData, $primaryKey = 'id') {
/**
* Handles associations
*
* @param object $model
* @param Model $model
* @return array $assocaitons
*/
public function doAssociations($model) {
Expand Down Expand Up @@ -497,7 +497,7 @@ public function doAssociations($model) {
/**
* Find belongsTo relations and add them to the associations list.
*
* @param object $model Model instance of model being generated.
* @param Model $model Model instance of model being generated.
* @param array $associations Array of inprogress associations
* @return array $associations with belongsTo added in.
*/
Expand Down Expand Up @@ -526,7 +526,7 @@ public function findBelongsTo($model, $associations) {
/**
* Find the hasOne and HasMany relations and add them to associations list
*
* @param object $model Model instance being generated
* @param Model $model Model instance being generated
* @param array $associations Array of inprogress associations
* @return array $associations with hasOne and hasMany added in.
*/
Expand Down Expand Up @@ -569,7 +569,7 @@ public function findHasOneAndMany($model, $associations) {
/**
* Find the hasAndBelongsToMany relations and add them to associations list
*
* @param object $model Model instance being generated
* @param Model $model Model instance being generated
* @param array $associations Array of in-progress associations
* @return array $associations with hasAndBelongsToMany added in.
*/
Expand Down Expand Up @@ -635,7 +635,7 @@ public function confirmAssociations($model, $associations) {
/**
* Interact with the user and generate additional non-conventional associations
*
* @param object $model Temporary model instance
* @param Model $model Temporary model instance
* @param array $associations Array of associations.
* @return array Array of associations.
*/
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Console/Command/Task/TemplateTask.php
Expand Up @@ -102,7 +102,7 @@ protected function _findThemes() {
/**
* Set variable values to the template scope
*
* @param mixed $one A string or an array of data.
* @param string|array $one A string or an array of data.
* @param mixed $two Value in case $one is a string (which then works as the key).
* Unused if $one is an associative array, otherwise serves as the values to $one's keys.
* @return void
Expand All @@ -129,8 +129,8 @@ public function set($one, $two = null) {
*
* @param string $directory directory / type of thing you want
* @param string $filename template name
* @param string $vars Additional vars to set to template scope.
* @return contents of generated code template
* @param array $vars Additional vars to set to template scope.
* @return string contents of generated code template
*/
public function generate($directory, $filename, $vars = null) {
if ($vars !== null) {
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Console/ConsoleErrorHandler.php
Expand Up @@ -64,10 +64,10 @@ public static function handleException(Exception $exception) {
* Handle errors in the console environment. Writes errors to stderr,
* and logs messages if Configure::read('debug') is 0.
*
* @param int $code Error code
* @param integer $code Error code
* @param string $description Description of the error.
* @param string $file The file the error occurred in.
* @param int $line The line the error occurred on.
* @param integer $line The line the error occurred on.
* @param array $context The backtrace of the error.
* @return void
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Console/ConsoleInputArgument.php
Expand Up @@ -84,7 +84,7 @@ public function name() {
/**
* Generate the help for this argument.
*
* @param int $width The width to make the name of the option.
* @param integer $width The width to make the name of the option.
* @return string
*/
public function help($width = 0) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Console/ConsoleInputOption.php
Expand Up @@ -112,7 +112,7 @@ public function short() {
/**
* Generate the help for this this option.
*
* @param int $width The width to make the name of the option.
* @param integer $width The width to make the name of the option.
* @return string
*/
public function help($width = 0) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Console/ConsoleInputSubcommand.php
Expand Up @@ -82,7 +82,7 @@ public function name() {
/**
* Generate the help for this this subcommand.
*
* @param int $width The width to make the name of the subcommand.
* @param integer $width The width to make the name of the subcommand.
* @return string
*/
public function help($width = 0) {
Expand Down
5 changes: 2 additions & 3 deletions lib/Cake/Console/ConsoleOptionParser.php
Expand Up @@ -489,7 +489,7 @@ public function parse($argv, $command = null) {
* @param string $subcommand If present and a valid subcommand that has a linked parser.
* That subcommands help will be shown instead.
* @param string $format Define the output format, can be text or xml
* @param int $width The width to format user content to. Defaults to 72
* @param integer $width The width to format user content to. Defaults to 72
* @return string Generated help.
*/
public function help($subcommand = null, $format = 'text', $width = 72) {
Expand Down Expand Up @@ -605,8 +605,7 @@ protected function _parseArg($argument, $args) {
/**
* Find the next token in the argv set.
*
* @param string
* @return next token or ''
* @return string next token or ''
*/
protected function _nextToken() {
return isset($this->_tokens[0]) ? $this->_tokens[0] : '';
Expand Down
3 changes: 1 addition & 2 deletions lib/Cake/Console/ConsoleOutput.php
Expand Up @@ -266,7 +266,7 @@ public function styles($style = null, $definition = null) {
/**
* Get/Set the output type to use. The output type how formatting tags are treated.
*
* @param int $type The output type to use. Should be one of the class constants.
* @param integer $type The output type to use. Should be one of the class constants.
* @return mixed Either null or the value if getting.
*/
public function outputAs($type = null) {
Expand All @@ -279,7 +279,6 @@ public function outputAs($type = null) {
/**
* clean up and close handles
*
* @return void
*/
public function __destruct() {
fclose($this->_output);
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Console/Shell.php
Expand Up @@ -214,7 +214,7 @@ protected function _welcome() {
* makes $this->AppModel available to subclasses
* If public $uses is an array of models will load those models
*
* @return bool
* @return boolean
*/
protected function _loadModels() {
if ($this->uses === null || $this->uses === false) {
Expand Down Expand Up @@ -243,7 +243,7 @@ protected function _loadModels() {
/**
* Loads tasks defined in public $tasks
*
* @return bool
* @return boolean
*/
public function loadTasks() {
if ($this->tasks === true || empty($this->tasks) || empty($this->Tasks)) {
Expand Down Expand Up @@ -670,7 +670,7 @@ protected function _checkUnitTest() {
* Makes absolute file path easier to read
*
* @param string $file Absolute file path
* @return sting short path
* @return string short path
*/
public function shortPath($file) {
$shortPath = str_replace(ROOT, null, $file);
Expand Down
3 changes: 1 addition & 2 deletions lib/Cake/Console/ShellDispatcher.php
Expand Up @@ -44,8 +44,7 @@ class ShellDispatcher {
* a status code of either 0 or 1 according to the result of the dispatch.
*
* @param array $args the argv from PHP
* @param bool $bootstrap Should the environment be bootstrapped.
* @return void
* @param boolean $bootstrap Should the environment be bootstrapped.
*/
public function __construct($args = array(), $bootstrap = true) {
set_time_limit(0);
Expand Down
1 change: 0 additions & 1 deletion lib/Cake/Console/TaskCollection.php
Expand Up @@ -42,7 +42,6 @@ class TaskCollection extends ObjectCollection {
* Constructor
*
* @param Shell $Shell
* @return void
*/
public function __construct(Shell $Shell) {
$this->_Shell = $Shell;
Expand Down
1 change: 0 additions & 1 deletion lib/Cake/Controller/CakeErrorController.php
Expand Up @@ -39,7 +39,6 @@ class CakeErrorController extends AppController {
*
* @param CakeRequest $request
* @param CakeResponse $response
* @return void
*/
public function __construct($request = null, $response = null) {
parent::__construct($request, $response);
Expand Down
20 changes: 10 additions & 10 deletions lib/Cake/Controller/Component.php
Expand Up @@ -86,7 +86,7 @@ public function __construct(ComponentCollection $collection, $settings = array()
/**
* Magic method for lazy loading $components.
*
* @param sting $name Name of component to get.
* @param string $name Name of component to get.
* @return mixed A Component object or null.
*/
public function __get($name) {
Expand All @@ -102,7 +102,7 @@ public function __get($name) {
/**
* Called before the Controller::beforeFilter().
*
* @param object $controller Controller with components to initialize
* @param Controller $controller Controller with components to initialize
* @return void
* @link http://book.cakephp.org/view/998/MVC-Class-Access-Within-Components
*/
Expand All @@ -111,7 +111,7 @@ public function initialize($controller) { }
/**
* Called after the Controller::beforeFilter() and before the controller action
*
* @param object $controller Controller with components to startup
* @param Controller $controller Controller with components to startup
* @return void
* @link http://book.cakephp.org/view/998/MVC-Class-Access-Within-Components
*/
Expand All @@ -121,15 +121,15 @@ public function startup($controller) { }
* Called after the Controller::beforeRender(), after the view class is loaded, and before the
* Controller::render()
*
* @param object $controller Controller with components to beforeRender
* @param Controller $controller Controller with components to beforeRender
* @return void
*/
public function beforeRender($controller) { }

/**
* Called after Controller::render() and before the output is printed to the browser.
*
* @param object $controller Controller with components to shutdown
* @param Controller $controller Controller with components to shutdown
* @return void
*/
public function shutdown($controller) { }
Expand All @@ -146,11 +146,11 @@ public function shutdown($controller) { }
* If your response is a string or an array that does not contain a 'url' key it will
* be used as the new url to redirect to.
*
* @param object $controller Controller with components to beforeRedirect
* @param mixed $url Either the string or url array that is being redirected to.
* @param int $status The status code of the redirect
* @param bool $exit Will the script exit.
* @return mixed Either an array or null.
* @param Controller $controller Controller with components to beforeRedirect
* @param string|array $url Either the string or url array that is being redirected to.
* @param integer $status The status code of the redirect
* @param boolean $exit Will the script exit.
* @return array|null Either an array or null.
*/
public function beforeRedirect($controller, $url, $status = null, $exit = true) {}

Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/AclComponent.php
Expand Up @@ -36,7 +36,7 @@ class AclComponent extends Component {
/**
* Instance of an ACL class
*
* @var object
* @var AclInterface
*/
protected $_Instance = null;

Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Controller/Component/AuthComponent.php
Expand Up @@ -240,7 +240,7 @@ class AuthComponent extends Component {
/**
* Initializes AuthComponent for use in the controller
*
* @param object $controller A reference to the instantiating controller object
* @param Controller $controller A reference to the instantiating controller object
* @return void
*/
public function initialize($controller) {
Expand All @@ -257,7 +257,7 @@ public function initialize($controller) {
* Main execution method. Handles redirecting of invalid users, and processing
* of login form data.
*
* @param object $controller A reference to the instantiating controller object
* @param Controller $controller A reference to the instantiating controller object
* @return boolean
*/
public function startup($controller) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/CookieComponent.php
Expand Up @@ -338,7 +338,7 @@ public function type($type = 'cipher') {
* CookieComponent::write(string, string, boolean, '5 Days');
*
* @param mixed $expires Can be either Unix timestamp, or date string
* @return int Unix timestamp
* @return integer Unix timestamp
*/
protected function _expire($expires = null) {
$now = time();
Expand Down

0 comments on commit 895c10a

Please sign in to comment.