Skip to content

Commit

Permalink
Clean up the doc blocks around mixed.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Jan 16, 2016
1 parent a449b22 commit 62b83e6
Show file tree
Hide file tree
Showing 41 changed files with 90 additions and 89 deletions.
8 changes: 4 additions & 4 deletions src/Controller/Component/AuthComponent.php
Expand Up @@ -502,13 +502,13 @@ public function isAuthorized($user = null, Request $request = null)
/**
* Loads the authorization objects configured.
*
* @return mixed Either null when authorize is empty, or the loaded authorization objects.
* @return array|null The loaded authorization objects, or null when authorize is empty.
* @throws \Cake\Core\Exception\Exception
*/
public function constructAuthorize()
{
if (empty($this->_config['authorize'])) {
return;
return null;
}
$this->_authorizeObjects = [];
$authorize = Hash::normalize((array)$this->_config['authorize']);
Expand Down Expand Up @@ -782,7 +782,7 @@ public function identify()
/**
* Loads the configured authentication objects.
*
* @return mixed either null on empty authenticate value, or an array of loaded objects.
* @return array|null The loaded authorization objects, or null on empty authenticate value.
* @throws \Cake\Core\Exception\Exception
*/
public function constructAuthenticate()
Expand Down Expand Up @@ -822,7 +822,7 @@ public function constructAuthenticate()
* Get/set user record storage object.
*
* @param \Cake\Auth\Storage\StorageInterface|null $storage Sets provided
* object as storage or if null returns configuread storage object.
* object as storage or if null returns configured storage object.
* @return \Cake\Auth\Storage\StorageInterface|null
*/
public function storage(StorageInterface $storage = null)
Expand Down
4 changes: 2 additions & 2 deletions src/Controller/Controller.php
Expand Up @@ -112,7 +112,7 @@ class Controller implements EventListenerInterface, EventDispatcherInterface
* public $helpers = ['Form', 'Html', 'Time'];
* ```
*
* @var mixed
* @var array
* @link http://book.cakephp.org/3.0/en/controllers.html#configuring-helpers-to-load
*/
public $helpers = [];
Expand Down Expand Up @@ -211,7 +211,7 @@ class Controller implements EventListenerInterface, EventDispatcherInterface
/**
* Holds all passed params.
*
* @var mixed
* @var array
* @deprecated 3.1.0 Use `$this->request->params['pass']` instead.
*/
public $passedArgs = [];
Expand Down
2 changes: 1 addition & 1 deletion src/Core/ClassLoader.php
Expand Up @@ -71,7 +71,7 @@ public function addNamespace($prefix, $baseDir, $prepend = false)
* Loads the class file for a given class name.
*
* @param string $class The fully-qualified class name.
* @return mixed The mapped file name on success, or boolean false on
* @return string|bool The mapped file name on success, or boolean false on
* failure.
*/
public function loadClass($class)
Expand Down
6 changes: 3 additions & 3 deletions src/Core/Configure.php
Expand Up @@ -281,7 +281,7 @@ public static function drop($name)
* @param string $key name of configuration resource to load.
* @param string $config Name of the configured engine to use to read the resource identified by $key.
* @param bool $merge if config files should be merged instead of simply overridden
* @return mixed false if file not found, void if load successful.
* @return bool False if file not found, true if load successful.
* @link http://book.cakephp.org/3.0/en/development/configuration.html#reading-and-writing-configuration-files
*/
public static function load($key, $config = 'default', $merge = true)
Expand Down Expand Up @@ -325,7 +325,7 @@ public static function load($key, $config = 'default', $merge = true)
* @param string $config The name of the configured adapter to dump data with.
* @param array $keys The name of the top-level keys you want to dump.
* This allows you save only some data stored in Configure.
* @return bool success
* @return bool Success
* @throws \Cake\Core\Exception\Exception if the adapter does not implement a `dump` method.
*/
public static function dump($key, $config = 'default', $keys = [])
Expand All @@ -346,7 +346,7 @@ public static function dump($key, $config = 'default', $keys = [])
* Will create new PhpConfig for default if not configured yet.
*
* @param string $config The name of the configured adapter
* @return mixed Engine instance or false
* @return ConfigEngineInterface|bool Engine instance or false
*/
protected static function _getEngine($config)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Plugin.php
Expand Up @@ -345,7 +345,7 @@ public static function routes($plugin = null)
* If plugin is null, it will return a list of all loaded plugins
*
* @param string $plugin Plugin name.
* @return mixed boolean true if $plugin is already loaded.
* @return bool|array Boolean true if $plugin is already loaded.
* If $plugin is null, returns a list of plugins that have been loaded
*/
public static function loaded($plugin = null)
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Connection.php
Expand Up @@ -610,7 +610,7 @@ public function inTransaction()
*
* @param mixed $value The value to quote.
* @param string $type Type to be used for determining kind of quoting to perform
* @return mixed quoted value
* @return String Quoted value
*/
public function quote($value, $type = null)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Driver/PDODriverTrait.php
Expand Up @@ -56,7 +56,7 @@ protected function _connect($dsn, array $config)
* result to the value passed
*
* @param null|\PDO $connection The PDO connection instance.
* @return mixed connection object used internally
* @return \PDO connection object used internally
*/
public function connection($connection = null)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Database/Statement/BufferedStatement.php
Expand Up @@ -78,7 +78,7 @@ public function execute($params = null)
* {@inheritDoc}
*
* @param string $type The type to fetch.
* @return mixed
* @return array|bool
*/
public function fetch($type = 'num')
{
Expand Down Expand Up @@ -106,7 +106,7 @@ public function fetch($type = 'num')
* {@inheritDoc}
*
* @param string $type The type to fetch.
* @return mixed
* @return array
*/
public function fetchAll($type = 'num')
{
Expand Down
4 changes: 2 additions & 2 deletions src/Database/Statement/CallbackStatement.php
Expand Up @@ -49,7 +49,7 @@ public function __construct($statement, $driver, $callback)
* The result will be processed by the callback when it is not `false`.
*
* @param string $type Either 'num' or 'assoc' to indicate the result format you would like.
* @return mixed
* @return array|bool
*/
public function fetch($type = 'num')
{
Expand All @@ -64,7 +64,7 @@ public function fetch($type = 'num')
* Each row in the result will be processed by the callback when it is not `false.
*
* @param string $type Either 'num' or 'assoc' to indicate the result format you would like.
* @return mixed
* @return array
*/
public function fetchAll($type = 'num')
{
Expand Down
4 changes: 2 additions & 2 deletions src/Database/Statement/StatementDecorator.php
Expand Up @@ -185,7 +185,7 @@ public function execute($params = null)
* ```
*
* @param string $type 'num' for positional columns, assoc for named columns
* @return mixed Result array containing columns and values or false if no results
* @return array|bool Result array containing columns and values or false if no results
* are left
*/
public function fetch($type = 'num')
Expand All @@ -205,7 +205,7 @@ public function fetch($type = 'num')
* ```
*
* @param string $type num for fetching columns as positional keys or assoc for column names as keys
* @return array list of all results from database for this statement
* @return array List of all results from database for this statement
*/
public function fetchAll($type = 'num')
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/StatementInterface.php
Expand Up @@ -107,7 +107,7 @@ public function execute($params = null);
* ```
*
* @param string $type 'num' for positional columns, assoc for named columns
* @return mixed Result array containing columns and values or false if no results
* @return array|bool Result array containing columns and values or false if no results
* are left
*/
public function fetch($type = 'num');
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Type/BoolType.php
Expand Up @@ -85,7 +85,7 @@ public function toStatement($value, Driver $driver)
* Marshalls request data into PHP booleans.
*
* @param mixed $value The value to convert.
* @return mixed Converted value.
* @return bool|null Converted value.
*/
public function marshal($value)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Type/IntegerType.php
Expand Up @@ -78,7 +78,7 @@ public function toStatement($value, Driver $driver)
* Marshalls request data into PHP floats.
*
* @param mixed $value The value to convert.
* @return mixed Converted value.
* @return int|null Converted value.
*/
public function marshal($value)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Type/StringType.php
Expand Up @@ -82,7 +82,7 @@ public function toStatement($value, Driver $driver)
* Marshalls request data into PHP strings.
*
* @param mixed $value The value to convert.
* @return mixed Converted value.
* @return string|null Converted value.
*/
public function marshal($value)
{
Expand Down
6 changes: 3 additions & 3 deletions src/Database/Type/UuidType.php
Expand Up @@ -20,7 +20,7 @@
use PDO;

/**
* Provides behavior for the uuid type
* Provides behavior for the UUID type
*/
class UuidType extends StringType
{
Expand All @@ -30,7 +30,7 @@ class UuidType extends StringType
*
* @param mixed $value value to be converted to database equivalent
* @param Driver $driver object from which database preferences and configuration will be extracted
* @return mixed
* @return string|null
*/
public function toDatabase($value, Driver $driver)
{
Expand All @@ -52,7 +52,7 @@ public function newId()
}

/**
* Marshalls request data into a PHP string
* Marshals request data into a PHP string
*
* @param mixed $value The value to convert.
* @return string|null Converted value.
Expand Down
10 changes: 5 additions & 5 deletions src/Datasource/ConnectionManager.php
Expand Up @@ -67,7 +67,7 @@ class ConnectionManager
*
* @param string|array $key The name of the connection config, or an array of multiple configs.
* @param array $config An array of name => config data for adapter.
* @return mixed null when adding configuration and an array of configuration data when reading.
* @return array|null Null when adding configuration and an array of configuration data when reading.
* @throws \Cake\Core\Exception\Exception When trying to modify an existing config.
* @see \Cake\Core\StaticConfigTrait::config()
*/
Expand Down Expand Up @@ -99,9 +99,9 @@ public static function config($key, $config = null)
* For all classes, the value of `scheme` is set as the value of both the `className` and `driver`
* unless they have been otherwise specified.
*
* Note that querystring arguments are also parsed and set as values in the returned configuration.
* Note that query-string arguments are also parsed and set as values in the returned configuration.
*
* @param string $config The DSN string to convert to a configuration array
* @param string|null $config The DSN string to convert to a configuration array
* @return array The configuration array to be stored after parsing the DSN
*/
public static function parseDsn($config = null)
Expand All @@ -125,7 +125,7 @@ public static function parseDsn($config = null)
* Set one or more connection aliases.
*
* Connection aliases allow you to rename active connections without overwriting
* the aliased connection. This is most useful in the testsuite for replacing
* the aliased connection. This is most useful in the test-suite for replacing
* connections with their test variant.
*
* Defined aliases will take precedence over normal connection names. For example,
Expand Down Expand Up @@ -169,7 +169,7 @@ public static function dropAlias($name)
*
* If the connection has not been constructed an instance will be added
* to the registry. This method will use any aliases that have been
* defined. If you want the original unaliased connections pass `FALSE`
* defined. If you want the original unaliased connections pass `false`
* as second parameter.
*
* @param string $name The connection name.
Expand Down
2 changes: 1 addition & 1 deletion src/Error/Debugger.php
Expand Up @@ -585,7 +585,7 @@ protected static function _object($var, $depth, $indent)
*
* @param string|null $format The format you want errors to be output as.
* Leave null to get the current format.
* @return mixed Returns null when setting. Returns the current format when getting.
* @return string|null Returns null when setting. Returns the current format when getting.
* @throws \InvalidArgumentException When choosing a format that doesn't exist.
*/
public static function outputAs($format = null)
Expand Down
4 changes: 2 additions & 2 deletions src/Filesystem/File.php
Expand Up @@ -143,7 +143,7 @@ public function open($mode = 'r', $force = false)
* @param string|bool $bytes where to start
* @param string $mode A `fread` compatible mode.
* @param bool $force If true then the file will be re-opened even if its already opened, otherwise it won't
* @return mixed string on success, false on failure
* @return string|false string on success, false on failure
*/
public function read($bytes = false, $mode = 'rb', $force = false)
{
Expand Down Expand Up @@ -179,7 +179,7 @@ public function read($bytes = false, $mode = 'rb', $force = false)
*
* @param int|bool $offset The $offset in bytes to seek. If set to false then the current offset is returned.
* @param int $seek PHP Constant SEEK_SET | SEEK_CUR | SEEK_END determining what the $offset is relative to
* @return mixed True on success, false on failure (set mode), false on failure or integer offset on success (get mode)
* @return int|bool True on success, false on failure (set mode), false on failure or integer offset on success (get mode)
*/
public function offset($offset = false, $seek = SEEK_SET)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Filesystem/Folder.php
Expand Up @@ -163,7 +163,7 @@ public function cd($path)
* to false to get unsorted results.
* @param array|bool $exceptions Either an array or boolean true will not grab dot files
* @param bool $fullPath True returns the full path
* @return mixed Contents of current directory as an array, an empty array on failure
* @return array Contents of current directory as an array, an empty array on failure
*/
public function read($sort = true, $exceptions = false, $fullPath = false)
{
Expand Down Expand Up @@ -451,7 +451,7 @@ public function chmod($path, $mode = false, $recursive = true, array $exceptions
* @param array|bool $exceptions Either an array of files/folder to exclude
* or boolean true to not grab dot files/folders
* @param string|null $type either 'file' or 'dir'. Null returns both files and directories
* @return mixed array of nested directories and files in each directory
* @return array Array of nested directories and files in each directory
*/
public function tree($path = null, $exceptions = false, $type = null)
{
Expand Down
7 changes: 4 additions & 3 deletions src/I18n/Time.php
Expand Up @@ -14,6 +14,7 @@
*/
namespace Cake\I18n;

use Cake\Core\Exception\Exception;
use Carbon\Carbon;
use DateTime;
use DateTimeZone;
Expand Down Expand Up @@ -192,7 +193,7 @@ public function isThisYear()
* Returns the quarter
*
* @param bool $range Range.
* @return mixed 1, 2, 3, or 4 quarter of year or array if $range true
* @return int|array 1, 2, 3, or 4 quarter of year, or array if $range true
*/
public function toQuarter($range = false)
{
Expand Down Expand Up @@ -241,8 +242,8 @@ public function toUnixString()
* - minute => The format if minutes > 0 (default "minute")
* - second => The format if seconds > 0 (default "second")
* - `end` => The end of relative time telling
* - `relativeString` => The printf compatible string when outputting relative time
* - `absoluteString` => The printf compatible string when outputting absolute time
* - `relativeString` => The `printf` compatible string when outputting relative time
* - `absoluteString` => The `printf` compatible string when outputting absolute time
* - `timezone` => The user timezone the timestamp should be formatted in.
*
* Relative dates look something like this:
Expand Down
8 changes: 4 additions & 4 deletions src/I18n/functions.php
Expand Up @@ -20,13 +20,13 @@
*
* @param string $singular Text to translate.
* @param mixed $args Array with arguments or multiple arguments in function.
* @return mixed Translated string.
* @return string|null The translated text, or null if invalid.
* @link http://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#__
*/
function __($singular, $args = null)
{
if (!$singular) {
return;
return null;
}

$arguments = func_num_args() === 2 ? (array)$args : array_slice(func_get_args(), 1);
Expand All @@ -44,13 +44,13 @@ function __($singular, $args = null)
* @param string $plural Plural text.
* @param int $count Count.
* @param mixed $args Array with arguments or multiple arguments in function.
* @return mixed Plural form of translated string.
* @return string|null Plural form of translated string, or null if invalid.
* @link http://book.cakephp.org/3.0/en/core-libraries/global-constants-and-functions.html#__n
*/
function __n($singular, $plural, $count, $args = null)
{
if (!$singular) {
return;
return null;
}

$arguments = func_num_args() === 4 ? (array)$args : array_slice(func_get_args(), 3);
Expand Down
6 changes: 3 additions & 3 deletions src/Log/Engine/FileLog.php
Expand Up @@ -178,8 +178,8 @@ protected function _getFilename($level)
* Also if `rotate` count is reached oldest file is removed.
*
* @param string $filename Log file name
* @return mixed True if rotated successfully or false in case of error.
* Void if file doesn't need to be rotated.
* @return bool|null True if rotated successfully or false in case of error.
* Null if file doesn't need to be rotated.
*/
protected function _rotateFile($filename)
{
Expand All @@ -189,7 +189,7 @@ protected function _rotateFile($filename)
if (!file_exists($filepath) ||
filesize($filepath) < $this->_size
) {
return;
return null;
}

$rotate = $this->_config['rotate'];
Expand Down

0 comments on commit 62b83e6

Please sign in to comment.