Merge pull request #6 from kamilwylegala/3-deprecation-countable

Fixed deprecation notice in PHP 8.1: Countable #3
This commit is contained in:
Kamil Wylegala 2021-12-20 23:25:45 +01:00 committed by GitHub
commit 257f639606
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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);
} }