diff --git a/lib/Cake/Model/ModelValidator.php b/lib/Cake/Model/ModelValidator.php index 6f2c02d2b..24a453b53 100644 --- a/lib/Cake/Model/ModelValidator.php +++ b/lib/Cake/Model/ModelValidator.php @@ -523,7 +523,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable { * * @return int */ - public function count() { + public function count() : int { $this->_parseRules(); return count($this->_fields); } diff --git a/lib/Cake/Model/Validator/CakeValidationSet.php b/lib/Cake/Model/Validator/CakeValidationSet.php index 68ff212e7..9ff103b56 100644 --- a/lib/Cake/Model/Validator/CakeValidationSet.php +++ b/lib/Cake/Model/Validator/CakeValidationSet.php @@ -363,7 +363,7 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable { * * @return int */ - public function count() { + public function count() : int { return count($this->_rules); }