From 7c29c8482b165708a7e36cd575f6fb895ea280b1 Mon Sep 17 00:00:00 2001
From: Matthieu Marcillaud <marcimat@rezo.net>
Date: Mon, 19 Jun 2023 18:27:55 +0200
Subject: [PATCH] chore: Remove Attribute ReturnTypeWillChange

---
 ecrire/src/Compilateur/Iterateur/Data.php | 14 +++-----------
 ecrire/src/Compilateur/Iterateur/Sql.php  |  6 ++----
 2 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/ecrire/src/Compilateur/Iterateur/Data.php b/ecrire/src/Compilateur/Iterateur/Data.php
index 4d8cb2a4f7..f95d5c5373 100644
--- a/ecrire/src/Compilateur/Iterateur/Data.php
+++ b/ecrire/src/Compilateur/Iterateur/Data.php
@@ -454,25 +454,19 @@ class Data extends AbstractIterateur implements Iterator
 	 *
 	 * @return mixed
 	 */
-	#[\ReturnTypeWillChange]
-	public function current() {
+	public function current(): mixed {
 		return $this->valeur;
 	}
 
 	/**
 	 * Retourner la cle
-	 *
-	 * @return mixed
 	 */
-	#[\ReturnTypeWillChange]
-	public function key() {
+	public function key(): mixed {
 		return $this->cle;
 	}
 
 	/**
 	 * Passer a la valeur suivante
-	 *
-	 * @return void
 	 */
 	public function next(): void {
 		if ($this->valid()) {
@@ -484,10 +478,8 @@ class Data extends AbstractIterateur implements Iterator
 
 	/**
 	 * Compter le nombre total de resultats
-	 *
-	 * @return int
 	 */
-	public function count() {
+	public function count(): int {
 		if (is_null($this->total)) {
 			$this->total = count($this->tableau);
 		}
diff --git a/ecrire/src/Compilateur/Iterateur/Sql.php b/ecrire/src/Compilateur/Iterateur/Sql.php
index 64efbd9478..23593356d5 100644
--- a/ecrire/src/Compilateur/Iterateur/Sql.php
+++ b/ecrire/src/Compilateur/Iterateur/Sql.php
@@ -70,13 +70,11 @@ class Sql extends AbstractIterateur implements Iterator
 	 *
 	 * @return array
 	 */
-	#[\ReturnTypeWillChange]
-	public function current() {
+	public function current(): mixed {
 		return $this->row;
 	}
 
-	#[\ReturnTypeWillChange]
-	public function key() {
+	public function key(): int {
 		return $this->pos;
 	}
 
-- 
GitLab