mscherer 10 年 前
コミット
935f766e70

+ 8 - 3
config/bootstrap.php

@@ -127,6 +127,7 @@ function ent($text) {
  * Convenience method for htmlspecialchars_decode
  *
  * @param string $text Text to wrap through htmlspecialchars_decode
+ * @param int $quoteStyle
  * @return string Converted text
  */
 function hDec($text, $quoteStyle = ENT_QUOTES) {
@@ -140,6 +141,7 @@ function hDec($text, $quoteStyle = ENT_QUOTES) {
  * Convenience method for html_entity_decode
  *
  * @param string $text Text to wrap through htmlspecialchars_decode
+ * @param int $quoteStyle
  * @return string Converted text
  */
 function entDec($text, $quoteStyle = ENT_QUOTES) {
@@ -153,7 +155,7 @@ function entDec($text, $quoteStyle = ENT_QUOTES) {
  * Focus is on the filename (without path)
  *
  * @param string $filename to check on
- * @param string $type (extension/ext, filename/file, basename/base, dirname/dir)
+ * @param string|null $type (extension/ext, filename/file, basename/base, dirname/dir)
  * @return mixed
  */
 function extractFileInfo($filename, $type = null) {
@@ -183,7 +185,7 @@ function extractFileInfo($filename, $type = null) {
  * So "filename.ext?foo=bar#hash" would simply be "filename.ext" then.
  *
  * @param string $filename to check on
- * @param string $type (extension/ext, filename/file, basename/base, dirname/dir)
+ * @param string|null $type (extension/ext, filename/file, basename/base, dirname/dir)
  * @param bool $fromUrl
  * @return mixed
  */
@@ -224,7 +226,7 @@ function extractPathInfo($filename, $type = null, $fromUrl = false) {
  * Shows pr() messages, even with debug = 0.
  * Also allows additional customization.
  *
- * @param mixed $content
+ * @param mixed $var
  * @param bool $collapsedAndExpandable
  * @param array $options
  * - class, showHtml, showFrom, jquery, returns, debug
@@ -283,6 +285,7 @@ function pre($var, $collapsedAndExpandable = false, $options = []) {
  *
  * @param string $haystack Input string.
  * @param string $needle Needed char or string.
+ * @param bool $caseSensitive
  * @return bool
  */
 function contains($haystack, $needle, $caseSensitive = false) {
@@ -295,6 +298,7 @@ function contains($haystack, $needle, $caseSensitive = false) {
  *
  * @param string $haystack Input string.
  * @param string $needle Needed char or string.
+ * @param bool $caseSensitive
  * @return bool
  */
 function startsWith($haystack, $needle, $caseSensitive = false) {
@@ -309,6 +313,7 @@ function startsWith($haystack, $needle, $caseSensitive = false) {
  *
  * @param string $haystack Input string.
  * @param string $needle Needed char or string
+ * @param bool $caseSensitive
  * @return bool
  */
 function endsWith($haystack, $needle, $caseSensitive = false) {

+ 6 - 6
src/Auth/AuthUserTrait.php

@@ -71,7 +71,7 @@ trait AuthUserTrait {
 	/**
 	 * Get the user data of the current session.
 	 *
-	 * @param string $key Key in dot syntax.
+	 * @param string|null $key Key in dot syntax.
 	 * @return mixed Data
 	 */
 	public function user($key = null) {
@@ -104,8 +104,8 @@ trait AuthUserTrait {
 	/**
 	 * Check if the current session has this role.
 	 *
-	 * @param mixed $role
-	 * @param mixed $providedRoles
+	 * @param mixed $expectedRole
+	 * @param mixed|null $providedRoles
 	 * @return bool Success
 	 */
 	public function hasRole($expectedRole, $providedRoles = null) {
@@ -132,7 +132,7 @@ trait AuthUserTrait {
 	 *
 	 * @param mixed $expectedRoles
 	 * @param bool $oneRoleIsEnough (if all $roles have to match instead of just one)
-	 * @param mixed $providedRoles
+	 * @param mixed|null $providedRoles
 	 * @return bool Success
 	 */
 	public function hasRoles($expectedRoles, $oneRoleIsEnough = true, $providedRoles = null) {
@@ -173,8 +173,8 @@ trait AuthUserTrait {
 	 * This can be set via Right model and stored in the Auth array upon login
 	 * the same way the roles are.
 	 *
-	 * @param mixed $role
-	 * @param mixed $providedRights
+	 * @param mixed $expectedRight
+	 * @param mixed|null $providedRights
 	 * @return bool Success
 	 */
 	public function hasRight($expectedRight, $providedRights = null) {

+ 2 - 1
src/Controller/Component/CommonComponent.php

@@ -22,6 +22,7 @@ class CommonComponent extends Component {
 	 * For this helper the controller has to be passed as reference
 	 * for manual startup with $disableStartup = true (requires this to be called prior to any other method)
 	 *
+	 * @param Event $event
 	 * @return void
 	 */
 	public function startup(Event $event) {
@@ -130,7 +131,7 @@ class CommonComponent extends Component {
 	 * Returns current url (with all missing params automatically added).
 	 * Necessary for Router::url() and comparison of urls to work.
 	 *
-	 * @param bool $asString: defaults to false = array
+	 * @param bool $asString Defaults to false = array
 	 * @return mixed URL
 	 */
 	public function currentUrl($asString = false) {

+ 1 - 1
src/Controller/Component/FlashComponent.php

@@ -62,7 +62,7 @@ class FlashComponent extends Component {
 	 * Updates "messages" session content (to enable multiple messages of one type).
 	 *
 	 * @param string $message Message to output.
-	 * @param string $type Type ('error', 'warning', 'success', 'info' or custom class).
+	 * @param string $options Options
 	 * @return void
 	 */
 	public function message($message, $options = null) {

+ 2 - 1
src/HtmlDom/HtmlDom.php

@@ -22,7 +22,8 @@ class HtmlDom extends BaseHtmlDom {
 	}
 
 	/**
-	 * @param string $content
+	 * @param string $str
+	 * @param bool $lowercase
 	 * @return object Dom
 	 */
 	public function domFromString($str, $lowercase = true) {

+ 4 - 4
src/Mailer/Email.php

@@ -200,7 +200,7 @@ class Email extends CakeEmail {
 	/**
 	 * Add an attachment from file
 	 *
-	 * @param string $file: absolute path
+	 * @param string $file Absolute path
 	 * @param string|null $name
 	 * @param array $fileInfo
 	 * @return $this
@@ -218,7 +218,7 @@ class Email extends CakeEmail {
 	/**
 	 * Add an attachment as blob
 	 *
-	 * @param string $content: blob data
+	 * @param string $content Blob data
 	 * @param string $filename to attach it
 	 * @param string|null $mimeType (leave it empty to get mimetype from $filename)
 	 * @param array $fileInfo
@@ -242,7 +242,7 @@ class Email extends CakeEmail {
 	 * - mimetype
 	 * - contentDisposition
 	 *
-	 * @param string $file: absolute path
+	 * @param string $file Absolute path
 	 * @param string|null $name (optional)
 	 * @param string|null $contentId (optional)
 	 * @param array $options Options
@@ -277,7 +277,7 @@ class Email extends CakeEmail {
 	 * Options:
 	 * - contentDisposition
 	 *
-	 * @param string $content: blob data
+	 * @param string $content Blob data
 	 * @param string $filename to attach it
 	 * @param string|null $mimeType (leave it empty to get mimetype from $filename)
 	 * @param string|null $contentId (optional)

+ 14 - 1
src/Model/Behavior/JsonableBehavior.php

@@ -135,6 +135,8 @@ class JsonableBehavior extends Behavior {
 	 * Saves all fields that do not belong to the current Model into 'with' helper model.
 	 *
 	 * @param \Cake\Event\Event $event
+	 * @param \Cake\ORM\Entity $entity
+	 * @param \ArrayObject $options
 	 * @return void
 	 */
 	public function beforeSave(Event $event, Entity $entity, ArrayObject $options) {
@@ -231,6 +233,9 @@ class JsonableBehavior extends Behavior {
 
 	/**
 	 * array() => param1:value1|param2:value2|...
+	 *
+	 * @param array $val
+	 * @return string
 	 */
 	public function _toParam($val) {
 		$res = [];
@@ -259,11 +264,19 @@ class JsonableBehavior extends Behavior {
 
 	/**
 	 * array() => value1|value2|value3|...
+	 *
+	 * @param array $val
+	 * @return string
 	 */
 	public function _toList($val) {
 		return implode($this->_config['separator'], $val);
 	}
 
+	/**
+	 * @param string $val
+	 *
+	 * @return array
+     */
 	public function _fromList($val) {
 		extract($this->_config);
 
@@ -273,7 +286,7 @@ class JsonableBehavior extends Behavior {
 	/**
 	 * Checks if string is encoded array/object
 	 *
-	 * @param string string to check
+	 * @param string $str String to check
 	 * @return bool
 	 */
 	public function isEncoded($str) {

+ 26 - 58
src/Model/Behavior/PasswordableBehavior.php

@@ -100,6 +100,9 @@ class PasswordableBehavior extends Behavior {
 	/**
 	 * Adding validation rules
 	 * also adds and merges config settings (direct + configure)
+	 *
+	 * @param \Cake\ORM\Table $table
+	 * @param array $config
 	 */
 	public function __construct(Table $table, array $config = []) {
 		$defaults = $this->_defaultConfig;
@@ -207,6 +210,9 @@ class PasswordableBehavior extends Behavior {
 	/**
 	 * Preparing the data
 	 *
+	 * @param \Cake\Event\Event $event
+	 * @param \ArrayObject $data
+	 * @param \ArrayObject $options
 	 * @return void
 	 */
 	public function beforeMarshal(Event $event, ArrayObject $data, ArrayObject $options) {
@@ -228,29 +234,11 @@ class PasswordableBehavior extends Behavior {
 		// Check if we need to trigger any validation rules
 		if (!$this->_config['require']) {
 			$new = !empty($data[$formField]) || !empty($data[$formFieldRepeat]);
-			/*
-			if (!$new && !$current) {
-				//$validator->remove($formField); // tmp only!
-				//unset($Model->validate[$formField]);
-				$entity->unsetProperty($formField);
-				if ($this->_config['confirm']) {
-					//$validator->remove($formFieldRepeat); // tmp only!
-					//unset($Model->validate[$formFieldRepeat]);
-					$entity->unsetProperty($formFieldRepeat);
-				}
-				if ($this->_config['current']) {
-					//$validator->remove($formFieldCurrent); // tmp only!
-					//unset($Model->validate[$formFieldCurrent]);
-					$entity->unsetProperty($formFieldCurrent);
-				}
-				return true;
-			}
-			*/
+
 			// Make sure we trigger validation if allowEmpty is set but we have the password field set
 			if ($new) {
 				if ($this->_config['confirm'] && empty($data[$formFieldRepeat])) {
 					//$entity->errors($formFieldRepeat, __d('tools', 'valErrPwdNotMatch'));
-					//die('E');
 				}
 			}
 		}
@@ -259,7 +247,10 @@ class PasswordableBehavior extends Behavior {
 	/**
 	 * Preparing the data
 	 *
-	 * @return void
+	 * @param \Cake\Event\Event $event
+	 * @param \Cake\ORM\Entity $entity
+	 * @param \ArrayObject $options
+	 * @param string $operation
 	 */
 	public function beforeRules(Event $event, Entity $entity, ArrayObject $options, $operation) {
 		$formField = $this->_config['formField'];
@@ -287,9 +278,6 @@ class PasswordableBehavior extends Behavior {
 				return;
 			}
 		}
-
-		// Update whitelist
-		$this->_modifyWhitelist($entity);
 	}
 
 	/**
@@ -307,8 +295,9 @@ class PasswordableBehavior extends Behavior {
 		if ($entity->get($formField) !== null) {
 			$cost = !empty($this->_config['hashCost']) ? $this->_config['hashCost'] : 10;
 			$options = ['cost' => $cost];
-			$PasswordHasher = $this->_getPasswordHasher($this->_config['passwordHasher']);
-			$entity->set($field, $PasswordHasher->hash($entity->get($formField), $options));
+			/** @var \Cake\Auth\AbstractPasswordHasher $PasswordHasher */
+			$PasswordHasher = $this->_getPasswordHasher($this->_config['passwordHasher'], $options);
+			$entity->set($field, $PasswordHasher->hash($entity->get($formField)));
 
 			if (!$entity->get($field)) {
 				throw new \Exception('Empty field');
@@ -328,9 +317,6 @@ class PasswordableBehavior extends Behavior {
 				//unset($Model->data[$table->alias()][$formFieldCurrent]);
 			}
 		}
-
-		// Update whitelist
-		$this->_modifyWhitelist($entity, true);
 	}
 
 	/**
@@ -468,45 +454,27 @@ class PasswordableBehavior extends Behavior {
 	/**
 	 * PasswordableBehavior::_getPasswordHasher()
 	 *
-	 * @param mixed $hasher Name or options array.
+	 * @param string|array $hasher Name or options array.
+	 * @param array $options
 	 * @return \Cake\Auth\AbstractPasswordHasher
 	 */
-	protected function _getPasswordHasher($hasher) {
+	protected function _getPasswordHasher($hasher, array $options = []) {
 		if ($this->_passwordHasher) {
 			return $this->_passwordHasher;
 		}
-		return $this->_passwordHasher = PasswordHasherFactory::build($hasher);
-	}
 
-	/**
-	 * Modify the model's whitelist.
-	 *
-	 * Since 2.5 behaviors can also modify the whitelist for validate, thus this behavior can now
-	 * (>= CakePHP 2.5) add the form fields automatically, as well (not just the password field itself).
-	 *
-	 * @param \Cake\ORM\Entity $entity
-	 * @return void
-	 * @deprecated 3.0
-	 */
-	protected function _modifyWhitelist(Entity $entity, $onSave = false) {
-		$fields = [];
-		if ($onSave) {
-			$fields[] = $this->_config['field'];
+		$config = [];
+		if (is_string($hasher)) {
+			$class = $hasher;
 		} else {
-			$fields[] = $this->_config['formField'];
-			if ($this->_config['confirm']) {
-				$fields[] = $this->_config['formFieldRepeat'];
-			}
-			if ($this->_config['current']) {
-				$fields[] = $this->_config['formFieldCurrent'];
-			}
+			$class = $hasher['className'];
+			$config = $hasher;
+			unset($config['className']);
 		}
+		$config['className'] = $class;
+		$config += $options;
 
-		foreach ($fields as $field) {
-			if (!empty($this->_table->whitelist) && !in_array($field, $Model->whitelist)) {
-				$Model->whitelist = array_merge($Model->whitelist, [$field]);
-			}
-		}
+		return $this->_passwordHasher = PasswordHasherFactory::build($config);
 	}
 
 }

+ 1 - 1
src/Model/Behavior/SluggedBehavior.php

@@ -239,7 +239,7 @@ class SluggedBehavior extends Behavior {
 	 * If unique is set to true, check for a unique slug and if unavailable suffix the slug with -1, -2, -3 etc.
 	 * until a unique slug is found
 	 *
-	 * @param string $string
+	 * @param string $value
 	 * @param \Cake\ORM\Entity|null $entity
 	 * @return string A slug
 	 */

+ 2 - 0
src/Model/Behavior/StringBehavior.php

@@ -102,6 +102,8 @@ class StringBehavior extends Behavior {
 	 * Saves all fields that do not belong to the current Model into 'with' helper model.
 	 *
 	 * @param \Cake\Event\Event $event
+	 * @param \Cake\ORM\Entity $entity
+	 * @param \ArrayObject $options
 	 * @return void
 	 */
 	public function beforeSave(Event $event, Entity $entity, ArrayObject $options) {

+ 1 - 0
src/Model/Entity/Entity.php

@@ -13,6 +13,7 @@ class Entity extends CakeEntity {
 	 * @link http://www.dereuromark.de/2010/06/24/static-enums-or-semihardcoded-attributes/
 	 * @param string $value or array $keys or NULL for complete array result
 	 * @param array $options (actual data)
+	 * @param string|null $default
 	 * @return mixed string/array
 	 */
 	public static function enum($value, array $options, $default = null) {

+ 1 - 54
src/Model/Table/Table.php

@@ -70,60 +70,6 @@ class Table extends ShimTable {
 	}
 
 	/**
-	 * Checks a record, if it is unique - depending on other fields in this table (transfered as array)
-	 * example in model: 'rule' => array ('validateUnique', array('belongs_to_table_id','some_id','user_id')),
-	 * if all keys (of the array transferred) match a record, return false, otherwise true
-	 *
-	 * @param array $fields Other fields to depend on
-	 * TODO: add possibity of deep nested validation (User -> Comment -> CommentCategory: UNIQUE comment_id, Comment.user_id)
-	 * @param array $options
-	 * - requireDependentFields Require all dependent fields for the validation rule to return true
-	 * @return bool Success
-	 * @deprecated NOT WORKING anymore, use core validateUnique
-	 */
-	public function validateUniqueOld($fieldValue, $fields = [], $options = []) {
-		$id = (!empty($this->data[$this->primaryKey]) ? $this->data[$this->primaryKey] : 0);
-		if (!$id && $this->id) {
-			$id = $this->id;
-		}
-
-		$conditions = [
-			$fieldName => $fieldValue,
-			'id !=' => $id];
-
-		$fields = (array)$fields;
-		if (!array_key_exists('allowEmpty', $fields)) {
-			foreach ($fields as $dependingField) {
-				if (isset($this->data[$dependingField])) { // add ONLY if some content is transfered (check on that first!)
-					$conditions['' . $dependingField] = $this->data[$dependingField];
-				} elseif (isset($this->data['Validation'][$dependingField])) { // add ONLY if some content is transfered (check on that first!
-					$conditions['' . $dependingField] = $this->data['Validation'][$dependingField];
-				} elseif (!empty($id)) {
-					// manual query! (only possible on edit)
-					$res = $this->find('first', ['fields' => ['' . $dependingField], 'conditions' => ['id' => $id]]);
-					if (!empty($res)) {
-						$conditions['' . $dependingField] = $res[$dependingField];
-					}
-				} else {
-					if (!empty($options['requireDependentFields'])) {
-						trigger_error('Required field ' . $dependingField . ' for validateUnique validation not present');
-						return false;
-					}
-					return true;
-				}
-			}
-		}
-
-		$this->recursive = -1;
-		if (count($conditions) > 2) {
-			$this->recursive = 0;
-		}
-		$options = ['fields' => ['' . $this->primaryKey], 'conditions' => $conditions];
-		$res = $this->find('first', $options);
-		return empty($res);
-	}
-
-	/**
 	 * Return the next auto increment id from the current table
 	 * UUIDs will return false
 	 *
@@ -315,6 +261,7 @@ class Table extends ShimTable {
 	/**
 	 * Validation of DateTime Fields (both Date and Time together)
 	 *
+	 * @param mixed $value
 	 * @param array $options
 	 * - dateFormat (defaults to 'ymd')
 	 * - allowEmpty

+ 4 - 4
src/Model/Table/TokensTable.php

@@ -68,10 +68,10 @@ class TokensTable extends Table {
 	/**
 	 * Stores new key in DB
 	 *
-	 * @param string $type: necessary
-	 * @param string|null $key: optional key, otherwise a key will be generated
-	 * @param mixed|null $uid: optional (if used, only this user can use this key)
-	 * @param string|null $content: up to 255 characters of content may be added (optional)
+	 * @param string $type Type: necessary
+	 * @param string|null $key Key: optional key, otherwise a key will be generated
+	 * @param mixed|null $uid Uid: optional (if used, only this user can use this key)
+	 * @param string|null $content Content: up to 255 characters of content may be added (optional)
 	 * NOW: checks if this key is already used (should be unique in table)
 	 * @return string key on SUCCESS, boolean false otherwise
 	 */

+ 4 - 3
src/Shell/InflectShell.php

@@ -56,7 +56,6 @@ class InflectShell extends Shell {
 	 * Prompts the user for words
 	 *
 	 * @return array
-	 * @author Jose Diaz-Gonzalez
 	 */
 	protected function _interactive() {
 		$method = $this->_getMethod();
@@ -140,7 +139,6 @@ class InflectShell extends Shell {
 	 * Requests words to inflect
 	 *
 	 * @return array
-	 * @author Jose Diaz-Gonzalez
 	 */
 	protected function _getWords() {
 		$words = null;
@@ -158,8 +156,8 @@ class InflectShell extends Shell {
 	/**
 	 * Parse the arguments into the function and the word(s) to be inflected
 	 *
+	 * @param array $arguments
 	 * @return array
-	 * @author Jose Diaz-Gonzalez
 	 */
 	protected function _parseArguments($arguments) {
 		$words = null;
@@ -187,6 +185,8 @@ class InflectShell extends Shell {
 	/**
 	 * Inflects a set of words based upon the inflection set in the arguments
 	 *
+	 * @param string $function
+	 * @param string $words
 	 * @return void
 	 */
 	protected function _inflect($function, $words) {
@@ -205,6 +205,7 @@ class InflectShell extends Shell {
 	/**
 	 * Returns the appropriate message for a given function
 	 *
+	 * @param string $function
 	 * @return string
 	 */
 	protected function _getMessage($function) {

+ 4 - 0
src/Utility/Language.php

@@ -39,6 +39,8 @@ class Language {
 	/**
 	 * Compares two parsed arrays of language tags and find the matches
 	 *
+	 * @param array $accepted
+	 * @param array $available
 	 * @return array
 	 */
 	public static function findMatches(array $accepted, array $available = []) {
@@ -77,6 +79,8 @@ class Language {
 	/**
 	 * Compare two language tags and distinguish the degree of matching
 	 *
+	 * @param string $a
+	 * @param string $b
 	 * @return float
 	 */
 	protected static function _matchLanguage($a, $b) {

+ 10 - 8
src/Utility/Number.php

@@ -26,6 +26,7 @@ class Number extends CakeNumber {
 	/**
 	 * Correct the default values according to localization
 	 *
+	 * @param array $options
 	 * @return void
 	 * @deprecated Should not be used anymore with 3.x functionality?
 	 */
@@ -57,7 +58,7 @@ class Number extends CakeNumber {
 	 * //TODO: automize per localeconv() ?
 	 *
 	 * @param float $number
-	 * @param array $options : currency=true/false, ... (leave empty for no special treatment)
+	 * @param array $formatOptions Format options: currency=true/false, ... (leave empty for no special treatment)
 	 * @return string
 	 */
 	public static function _format($number, array $formatOptions = []) {
@@ -161,6 +162,7 @@ class Number extends CakeNumber {
 	 * Returns a formatted-for-humans file size.
 	 *
 	 * @param int $size Size in bytes
+	 * @param string $decimals
 	 * @return string Human readable size
 	 * @link http://book.cakephp.org/2.0/en/core-libraries/helpers/number.html#NumberHelper::toReadableSize
 	 */
@@ -175,7 +177,7 @@ class Number extends CakeNumber {
 	/**
 	 * Get the rounded average.
 	 *
-	 * @param array $values: int or float values
+	 * @param array $values Values: int or float values
 	 * @param int $precision
 	 * @return float Average
 	 */
@@ -193,8 +195,8 @@ class Number extends CakeNumber {
 	 * @param float $increment
 	 * @return float result
 	 */
-	public static function roundTo($number, $increments = 1.0) {
-		$precision = static::getDecimalPlaces($increments);
+	public static function roundTo($number, $increment = 1.0) {
+		$precision = static::getDecimalPlaces($increment);
 		$res = round($number, $precision);
 		if ($precision <= 0) {
 			$res = (int)$res;
@@ -209,8 +211,8 @@ class Number extends CakeNumber {
 	 * @param int $increment
 	 * @return float result
 	 */
-	public static function roundUpTo($number, $increments = 1) {
-		return ceil($number / $increments) * $increments;
+	public static function roundUpTo($number, $increment = 1) {
+		return ceil($number / $increment) * $increment;
 	}
 
 	/**
@@ -220,8 +222,8 @@ class Number extends CakeNumber {
 	 * @param int $increment
 	 * @return float result
 	 */
-	public static function roundDownTo($number, $increments = 1) {
-		return floor($number / $increments) * $increments;
+	public static function roundDownTo($number, $increment = 1) {
+		return floor($number / $increment) * $increment;
 	}
 
 	/**

+ 1 - 0
src/Utility/Random.php

@@ -160,6 +160,7 @@ class Random {
 	 * Generates random passwords.
 	 *
 	 * @param int $length (necessary!)
+	 * @param string|null $chars
 	 * @return string Password
 	 */
 	public static function pwd($length, $chars = null) {

+ 4 - 4
src/Utility/Text.php

@@ -345,7 +345,7 @@ class Text extends CakeText {
 	 *
 	 * Converts High ascii text and MS Word special characters to character entities
 	 *
-	 * @param string
+	 * @param string $str
 	 * @return string
 	 */
 	public function asciiToEntities($str) {
@@ -392,8 +392,8 @@ class Text extends CakeText {
 	 *
 	 * Converts character entities back to ASCII
 	 *
-	 * @param string
-	 * @param bool
+	 * @param string $str
+	 * @param bool $all
 	 * @return string
 	 */
 	public function entitiesToAscii($str, $all = true) {
@@ -438,7 +438,7 @@ class Text extends CakeText {
 	 *
 	 * http://www.some-site.com/index.php
 	 *
-	 * @param string
+	 * @param string $str
 	 * @return string
 	 */
 	public function reduce_double_slashes($str) {

+ 38 - 30
src/Utility/Time.php

@@ -85,7 +85,7 @@ class Time extends CakeTime {
 	 *
 	 * Requires cakephp-geo dependency
 	 *
-	 * @param float $lag
+	 * @param float $lat
 	 * @param float $lng
 	 * @return \DateTimeZone Timezone object
 	 * @deprecated Would need Geo plugin to work
@@ -112,8 +112,9 @@ class Time extends CakeTime {
 	 *
 	 * should only be used for < month (due to the different month lenghts it gets fuzzy)
 	 *
-	 * @param mixed $start (db format or timestamp)
-	 * @param mixed $end (db format or timestamp)
+	 * @param mixed $startTime (db format or timestamp)
+	 * @param mixed|null $endTime (db format or timestamp)
+	 * @param array $options
 	 * @return int The distance in seconds
 	 */
 	public static function difference($startTime, $endTime = null, $options = []) {
@@ -261,6 +262,7 @@ class Time extends CakeTime {
 	 *
 	 * @param int $year
 	 * @param int $month
+	 * @return bool|string
 	 */
 	public static function daysInMonth($year, $month) {
 		return date('t', mktime(0, 0, 0, $month, 1, $year));
@@ -274,7 +276,7 @@ class Time extends CakeTime {
 	 * Exception: Dates of the calender week of the previous year return 0. In this case the cweek of the
 	 * last week of the previous year should be used.
 	 *
-	 * @param string $date Date in DB format - if none is passed, current day is used
+	 * @param string|null $dateString Date in DB format - if none is passed, current day is used
 	 * @param int $relative - weeks relative to the date (+1 next, -1 previous etc)
 	 * @return string
 	 */
@@ -378,6 +380,7 @@ class Time extends CakeTime {
 	 * @param mixed $startDate Either a date string or a DateTime object
 	 * @param int $years Years to increment/decrement
 	 * @param int $months Months to increment/decrement
+	 * @param int $days Days
 	 * @param string|\DateTimeZone $timezone Timezone string or DateTimeZone object
 	 * @return object DateTime with incremented/decremented month/year values.
 	 */
@@ -410,6 +413,8 @@ class Time extends CakeTime {
 	 *
 	 * @param int $firstAge
 	 * @param int $secondAge (defaults to first one if not specified)
+	 * @param bool $returnAsString
+	 * @param mixed|null $relativeTime
 	 * @return array array('min'=>$min, 'max'=>$max);
 	 */
 	public static function ageBounds($firstAge, $secondAge = null, $returnAsString = false, $relativeTime = null) {
@@ -420,7 +425,7 @@ class Time extends CakeTime {
 		$Date = new self($relativeTime !== null ? $relativeTime : 'now');
 
 		$max = mktime(23, 23, 59, $Date->format('m'), $Date->format('d'), $Date->format('Y') - $firstAge);
-		$min = mktime(0, 0, 1, $Date->format('m'), $Date->format('d') + 1, $Date->format('Y') - $secondAge - 1);
+		$min = mktime(0, 0, 1, $Date->format('m'), (int)$Date->format('d') + 1, $Date->format('Y') - $secondAge - 1);
 
 		if ($returnAsString) {
 			$max = date(FORMAT_DB_DATE, $max);
@@ -449,7 +454,7 @@ class Time extends CakeTime {
 	 * - default: Default string (defaults to "-----")
 	 * - oclock: Set to true to append oclock string
 	 *
-	 * @param string $dateString,
+	 * @param string $dateString
 	 * @param string|null $format Format (YYYY-MM-DD, DD.MM.YYYY)
 	 * @param array $options
 	 * @return string
@@ -527,8 +532,8 @@ class Time extends CakeTime {
 	 * - default: Default string (defaults to "-----")
 	 * - oclock: Set to true to append oclock string
 	 *
-	 * @param string $dateString,
-	 * @param string $format Format (YYYY-MM-DD, DD.MM.YYYY)
+	 * @param string|null $dateString
+	 * @param string|null $format Format (YYYY-MM-DD, DD.MM.YYYY)
 	 * @param array $options Options
 	 * @return string
 	 */
@@ -595,8 +600,7 @@ class Time extends CakeTime {
 	/**
 	 * Return the translation to a specific week day
 	 *
-	 * @param int $day:
-	 * 0=sunday to 7=saturday (default numbers)
+	 * @param int $day Day: 0=sunday to 7=saturday (default numbers)
 	 * @param bool $abbr (if abbreviation should be returned)
 	 * @param int $offset Offset: 0-6 (defaults to 0) [1 => 1=monday to 7=sunday]
 	 * @return string translatedText
@@ -637,8 +641,7 @@ class Time extends CakeTime {
 	/**
 	 * Return the translation to a specific week day
 	 *
-	 * @param int $month:
-	 * 1..12
+	 * @param int $month Month (1..12)
 	 * @param bool $abbr (if abbreviation should be returned)
 	 * @param array $options
 	 * - appendDot (only for 3 letter abbr; defaults to false)
@@ -689,7 +692,9 @@ class Time extends CakeTime {
 	/**
 	 * Months
 	 *
-	 * @return array (for forms etc)
+	 * @param array $monthKeys
+	 * @param array $options
+	 * @return array
 	 */
 	public static function monthNames($monthKeys = [], $options = []) {
 		if (!$monthKeys) {
@@ -706,7 +711,9 @@ class Time extends CakeTime {
 	/**
 	 * Weekdays
 	 *
-	 * @return array (for forms etc)
+	 * @param array $dayKeys
+	 * @param array $options
+	 * @return array
 	 */
 	public static function dayNames($dayKeys = [], $options = []) {
 		if (!$dayKeys) {
@@ -730,7 +737,7 @@ class Time extends CakeTime {
 	 * $span = fuzzy(time() - 10); // "moments ago"
 	 * $span = fuzzy(time() + 20); // "in moments"
 	 *
-	 * @param int "remote" timestamp
+	 * @param int $timestamp The "remote" timestamp
 	 * @return string
 	 */
 	public static function fuzzy($timestamp) {
@@ -742,7 +749,7 @@ class Time extends CakeTime {
 
 	/**
 	 * @param int $offset in seconds
-	 * @param bool $past (defaults to null: return plain text)
+	 * @param bool|null $past (defaults to null: return plain text)
 	 * - new: if not boolean but a string use this as translating text
 	 * @return string text (i18n!)
 	 */
@@ -807,12 +814,13 @@ class Time extends CakeTime {
 	 * Time length to human readable format.
 	 *
 	 * @param int $seconds
-	 * @param string $format Format
+	 * @param string|null $format Format
 	 * @param array $options
 	 * - boolean v: verbose
 	 * - boolean zero: if false: 0 days 5 hours => 5 hours etc.
 	 * - int: accuracy (how many sub-formats displayed?) //TODO
 	 * @see timeAgoInWords()
+	 * @return string
 	 */
 	public static function lengthOfTime($seconds, $format = null, $options = []) {
 		$defaults = ['verbose' => true, 'zero' => false, 'separator' => ', ', 'default' => ''];
@@ -918,8 +926,8 @@ class Time extends CakeTime {
 	 * Time relative to NOW in human readable format - absolute (negative as well as positive)
 	 * //TODO: make "now" adjustable
 	 *
-	 * @param mixed $datestring
-	 * @param string $format Format
+	 * @param mixed $dateString
+	 * @param string|null $format Format
 	 * @param array $options Options
 	 * - default, separator
 	 * - boolean zero: if false: 0 days 5 hours => 5 hours etc.
@@ -966,9 +974,9 @@ class Time extends CakeTime {
 	/**
 	 * Convenience method to convert a given date
 	 *
-	 * @param string
-	 * @param string
-	 * @param int $timezone User's timezone
+	 * @param string $oldDateString
+	 * @param string $newDateFormatString
+	 * @param int|null $timezone User's timezone
 	 * @return string Formatted date
 	 */
 	public static function convertDate($oldDateString, $newDateFormatString, $timezone = null) {
@@ -980,7 +988,7 @@ class Time extends CakeTime {
 	 * Returns true if given datetime string was day before yesterday.
 	 *
 	 * @param string $dateString Datetime string or Unix timestamp
-	 * @param int $timezone User's timezone
+	 * @param int|null $timezone User's timezone
 	 * @return bool True if datetime string was day before yesterday
 	 */
 	public static function wasDayBeforeYesterday($dateString, $timezone = null) {
@@ -1117,8 +1125,8 @@ class Time extends CakeTime {
 	/**
 	 * Return SQL snippet for a period (beginning till end).
 	 *
-	 * @param string $searchString to parse
-	 * @param string $fieldname (Model.field)
+	 * @param string $string Search string to parse
+	 * @param string $fieldName (Model.field)
 	 * @param array $options (see TimeLib::period)
 	 * @return string query SQL Query
 	 */
@@ -1184,7 +1192,7 @@ class Time extends CakeTime {
 	 * with pad=2: 9.30
 	 *
 	 * @param int $value
-	 * @param string $pad
+	 * @param string|null $pad
 	 * @param string $decPoint
 	 * @return string
 	 */
@@ -1206,7 +1214,7 @@ class Time extends CakeTime {
 	 * Parse 2,5 - 2.5 2:30 2:31:58 or even 2011-11-12 10:10:10
 	 * now supports negative values like -2,5 -2,5 -2:30 -:30 or -4
 	 *
-	 * @param string
+	 * @param string $duration
 	 * @param array $allowed
 	 * @return int Seconds
 	 */
@@ -1282,8 +1290,8 @@ class Time extends CakeTime {
 	 *
 	 * E.g. for days and hours set format to: $d:$H
 	 *
-	 * @param int|\DateInterval $duraton Duration in seconds or as DateInterval object
-	 * @param string $mode Defaults to hours, minutes and seconds
+	 * @param int|\DateInterval $duration Duration in seconds or as DateInterval object
+	 * @param string $format Defaults to hours, minutes and seconds
 	 * @return string Time
 	 */
 	public static function duration($duration, $format = '%h:%I:%S') {
@@ -1315,7 +1323,7 @@ class Time extends CakeTime {
 	 * Note that duration with DateInterval supports only values < month with accuracy,
 	 * as it approximates month as "30".
 	 *
-	 * @param int|\DateInterval $duraton Duration in seconds or as DateInterval object
+	 * @param int|\DateInterval $duration Duration in seconds or as DateInterval object
 	 * @param string $mode Defaults to hours and minutes
 	 * @return string Time
 	 * @deprecated Use duration() instead?

+ 28 - 8
src/Utility/Utility.php

@@ -122,7 +122,7 @@ class Utility {
 	 * Multibyte analogue of str_split() function.
 	 * By default this works properly with UTF8 strings.
 	 *
-	 * @param string $text
+	 * @param string $str
 	 * @param int $length
 	 * @return array Result
 	 */
@@ -191,6 +191,7 @@ class Utility {
 	 * TODO: protocol to lower!
 	 *
 	 * @param string $url
+	 * @param bool $headerRedirect
 	 * @return string Cleaned Url
 	 */
 	public static function cleanUrl($url, $headerRedirect = false) {
@@ -230,6 +231,7 @@ class Utility {
 	 * for a better result.
 	 *
 	 * @param string $file File
+	 * @param string $pattern
 	 * @return bool Success
 	 */
 	public static function fileExists($file, $pattern = '~^https?://~i') {
@@ -304,13 +306,16 @@ class Utility {
 	 * Add protocol prefix if necessary (and possible)
 	 *
 	 * @param string $url
+	 * @param string|null $prefix
+	 * @return string
 	 */
 	public static function autoPrefixUrl($url, $prefix = null) {
 		if ($prefix === null) {
 			$prefix = 'http://';
 		}
 
-		if (($pos = strpos($url, '.')) !== false) {
+		$pos = strpos($url, '.');
+		if ($pos !== false) {
 			if (strpos(substr($url, 0, $pos), '//') === false) {
 				$url = $prefix . $url;
 			}
@@ -387,7 +392,7 @@ class Utility {
 	 * On non-transaction db connections it will return a deep array of bools instead of bool.
 	 * So we need to call this method inside the modified saveAll() method to return the expected single bool there, too.
 	 *
-	 * @param array
+	 * @param array $array
 	 * @return bool
 	 * @deprecated Not sure this is useful for CakePHP 3.0
 	 */
@@ -442,6 +447,9 @@ class Utility {
 
 	/**
 	 * Trim recursively
+	 *
+	 * @param mixed $value
+	 * @return array|string
 	 */
 	public static function trimDeep($value) {
 		$value = is_array($value) ? array_map('self::trimDeep', $value) : trim($value);
@@ -449,7 +457,10 @@ class Utility {
 	}
 
 	/**
-	 * H() recursively
+	 * Applies h() recursively
+	 *
+	 * @param mixed $value
+	 * @return array|string
 	 */
 	public static function specialcharsDeep($value) {
 		$value = is_array($value) ? array_map('self::specialcharsDeep', $value) : htmlspecialchars($value, ENT_QUOTES, 'UTF-8');
@@ -458,6 +469,10 @@ class Utility {
 
 	/**
 	 * Main deep method
+	 *
+	 * @param callable $function
+	 * @param mixed $value
+	 * @return array|string
 	 */
 	public static function deep($function, $value) {
 		$value = is_array($value) ? array_map('self::' . $function, $value) : $function($value);
@@ -544,6 +559,7 @@ class Utility {
 	 * both boolean and integer values also supported.
 	 *
 	 * @param array $data
+	 * @param string $separator
 	 * @return array
 	 */
 	public static function flattenList(array $data, $separator = '.') {
@@ -587,8 +603,8 @@ class Utility {
 	 *
 	 * //TODO: check if it can be replace by Hash::flatten() or Utility::flatten().
 	 *
-	 * @param array $array to flatten
-	 * @param bool $perserveKeys
+	 * @param array $array Array to flatten
+	 * @param bool $preserveKeys
 	 * @return array
 	 */
 	public static function arrayFlatten($array, $preserveKeys = false) {
@@ -639,7 +655,7 @@ class Utility {
 	 * Similar to array_shift but on the keys of the array
 	 * like array_shift() only for keys and not values
 	 *
-	 * @param array $keyValuePairs
+	 * @param array $array keyValuePairs
 	 * @return string key
 	 */
 	public static function arrayShiftKeys(&$array) {
@@ -649,6 +665,9 @@ class Utility {
 		}
 	}
 
+	/**
+	 * @var int
+	 */
 	protected static $_counterStartTime;
 
 	/**
@@ -701,8 +720,9 @@ class Utility {
 	 *
 	 * @link https://github.com/ndejong/pretty_json/blob/master/pretty_json.php
 	 * @param string $json The original JSON string
-	 * @param string $ind The string to indent with
+	 * @param string $indString The string to indent with
 	 * @return string
+	 * @deprecated Now there is a JSON_PRETTY_PRINT option available on json_encode()
 	 */
 	public static function prettyJson($json, $indString = "\t") {
 		// Replace any escaped \" marks so we don't get tripped up on quotemarks_counter

+ 13 - 8
src/View/Helper/CommonHelper.php

@@ -24,6 +24,7 @@ class CommonHelper extends Helper {
 	 *
 	 * @param string $singular The string to be pl.
 	 * @param int $count
+	 * @param bool $autoTranslate
 	 * @return string "member" or "members" OR "Mitglied"/"Mitglieder" if autoTranslate TRUE
 	 */
 	public function asp($singular, $count, $autoTranslate = false) {
@@ -42,6 +43,7 @@ class CommonHelper extends Helper {
 	 * @param string $singular
 	 * @param string $plural
 	 * @param int $count
+	 * @param bool $autoTranslate
 	 * @return string result
 	 */
 	public function sp($singular, $plural, $count, $autoTranslate = false) {
@@ -83,8 +85,8 @@ class CommonHelper extends Helper {
 	/**
 	 * Convenience method for clean meta name tags
 	 *
-	 * @param string $name: author, date, generator, revisit-after, language
-	 * @param mixed $content: if array, it will be seperated by commas
+	 * @param string|null $name Author, date, generator, revisit-after, language
+	 * @param mixed|null $content If array, it will be separated by commas
 	 * @return string HTML Markup
 	 */
 	public function metaName($name = null, $content = null) {
@@ -101,8 +103,8 @@ class CommonHelper extends Helper {
 	 * Convenience method for meta description
 	 *
 	 * @param string $content
-	 * @param string $language (iso2: de, en-us, ...)
-	 * @param array $additionalOptions
+	 * @param string|null $language (iso2: de, en-us, ...)
+	 * @param array $options Additional options
 	 * @return string HTML Markup
 	 */
 	public function metaDescription($content, $language = null, $options = []) {
@@ -117,8 +119,8 @@ class CommonHelper extends Helper {
 	/**
 	 * Convenience method to output meta keywords
 	 *
-	 * @param string|array $keywords
-	 * @param string $language (iso2: de, en-us, ...)
+	 * @param string|array|null $keywords
+	 * @param string|null $language (iso2: de, en-us, ...)
 	 * @param bool $escape
 	 * @return string HTML Markup
 	 */
@@ -132,6 +134,7 @@ class CommonHelper extends Helper {
 		if ($escape) {
 			$keywords = h($keywords);
 		}
+		$options = [];
 		if (!empty($language)) {
 			$options['lang'] = mb_strtolower($language);
 		} elseif ($language !== false) {
@@ -162,6 +165,7 @@ class CommonHelper extends Helper {
 	 * - de
 	 * - de-ch
 	 * etc
+	 * @param bool $full
 	 * @return string HTML Markup
 	 */
 	public function metaAlternate($url, $lang, $full = false) {
@@ -190,7 +194,7 @@ class CommonHelper extends Helper {
 	 * Convenience method for META Tags
 	 *
 	 * @param mixed $url
-	 * @param string $title
+	 * @param string|null $title
 	 * @return string HTML Markup
 	 */
 	public function metaRss($url, $title = null) {
@@ -210,7 +214,8 @@ class CommonHelper extends Helper {
 	 * Convenience method for META Tags
 	 *
 	 * @param string $type
-	 * @param string $content
+	 * @param string $value Content
+	 * @param bool $escape
 	 * @return string HTML Markup
 	 */
 	public function metaEquiv($type, $value, $escape = true) {

+ 3 - 3
src/View/Helper/FlashHelper.php

@@ -87,12 +87,12 @@ class FlashHelper extends Helper {
 	 * @param bool $escape Set to false to disable escaping.
 	 * @return string HTML
 	 */
-	public function message($msg, $type = 'info', $escape = true) {
+	public function message($message, $type = 'info', $escape = true) {
 		$html = '<div class="flash-messages">';
 		if ($escape) {
-			$msg = h($msg);
+			$msg = h($message);
 		}
-		$html .= $this->_message($msg, $type);
+		$html .= $this->_message($message, $type);
 		$html .= '</div>';
 		return $html;
 	}

+ 1 - 0
src/View/Helper/FormatHelper.php

@@ -337,6 +337,7 @@ class FormatHelper extends Helper {
 	 *
 	 * @param string $type
 	 * @param array $options
+	 * @param array $attributes
 	 * @return string
 	 */
 	protected function _fontIcon($type, $options, $attributes) {

+ 2 - 1
src/View/Helper/GravatarHelper.php

@@ -62,7 +62,8 @@ class GravatarHelper extends Helper {
 	public $helpers = ['Html'];
 
 	/**
-	 * Constructor
+	 * @param \Cake\View\View|null $View
+	 * @param array $config
 	 */
 	public function __construct($View = null, $config = []) {
 		// Default the secure option to match the current URL.

+ 1 - 1
src/View/Helper/ObfuscateHelper.php

@@ -47,8 +47,8 @@ class ObfuscateHelper extends Helper {
 	 *
 	 * @param string $mail Email to encode
 	 * @param string|null $text Text, ptional (if none is given, email will be text as well)
-	 * @param array $attr HTML tag attributes
 	 * @param array $params ?subject=y&body=y to be attached to "mailto:xyz"
+	 * @param array $attr HTML tag attributes
 	 * @return string Save string with JS generated link around email (and non JS fallback)
 	 */
 	public function encodeEmailUrl($mail, $text = null, array $params = [], array $attr = []) {

+ 8 - 3
src/View/Helper/QrCodeHelper.php

@@ -142,6 +142,8 @@ class QrCodeHelper extends Helper {
 	 * Format a text in a specific format
 	 * - url, sms, tel, email, market, geo
 	 *
+	 * @param string $text
+	 * @param string|null $type
 	 * @return string formattedText
 	 */
 	public function formatText($text, $type = null) {
@@ -274,6 +276,8 @@ class QrCodeHelper extends Helper {
 	/**
 	 * Change size
 	 * result format: chs=<size>x<size>
+	 *
+	 * @param mixed $value
 	 * @return bool Success
 	 *
 	 * //TODO: automatic detection
@@ -295,6 +299,9 @@ class QrCodeHelper extends Helper {
 	/**
 	 * Change level and margin - optional
 	 * result format: chld=<EC level>|<margin>
+	 *
+	 * @param string $level
+	 * @param int|null $margin
 	 * @return bool Success
 	 */
 	public function setLevel($level, $margin = null) {
@@ -313,8 +320,6 @@ class QrCodeHelper extends Helper {
 	}
 
 	/**
-	 * QrCodeHelper::reset()
-	 *
 	 * @return void
 	 */
 	public function reset() {
@@ -335,7 +340,7 @@ class QrCodeHelper extends Helper {
 	 * 25 => 21x21 (L)
 	 * ...
 	 * 4000 => 547x547 (L)
-	 * @param int $length
+	 *
 	 * @return int size
 	 */
 	protected function _findSuitableSize() {

+ 2 - 2
src/View/Helper/TextHelper.php

@@ -8,7 +8,7 @@ use Cake\View\View;
 use Tools\Utility\Number;
 
 if (!defined('CHAR_HELLIP')) {
-	define('CHAR_HELLIP', '&#8230;'); #  (horizontal ellipsis = three dot leader)
+	define('CHAR_HELLIP', '&#8230;'); # � (horizontal ellipsis = three dot leader)
 }
 
 /**
@@ -35,7 +35,7 @@ class TextHelper extends CakeTextHelper {
 	 *            The class needs to be placed in the `Utility` directory.
 	 *
 	 * @param \Cake\View\View $View the view object the helper is attached to.
-	 * @param array $settings Settings array Settings array
+	 * @param array $config Settings array Settings array
 	 * @throws \Cake\Core\Exception\Exception when the engine class could not be found.
 	 */
 	public function __construct(View $View, array $config = []) {

+ 1 - 1
src/View/Helper/TimeHelper.php

@@ -139,7 +139,7 @@ class TimeHelper extends CakeTimeHelper {
 	 *
 	 * @param \DateTime $date Date
 	 * @param array $options
-	 * @param array $attr: html attributes
+	 * @param array $attr HTML attributes
 	 * @return string Nicely formatted date
 	 */
 	public function published(DateTime $date, array $options = [], array $attr = []) {

+ 2 - 1
src/View/Helper/TimelineHelper.php

@@ -86,7 +86,7 @@ class TimelineHelper extends Helper {
 	 * - editable (boolean)
 	 *
 	 * @link http://almende.github.io/chap-links-library/js/timeline/doc/
-	 * @param array
+	 * @param array $item
 	 * @return void
 	 */
 	public function addItem($item) {
@@ -97,6 +97,7 @@ class TimelineHelper extends Helper {
 	 * Add timeline items as an array of items.
 	 *
 	 * @see \Tools\View\Helper\TimelineHelper::addItem()
+	 * @param array $items
 	 * @return void
 	 */
 	public function addItems($items) {

+ 3 - 1
src/View/Helper/TreeHelper.php

@@ -383,7 +383,8 @@ class TreeHelper extends Helper {
 	 *
 	 * @param string $id
 	 * @param string $key
-	 * @param mixed $value
+	 * @param mixed|null $value
+	 * @param string $previousOrNext
 	 * @return void
 	 */
 	public function addTypeAttribute($id = '', $key = '', $value = null, $previousOrNext = 'next') {
@@ -451,6 +452,7 @@ class TreeHelper extends Helper {
 	 *
 	 * @param string $rType
 	 * @param array $elementData
+	 * @param bool $clear
 	 * @return string
 	 */
 	protected function _attributes($rType, array $elementData = [], $clear = true) {

+ 4 - 1
src/View/Helper/UrlHelper.php

@@ -28,6 +28,9 @@ class UrlHelper extends CoreUrlHelper {
 
 	/**
 	 * @deprecated
+	 * @param string|array|null $url URL.
+	 * @param bool $full
+	 * @return string
 	 */
 	public function defaultBuild($url = null, $full = false) {
 		return $this->reset($url, $full);
@@ -37,7 +40,7 @@ class UrlHelper extends CoreUrlHelper {
 	 * Creates a reset URL.
 	 * The prefix and plugin params are resetting to default false.
 	 *
-	 * @param string|array $url URL.
+	 * @param string|array|null $url URL.
 	 * @param bool $full If true, the full base URL will be prepended to the result
 	 * @return string Full translated URL with base path.
 	 */

+ 5 - 0
tests/TestCase/Mailer/EmailTest.php

@@ -16,6 +16,7 @@ class TestEmail extends Email {
 	/**
 	 * Wrap to protected method
 	 *
+	 * @param array $address
 	 * @return array
 	 */
 	public function formatAddress($address) {
@@ -25,6 +26,8 @@ class TestEmail extends Email {
 	/**
 	 * Wrap to protected method
 	 *
+	 * @param string $text
+	 * @param int $length
 	 * @return array
 	 */
 	public function wrap($text, $length = Email::LINE_LENGTH_MUST) {
@@ -43,6 +46,7 @@ class TestEmail extends Email {
 	/**
 	 * Encode to protected method
 	 *
+	 * @param string $text
 	 * @return string
 	 */
 	public function encode($text) {
@@ -52,6 +56,7 @@ class TestEmail extends Email {
 	/**
 	 * Render to protected method
 	 *
+	 * @param string $content
 	 * @return array
 	 */
 	public function render($content) {

+ 4 - 0
tests/TestCase/Model/Behavior/SluggedBehaviorTest.php

@@ -626,6 +626,10 @@ class SluggedBehaviorTest extends TestCase {
 	/**
 	 * Get a new Entity
 	 *
+	 * @param string|null $title
+	 * @param string|null $field
+	 * @param array $data
+	 * @param array $options
 	 * @return \Cake\ORM\Entity
 	 */
 	protected function _getEntity($title = null, $field = null, array $data = [], array $options = []) {