Skip to content

Commit

Permalink
Merge pull request #11263 from lustyrain/2.x
Browse files Browse the repository at this point in the history
Fix: phpDocs miss
  • Loading branch information
markstory committed Oct 4, 2017
2 parents 1b36417 + e1e5a29 commit b3d83af
Show file tree
Hide file tree
Showing 15 changed files with 24 additions and 24 deletions.
8 changes: 4 additions & 4 deletions lib/Cake/Console/Shell.php
Expand Up @@ -415,7 +415,7 @@ public function dispatchShell() {
* @param string $command The command name to run on this shell. If this argument is empty,
* and the shell has a `main()` method, that will be called instead.
* @param array $argv Array of arguments to run the shell with. This array should be missing the shell name.
* @return void
* @return int|bool
* @link https://book.cakephp.org/2.0/en/console-and-shells.html#Shell::runCommand
*/
public function runCommand($command, $argv) {
Expand Down Expand Up @@ -469,7 +469,7 @@ public function runCommand($command, $argv) {
* Display the help in the correct format
*
* @param string $command The command to get help for.
* @return void
* @return int|bool
*/
protected function _displayHelp($command) {
$format = 'text';
Expand Down Expand Up @@ -571,7 +571,7 @@ public function in($prompt, $options = null, $default = null) {
* @param string $prompt Prompt text.
* @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.
* @return string|int the default value, or the user-provided input.
*/
protected function _getInput($prompt, $options, $default) {
if (!is_array($options)) {
Expand Down Expand Up @@ -726,7 +726,7 @@ public function hr($newlines = 0, $width = 63) {
*
* @param string $title Title of the error
* @param string $message An optional error message
* @return void
* @return int
* @link https://book.cakephp.org/2.0/en/console-and-shells.html#Shell::error
*/
public function error($title, $message = null) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/Acl/DbAcl.php
Expand Up @@ -52,7 +52,7 @@ public function __construct() {
/**
* Initializes the containing component and sets the Aro/Aco objects to it.
*
* @param AclComponent $component The AclComponent instance.
* @param Component $component The AclComponent instance.
* @return void
*/
public function initialize(Component $component) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/Auth/DigestAuthenticate.php
Expand Up @@ -136,7 +136,7 @@ public function getUser(CakeRequest $request) {
/**
* Gets the digest headers from the request/environment.
*
* @return array Array of digest information.
* @return array|bool|null Array of digest information.
*/
protected function _getDigest() {
$digest = env('PHP_AUTH_DIGEST');
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/AuthComponent.php
Expand Up @@ -761,7 +761,7 @@ public function redirectUrl($url = null) {
*
* @param CakeRequest $request The request that contains authentication data.
* @param CakeResponse $response The response
* @return array User record data, or false, if the user could not be identified.
* @return array|bool User record data, or false, if the user could not be identified.
*/
public function identify(CakeRequest $request, CakeResponse $response) {
if (empty($this->_authenticateObjects)) {
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Controller/Component/CookieComponent.php
Expand Up @@ -494,7 +494,7 @@ protected function _encrypt($value) {
* Decrypts $value using public $type method in Security class
*
* @param array $values Values to decrypt
* @return string decrypted string
* @return array decrypted string
*/
protected function _decrypt($values) {
$decrypted = array();
Expand All @@ -516,7 +516,7 @@ protected function _decrypt($values) {
* Decodes and decrypts a single value.
*
* @param string $value The value to decode & decrypt.
* @return string Decoded value.
* @return string|array Decoded value.
*/
protected function _decode($value) {
$prefix = 'Q2FrZQ==.';
Expand Down Expand Up @@ -552,7 +552,7 @@ protected function _implode(array $array) {
* Maintains reading backwards compatibility with 1.x CookieComponent::_implode().
*
* @param string $string A string containing JSON encoded data, or a bare string.
* @return array Map of key and values
* @return string|array Map of key and values
*/
protected function _explode($string) {
$first = substr($string, 0, 1);
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/EmailComponent.php
Expand Up @@ -282,7 +282,7 @@ public function initialize(Controller $controller) {
* If you are rendering a template this variable will be sent to the templates as `$content`
* @param string $template Template to use when sending email
* @param string $layout Layout to use to enclose email body
* @return bool Success
* @return array Success
*/
public function send($content = null, $template = null, $layout = null) {
$lib = new CakeEmail();
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Event/CakeEvent.php
Expand Up @@ -111,7 +111,7 @@ public function subject() {
/**
* Stops the event from being used anymore
*
* @return void
* @return bool
*/
public function stopPropagation() {
return $this->_stopped = true;
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Model/Behavior/TranslateBehavior.php
Expand Up @@ -432,7 +432,7 @@ public function beforeSave(Model $Model, $options = array()) {
* is disabled.
*
* @param Model $Model Model using this behavior.
* @return void
* @return bool true.
*/
protected function _setRuntimeData(Model $Model) {
$locale = $this->_getLocale($Model);
Expand Down Expand Up @@ -465,7 +465,7 @@ protected function _setRuntimeData(Model $Model) {
* This solves issues with saveAssociated and validate = first.
*
* @param Model $Model Model using this behavior.
* @return void
* @return bool true.
*/
public function afterValidate(Model $Model) {
$Model->data[$Model->alias] = array_merge(
Expand All @@ -481,7 +481,7 @@ public function afterValidate(Model $Model) {
* @param Model $Model Model the callback is called on
* @param bool $created Whether or not the save created a record.
* @param array $options Options passed from Model::save().
* @return void
* @return bool true.
*/
public function afterSave(Model $Model, $created, $options = array()) {
if (!isset($this->runtime[$Model->alias]['beforeValidate']) && !isset($this->runtime[$Model->alias]['beforeSave'])) {
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Model/BehaviorCollection.php
Expand Up @@ -73,7 +73,7 @@ public function init($modelName, $behaviors = array()) {
*
* @param string $behavior Behavior name.
* @param array $config Configuration options.
* @return void
* @return bool true.
* @deprecated 3.0.0 Will be removed in 3.0. Replaced with load().
*/
public function attach($behavior, $config = array()) {
Expand All @@ -97,7 +97,7 @@ public function attach($behavior, $config = array()) {
*
* @param string $behavior CamelCased name of the behavior to load
* @param array $config Behavior configuration parameters
* @return bool True on success, false on failure
* @return bool True on success.
* @throws MissingBehaviorException when a behavior could not be found.
*/
public function load($behavior, $config = array()) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Model/Datasource/Database/Sqlite.php
Expand Up @@ -212,7 +212,7 @@ public function describe($model) {
* @param array $fields The fields to update.
* @param array $values The values to set columns to.
* @param mixed $conditions array of conditions to use.
* @return array
* @return bool
*/
public function update(Model $model, $fields = array(), $values = null, $conditions = null) {
if (empty($values) && !empty($fields)) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Model/ModelValidator.php
Expand Up @@ -234,7 +234,7 @@ public function validateMany(&$data, $options = array()) {
* actually run validation rules over data, not just return the messages.
*
* @param string $options An optional array of custom options to be made available in the beforeValidate callback
* @return array Array of invalid fields
* @return array|bool Array of invalid fields
* @triggers Model.afterValidate $model
* @see ModelValidator::validates()
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Network/Http/HttpSocket.php
Expand Up @@ -760,7 +760,7 @@ protected function _buildUri($uri = array(), $uriTemplate = '%scheme://%user:%pa
*
* @param string|array $uri URI to parse
* @param bool|array $base If true use default URI config, otherwise indexed array to set 'scheme', 'host', 'port', etc.
* @return array Parsed URI
* @return array|bool Parsed URI
*/
protected function _parseUri($uri = null, $base = array()) {
$uriBase = array(
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Network/Http/HttpSocketResponse.php
Expand Up @@ -259,7 +259,7 @@ protected function _decodeChunkedBody($body) {
* Parses an array based header.
*
* @param array $header Header as an indexed array (field => value)
* @return array Parsed header
* @return array|bool Parsed header
*/
protected function _parseHeader($header) {
if (is_array($header)) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Utility/Folder.php
Expand Up @@ -323,7 +323,7 @@ public static function isAbsolute($path) {
* Returns true if given $path is a registered stream wrapper.
*
* @param string $path Path to check
* @return boo true If path is registered stream wrapper.
* @return bool true If path is registered stream wrapper.
*/
public static function isRegisteredStreamWrapper($path) {
if (preg_match('/^[A-Z]+(?=:\/\/)/i', $path, $matches) &&
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Utility/Sanitize.php
Expand Up @@ -34,9 +34,9 @@ class Sanitize {
/**
* Removes any non-alphanumeric characters.
*
* @param string $string String to sanitize
* @param string|array $string String to sanitize
* @param array $allowed An array of additional characters that are not to be removed.
* @return string Sanitized string
* @return string|array Sanitized string
*/
public static function paranoid($string, $allowed = array()) {
$allow = null;
Expand Down

0 comments on commit b3d83af

Please sign in to comment.