From 3691cb06f7cbb9977c957f83c2bcac91d168b9c8 Mon Sep 17 00:00:00 2001 From: Zsolt Szeberenyi Date: Sun, 16 Jan 2022 17:54:00 +1300 Subject: [PATCH 1/2] Fix deprecation errors in PHP 8.1 --- src/LogCalls.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/LogCalls.php b/src/LogCalls.php index 323b4f4..c66182b 100644 --- a/src/LogCalls.php +++ b/src/LogCalls.php @@ -23,6 +23,7 @@ public function __construct( LogCall... $calls ) { $this->calls = $calls; } + #[\ReturnTypeWillChange] public function getIterator() { return new \ArrayIterator( $this->calls ); } @@ -43,6 +44,7 @@ public function getFirstCall(): ?LogCall { return empty( $this->calls ) ? null : $this->calls[0]; } + #[\ReturnTypeWillChange] /** * @since 2.1 * @return int From a7ce2796193c646ad43af32ad0e40a4bdbb690f6 Mon Sep 17 00:00:00 2001 From: Zsolt Szeberenyi Date: Sun, 16 Jan 2022 18:08:12 +1300 Subject: [PATCH 2/2] Fix indentation to match the rest of the code --- src/LogCalls.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/LogCalls.php b/src/LogCalls.php index c66182b..9eb4b57 100644 --- a/src/LogCalls.php +++ b/src/LogCalls.php @@ -23,7 +23,7 @@ public function __construct( LogCall... $calls ) { $this->calls = $calls; } - #[\ReturnTypeWillChange] + #[\ReturnTypeWillChange] public function getIterator() { return new \ArrayIterator( $this->calls ); } @@ -44,7 +44,7 @@ public function getFirstCall(): ?LogCall { return empty( $this->calls ) ? null : $this->calls[0]; } - #[\ReturnTypeWillChange] + #[\ReturnTypeWillChange] /** * @since 2.1 * @return int