mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-14 06:11:35 +08:00
Fixes #12055: Changed boolean
to bool
and integer
to int
in phpdoc
This commit is contained in:

committed by
Alexander Makarov

parent
940f7c7cd4
commit
4aa935e69e
@ -53,7 +53,7 @@ class BaseArrayHelper
|
||||
* ]
|
||||
* ```
|
||||
*
|
||||
* @param boolean $recursive whether to recursively converts properties which are objects into arrays.
|
||||
* @param bool $recursive whether to recursively converts properties which are objects into arrays.
|
||||
* @return array the array representation of the object
|
||||
*/
|
||||
public static function toArray($object, $properties = [], $recursive = true)
|
||||
@ -434,7 +434,7 @@ class BaseArrayHelper
|
||||
*
|
||||
* @param array $array
|
||||
* @param string|\Closure $name
|
||||
* @param boolean $keepKeys whether to maintain the array keys. If false, the resulting array
|
||||
* @param bool $keepKeys whether to maintain the array keys. If false, the resulting array
|
||||
* will be re-indexed with integers.
|
||||
* @return array the list of column values
|
||||
*/
|
||||
@ -517,8 +517,8 @@ class BaseArrayHelper
|
||||
* key comparison.
|
||||
* @param string $key the key to check
|
||||
* @param array $array the array with keys to check
|
||||
* @param boolean $caseSensitive whether the key comparison should be case-sensitive
|
||||
* @return boolean whether the array contains the specified key
|
||||
* @param bool $caseSensitive whether the key comparison should be case-sensitive
|
||||
* @return bool whether the array contains the specified key
|
||||
*/
|
||||
public static function keyExists($key, $array, $caseSensitive = true)
|
||||
{
|
||||
@ -544,9 +544,9 @@ class BaseArrayHelper
|
||||
* elements, a property name of the objects, or an anonymous function returning the values for comparison
|
||||
* purpose. The anonymous function signature should be: `function($item)`.
|
||||
* To sort by multiple keys, provide an array of keys here.
|
||||
* @param integer|array $direction the sorting direction. It can be either `SORT_ASC` or `SORT_DESC`.
|
||||
* @param int|array $direction the sorting direction. It can be either `SORT_ASC` or `SORT_DESC`.
|
||||
* When sorting by multiple keys with different sorting directions, use an array of sorting directions.
|
||||
* @param integer|array $sortFlag the PHP sort flag. Valid values include
|
||||
* @param int|array $sortFlag the PHP sort flag. Valid values include
|
||||
* `SORT_REGULAR`, `SORT_NUMERIC`, `SORT_STRING`, `SORT_LOCALE_STRING`, `SORT_NATURAL` and `SORT_FLAG_CASE`.
|
||||
* Please refer to [PHP manual](http://php.net/manual/en/function.sort.php)
|
||||
* for more details. When sorting by multiple keys with different sort flags, use an array of sort flags.
|
||||
@ -594,7 +594,7 @@ class BaseArrayHelper
|
||||
* If a value is an array, this method will also encode it recursively.
|
||||
* Only string values will be encoded.
|
||||
* @param array $data data to be encoded
|
||||
* @param boolean $valuesOnly whether to encode array values only. If false,
|
||||
* @param bool $valuesOnly whether to encode array values only. If false,
|
||||
* both the array keys and array values will be encoded.
|
||||
* @param string $charset the charset that the data is using. If not set,
|
||||
* [[\yii\base\Application::charset]] will be used.
|
||||
@ -629,7 +629,7 @@ class BaseArrayHelper
|
||||
* If a value is an array, this method will also decode it recursively.
|
||||
* Only string values will be decoded.
|
||||
* @param array $data data to be decoded
|
||||
* @param boolean $valuesOnly whether to decode array values only. If false,
|
||||
* @param bool $valuesOnly whether to decode array values only. If false,
|
||||
* both the array keys and array values will be decoded.
|
||||
* @return array the decoded data
|
||||
* @see http://www.php.net/manual/en/function.htmlspecialchars-decode.php
|
||||
@ -662,9 +662,9 @@ class BaseArrayHelper
|
||||
* Note that an empty array will NOT be considered associative.
|
||||
*
|
||||
* @param array $array the array being checked
|
||||
* @param boolean $allStrings whether the array keys must be all strings in order for
|
||||
* @param bool $allStrings whether the array keys must be all strings in order for
|
||||
* the array to be treated as associative.
|
||||
* @return boolean whether the array is associative
|
||||
* @return bool whether the array is associative
|
||||
*/
|
||||
public static function isAssociative($array, $allStrings = true)
|
||||
{
|
||||
@ -698,9 +698,9 @@ class BaseArrayHelper
|
||||
* Note that an empty array will be considered indexed.
|
||||
*
|
||||
* @param array $array the array being checked
|
||||
* @param boolean $consecutive whether the array keys must be a consecutive sequence
|
||||
* @param bool $consecutive whether the array keys must be a consecutive sequence
|
||||
* in order for the array to be treated as indexed.
|
||||
* @return boolean whether the array is associative
|
||||
* @return bool whether the array is associative
|
||||
*/
|
||||
public static function isIndexed($array, $consecutive = false)
|
||||
{
|
||||
@ -731,8 +731,8 @@ class BaseArrayHelper
|
||||
* but additionally works for objects that implement the [[\Traversable]] interface.
|
||||
* @param mixed $needle The value to look for.
|
||||
* @param array|\Traversable $haystack The set of values to search.
|
||||
* @param boolean $strict Whether to enable strict (`===`) comparison.
|
||||
* @return boolean `true` if `$needle` was found in `$haystack`, `false` otherwise.
|
||||
* @param bool $strict Whether to enable strict (`===`) comparison.
|
||||
* @return bool `true` if `$needle` was found in `$haystack`, `false` otherwise.
|
||||
* @throws InvalidParamException if `$haystack` is neither traversable nor an array.
|
||||
* @see http://php.net/manual/en/function.in-array.php
|
||||
* @since 2.0.7
|
||||
@ -760,7 +760,7 @@ class BaseArrayHelper
|
||||
* This method does the same as the PHP function [is_array()](http://php.net/manual/en/function.is-array.php)
|
||||
* but additionally works on objects that implement the [[\Traversable]] interface.
|
||||
* @param mixed $var The variable being evaluated.
|
||||
* @return boolean whether $var is array-like
|
||||
* @return bool whether $var is array-like
|
||||
* @see http://php.net/manual/en/function.is_array.php
|
||||
* @since 2.0.8
|
||||
*/
|
||||
@ -776,9 +776,9 @@ class BaseArrayHelper
|
||||
* `$haystack`. If at least one element is missing, `false` will be returned.
|
||||
* @param array|\Traversable $needles The values that must **all** be in `$haystack`.
|
||||
* @param array|\Traversable $haystack The set of value to search.
|
||||
* @param boolean $strict Whether to enable strict (`===`) comparison.
|
||||
* @param bool $strict Whether to enable strict (`===`) comparison.
|
||||
* @throws InvalidParamException if `$haystack` or `$needles` is neither traversable nor an array.
|
||||
* @return boolean `true` if `$needles` is a subset of `$haystack`, `false` otherwise.
|
||||
* @return bool `true` if `$needles` is a subset of `$haystack`, `false` otherwise.
|
||||
* @since 2.0.7
|
||||
*/
|
||||
public static function isSubset($needles, $haystack, $strict = false)
|
||||
|
Reference in New Issue
Block a user