From ad33741e0dc4b6c5e45eeafdb61a14f192eb1da4 Mon Sep 17 00:00:00 2001 From: Kamil Wylegala Date: Mon, 20 Dec 2021 23:23:26 +0100 Subject: [PATCH] Fixed deprecation notice in PHP 8.1: Countable #3 --- lib/Cake/Model/ModelValidator.php | 2 +- lib/Cake/Model/Validator/CakeValidationSet.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); }