Fixed deprecation notice in PHP 8.1: Countable #3

This commit is contained in:
Kamil Wylegala 2021-12-20 23:23:26 +01:00
parent bfe52deb9e
commit ad33741e0d
2 changed files with 2 additions and 2 deletions

View file

@ -523,7 +523,7 @@ class ModelValidator implements ArrayAccess, IteratorAggregate, Countable {
* *
* @return int * @return int
*/ */
public function count() { public function count() : int {
$this->_parseRules(); $this->_parseRules();
return count($this->_fields); return count($this->_fields);
} }

View file

@ -363,7 +363,7 @@ class CakeValidationSet implements ArrayAccess, IteratorAggregate, Countable {
* *
* @return int * @return int
*/ */
public function count() { public function count() : int {
return count($this->_rules); return count($this->_rules);
} }