Skip to content

Commit

Permalink
Updating mixed @param documentation to seperate list of accepted types
Browse files Browse the repository at this point in the history
  • Loading branch information
Jelle Henkens committed May 21, 2012
1 parent e58e3c5 commit f7ce526
Show file tree
Hide file tree
Showing 98 changed files with 462 additions and 462 deletions.
2 changes: 1 addition & 1 deletion lib/Cake/Cache/Cache.php
Expand Up @@ -213,7 +213,7 @@ public static function drop($name) {
*
* `Cache::set(null, 'my_config');`
*
* @param mixed $settings Optional string for simple name-value pair or array
* @param string|array $settings Optional string for simple name-value pair or array
* @param string $value Optional for a simple name-value pair
* @param string $config The configuration name you are changing. Defaults to 'default'
* @return array Array of settings.
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Cache/CacheEngine.php
Expand Up @@ -77,7 +77,7 @@ public function gc($expires = null) {
*
* @param string $key Identifier for the data
* @param mixed $value Data to be cached
* @param mixed $duration How long to cache for.
* @param integer $duration How long to cache for.
* @return boolean True if the data was successfully cached, false on failure
*/
abstract public function write($key, $value, $duration);
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Cache/Engine/FileEngine.php
Expand Up @@ -106,7 +106,7 @@ public function gc($expires = null) {
*
* @param string $key Identifier for the data
* @param mixed $data Data to be cached
* @param mixed $duration How long to cache the data, in seconds
* @param integer $duration How long to cache the data, in seconds
* @return boolean True if the data was successfully cached, false on failure
*/
public function write($key, $data, $duration) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Console/Command/AclShell.php
Expand Up @@ -549,7 +549,7 @@ public function parseIdentifier($identifier) {
* or an array of properties to use in AcoNode::node()
*
* @param string $class Class type you want (Aro/Aco)
* @param mixed $identifier A mixed identifier for finding the node.
* @param string|array $identifier A mixed identifier for finding the node.
* @return integer Integer of NodeId. Will trigger an error if nothing is found.
*/
protected function _getNodeId($class, $identifier) {
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Console/Command/Task/ModelTask.php
Expand Up @@ -765,8 +765,8 @@ protected function _generatePossibleKeys() {
/**
* Assembles and writes a Model file.
*
* @param mixed $name Model name or object
* @param mixed $data if array and $name is not an object assume bake data, otherwise boolean.
* @param string|object $name Model name or object
* @param array|boolean $data if array and $name is not an object assume bake data, otherwise boolean.
* @return string
*/
public function bake($name, $data = array()) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Console/Command/Task/TemplateTask.php
Expand Up @@ -108,7 +108,7 @@ protected function _findThemes() {
* Set variable values to the template scope
*
* @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).
* @param string|array $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 Down
8 changes: 4 additions & 4 deletions lib/Cake/Console/Command/TestShell.php
Expand Up @@ -334,9 +334,9 @@ public function available() {
/**
* Find the test case for the passed file. The file could itself be a test.
*
* @param mixed $file
* @param mixed $category
* @param mixed $throwOnMissingFile
* @param string $file
* @param string $category
* @param boolean $throwOnMissingFile
* @access protected
* @return array(type, case)
* @throws Exception
Expand Down Expand Up @@ -412,7 +412,7 @@ protected function _mapFileToCase($file, $category, $throwOnMissingFile = true)
/**
* For the given file, what category of test is it? returns app, core or the name of the plugin
*
* @param mixed $file
* @param string $file
* @access protected
* @return string
*/
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Console/Command/UpgradeShell.php
Expand Up @@ -634,8 +634,8 @@ protected function _moveAppClasses() {
* Find all php files in the folder (honoring recursive) and determine where cake expects the file to be
* If the file is not exactly where cake expects it - move it.
*
* @param mixed $path
* @param mixed $options array(recursive, checkFolder)
* @param string $path
* @param array $options array(recursive, checkFolder)
* @return void
*/
protected function _movePhpFiles($path, $options) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Console/ConsoleInputArgument.php
Expand Up @@ -55,7 +55,7 @@ class ConsoleInputArgument {
/**
* Make a new Input Argument
*
* @param mixed $name The long name of the option, or an array with all the properties.
* @param string|array $name The long name of the option, or an array with all the properties.
* @param string $help The help text for this option
* @param boolean $required Whether this argument is required. Missing required args will trigger exceptions
* @param array $choices Valid choices for this option.
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Console/ConsoleInputOption.php
Expand Up @@ -70,7 +70,7 @@ class ConsoleInputOption {
/**
* Make a new Input Option
*
* @param mixed $name The long name of the option, or an array with all the properties.
* @param string|array $name The long name of the option, or an array with all the properties.
* @param string $short The short alias for this option
* @param string $help The help text for this option
* @param boolean $boolean Whether this option is a boolean option. Boolean options don't consume extra tokens
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Console/ConsoleInputSubcommand.php
Expand Up @@ -49,9 +49,9 @@ class ConsoleInputSubcommand {
/**
* Make a new Subcommand
*
* @param mixed $name The long name of the subcommand, or an array with all the properties.
* @param string|array $name The long name of the subcommand, or an array with all the properties.
* @param string $help The help text for this option
* @param mixed $parser A parser for this subcommand. Either a ConsoleOptionParser, or an array that can be
* @param ConsoleOptionParser|array $parser A parser for this subcommand. Either a ConsoleOptionParser, or an array that can be
* used with ConsoleOptionParser::buildFromArray()
*/
public function __construct($name, $help = '', $parser = null) {
Expand Down
10 changes: 5 additions & 5 deletions lib/Cake/Console/ConsoleOptionParser.php
Expand Up @@ -232,7 +232,7 @@ public function command($text = null) {
/**
* Get or set the description text for shell/task.
*
* @param mixed $text The text to set, or null if you want to read. If an array the
* @param string|array $text The text to set, or null if you want to read. If an array the
* text will be imploded with "\n"
* @return mixed If reading, the value of the description. If setting $this will be returned
*/
Expand All @@ -251,7 +251,7 @@ public function description($text = null) {
* Get or set an epilog to the parser. The epilog is added to the end of
* the options and arguments listing when help is generated.
*
* @param mixed $text Text when setting or null when reading. If an array the text will be imploded with "\n"
* @param string|array $text Text when setting or null when reading. If an array the text will be imploded with "\n"
* @return mixed If reading, the value of the epilog. If setting $this will be returned.
*/
public function epilog($text = null) {
Expand Down Expand Up @@ -282,7 +282,7 @@ public function epilog($text = null) {
* - `choices` A list of valid choices for this option. If left empty all values are valid..
* An exception will be raised when parse() encounters an invalid value.
*
* @param mixed $name The long name you want to the value to be parsed out as when options are parsed.
* @param ConsoleInputOption|string $name The long name you want to the value to be parsed out as when options are parsed.
* Will also accept an instance of ConsoleInputOption
* @param array $options An array of parameters that define the behavior of the option
* @return ConsoleOptionParser $this.
Expand Down Expand Up @@ -323,7 +323,7 @@ public function addOption($name, $options = array()) {
* - `choices` A list of valid choices for this argument. If left empty all values are valid..
* An exception will be raised when parse() encounters an invalid value.
*
* @param mixed $name The name of the argument. Will also accept an instance of ConsoleInputArgument
* @param ConsoleInputArgument|string $name The name of the argument. Will also accept an instance of ConsoleInputArgument
* @param array $params Parameters for the argument, see above.
* @return ConsoleOptionParser $this.
*/
Expand Down Expand Up @@ -389,7 +389,7 @@ public function addOptions(array $options) {
* specific option parsers. When help is generated for a subcommand, if a parser is present
* it will be used.
*
* @param mixed $name Name of the subcommand. Will also accept an instance of ConsoleInputSubcommand
* @param ConsoleInputSubcommand|string $name Name of the subcommand. Will also accept an instance of ConsoleInputSubcommand
* @param array $options Array of params, see above.
* @return ConsoleOptionParser $this.
*/
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Console/ConsoleOutput.php
Expand Up @@ -156,7 +156,7 @@ public function __construct($stream = 'php://stdout') {
* Outputs a single or multiple messages to stdout. If no parameters
* are passed, outputs just a newline.
*
* @param mixed $message A string or a an array of strings to output
* @param string|array $message A string or a an array of strings to output
* @param integer $newlines Number of newlines to append
* @return integer Returns the number of bytes returned from writing to stdout.
*/
Expand Down Expand Up @@ -244,7 +244,7 @@ protected function _write($message) {
* `$this->output->styles('annoy', false);`
*
* @param string $style The style to get or create.
* @param mixed $definition The array definition of the style to change or create a style
* @param array $definition The array definition of the style to change or create a style
* or false to remove a style.
* @return mixed If you are getting styles, the style or null will be returned. If you are creating/modifying
* styles true will be returned.
Expand Down
10 changes: 5 additions & 5 deletions lib/Cake/Console/Shell.php
Expand Up @@ -454,7 +454,7 @@ public function __get($name) {
* Prompts the user for input, and returns it.
*
* @param string $prompt Prompt text.
* @param mixed $options Array or string of options.
* @param string|array $options Array or string of options.
* @param string $default Default input value.
* @return mixed Either the default value, or the user-provided input.
* @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::in
Expand Down Expand Up @@ -492,7 +492,7 @@ public function in($prompt, $options = null, $default = null) {
* Prompts the user for input, and returns it.
*
* @param string $prompt Prompt text.
* @param mixed $options Array or string of options.
* @param string|array $options Array or string of options.
* @param string $default Default input value.
* @return Either the default value, or the user-provided input.
*/
Expand Down Expand Up @@ -532,7 +532,7 @@ protected function _getInput($prompt, $options, $default) {
* - `indent` Indent the text with the string provided. Defaults to null.
*
* @param string $text Text the text to format.
* @param mixed $options Array of options to use, or an integer to wrap the text to.
* @param string|integer|array $options Array of options to use, or an integer to wrap the text to.
* @return string Wrapped / indented text
* @see String::wrap()
* @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::wrapText
Expand All @@ -552,7 +552,7 @@ public function wrapText($text, $options = array()) {
* present in most shells. Using Shell::QUIET for a message means it will always display.
* While using Shell::VERBOSE means it will only display when verbose output is toggled.
*
* @param mixed $message A string or a an array of strings to output
* @param string|array $message A string or a an array of strings to output
* @param integer $newlines Number of newlines to append
* @param integer $level The message's output level, see above.
* @return integer|boolean Returns the number of bytes returned from writing to stdout.
Expand All @@ -576,7 +576,7 @@ public function out($message = null, $newlines = 1, $level = Shell::NORMAL) {
* Outputs a single or multiple error messages to stderr. If no parameters
* are passed outputs just a newline.
*
* @param mixed $message A string or a an array of strings to output
* @param string|array $message A string or a an array of strings to output
* @param integer $newlines Number of newlines to append
* @return void
* @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::err
Expand Down
Expand Up @@ -39,7 +39,7 @@ class PagesController extends AppController {
/**
* Displays a view
*
* @param mixed What page to display
* @param string What page to display
*/
public function display() {
$path = func_get_args();
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Controller/Component/Acl/PhpAcl.php
Expand Up @@ -403,7 +403,7 @@ public function __construct(array $aro = array(), array $map = array(), array $a
* index. The resulting array will contain a prioritized list of (list of) roles ordered from
* the most distant AROs to the requested one itself.
*
* @param mixed $aro An ARO identifier
* @param string|array $aro An ARO identifier
* @return array prioritized AROs
*/
public function roles($aro) {
Expand All @@ -429,7 +429,7 @@ public function roles($aro) {
* resolve an ARO identifier to an internal ARO string using
* the internal mapping information.
*
* @param mixed $aro ARO identifier (User.jeff, array('User' => ...), etc)
* @param string|array $aro ARO identifier (User.jeff, array('User' => ...), etc)
* @return string internal aro string (e.g. User/jeff, Role/default)
*/
public function resolve($aro) {
Expand Down
28 changes: 14 additions & 14 deletions lib/Cake/Controller/Component/AclComponent.php
Expand Up @@ -76,8 +76,8 @@ public function __construct(ComponentCollection $collection, $settings = array()
*
* Will call the initialize method on the adapter if setting a new one.
*
* @param mixed $adapter Instance of AclInterface or a string name of the class to use. (optional)
* @return mixed either null, or the adapter implementation.
* @param AclInterface|string $adapter Instance of AclInterface or a string name of the class to use. (optional)
* @return AclInterface|void either null, or the adapter implementation.
* @throws CakeException when the given class is not an instance of AclInterface
*/
public function adapter($adapter = null) {
Expand All @@ -99,8 +99,8 @@ public function adapter($adapter = null) {
* Pass-thru function for ACL check instance. Check methods
* are used to check whether or not an ARO can access an ACO
*
* @param mixed $aro ARO The requesting object identifier. See `AclNode::node()` for possible formats
* @param mixed $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
* @param array|string|Model $aro ARO The requesting object identifier. See `AclNode::node()` for possible formats
* @param array|string|Model $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
* @param string $action Action (defaults to *)
* @return boolean Success
*/
Expand All @@ -112,8 +112,8 @@ public function check($aro, $aco, $action = "*") {
* Pass-thru function for ACL allow instance. Allow methods
* are used to grant an ARO access to an ACO.
*
* @param mixed $aro ARO The requesting object identifier. See `AclNode::node()` for possible formats
* @param mixed $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
* @param array|string|Model $aro ARO The requesting object identifier. See `AclNode::node()` for possible formats
* @param array|string|Model $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
* @param string $action Action (defaults to *)
* @return boolean Success
*/
Expand All @@ -125,8 +125,8 @@ public function allow($aro, $aco, $action = "*") {
* Pass-thru function for ACL deny instance. Deny methods
* are used to remove permission from an ARO to access an ACO.
*
* @param mixed $aro ARO The requesting object identifier. See `AclNode::node()` for possible formats
* @param mixed $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
* @param array|string|Model $aro ARO The requesting object identifier. See `AclNode::node()` for possible formats
* @param array|string|Model $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
* @param string $action Action (defaults to *)
* @return boolean Success
*/
Expand All @@ -138,8 +138,8 @@ public function deny($aro, $aco, $action = "*") {
* Pass-thru function for ACL inherit instance. Inherit methods
* modify the permission for an ARO to be that of its parent object.
*
* @param mixed $aro ARO The requesting object identifier. See `AclNode::node()` for possible formats
* @param mixed $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
* @param array|string|Model $aro ARO The requesting object identifier. See `AclNode::node()` for possible formats
* @param array|string|Model $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
* @param string $action Action (defaults to *)
* @return boolean Success
*/
Expand All @@ -150,8 +150,8 @@ public function inherit($aro, $aco, $action = "*") {
/**
* Pass-thru function for ACL grant instance. An alias for AclComponent::allow()
*
* @param mixed $aro ARO The requesting object identifier. See `AclNode::node()` for possible formats
* @param mixed $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
* @param array|string|Model $aro ARO The requesting object identifier. See `AclNode::node()` for possible formats
* @param array|string|Model $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
* @param string $action Action (defaults to *)
* @return boolean Success
* @deprecated
Expand All @@ -164,8 +164,8 @@ public function grant($aro, $aco, $action = "*") {
/**
* Pass-thru function for ACL grant instance. An alias for AclComponent::deny()
*
* @param mixed $aro ARO The requesting object identifier. See `AclNode::node()` for possible formats
* @param mixed $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
* @param array|string|Model $aro ARO The requesting object identifier. See `AclNode::node()` for possible formats
* @param array|string|Model $aco ACO The controlled object identifier. See `AclNode::node()` for possible formats
* @param string $action Action (defaults to *)
* @return boolean Success
* @deprecated
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Controller/Component/Auth/BaseAuthorize.php
Expand Up @@ -85,7 +85,7 @@ abstract public function authorize($user, CakeRequest $request);
/**
* Accessor to the controller object.
*
* @param mixed $controller null to get, a controller to set.
* @param Controller $controller null to get, a controller to set.
* @return mixed
* @throws CakeException
*/
Expand Down Expand Up @@ -139,7 +139,7 @@ public function action($request, $path = '/:plugin/:controller/:action') {
* permissions lookup. When using with DbAcl, you'll have to add additional _admin type columns
* to the `aros_acos` table.
*
* @param mixed $map Either an array of mappings, or undefined to get current values.
* @param array $map Either an array of mappings, or undefined to get current values.
* @return mixed Either the current mappings or null when setting.
* @see AuthComponent::mapActions()
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/Auth/ControllerAuthorize.php
Expand Up @@ -40,7 +40,7 @@ class ControllerAuthorize extends BaseAuthorize {
/**
* Get/set the controller this authorize object will be working with. Also checks that isAuthorized is implemented.
*
* @param mixed $controller null to get, a controller to set.
* @param Controller $controller null to get, a controller to set.
* @return mixed
* @throws CakeException
*/
Expand Down

0 comments on commit f7ce526

Please sign in to comment.