Add ReturnTypeWillChange attribute to silence PHP 8.1 deprecations

This commit is contained in:
Eirik Besteland 2021-11-20 01:59:07 +01:00
parent c8651c7938
commit 79c3dd3924

View File

@ -12,11 +12,13 @@ class Message implements \IteratorAggregate, MessageInterface {
*/ */
private $len; private $len;
#[\ReturnTypeWillChange]
public function __construct() { public function __construct() {
$this->_frames = new \SplDoublyLinkedList; $this->_frames = new \SplDoublyLinkedList;
$this->len = 0; $this->len = 0;
} }
#[\ReturnTypeWillChange]
public function getIterator() { public function getIterator() {
return $this->_frames; return $this->_frames;
} }
@ -24,6 +26,7 @@ class Message implements \IteratorAggregate, MessageInterface {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange]
public function count() { public function count() {
return count($this->_frames); return count($this->_frames);
} }
@ -31,6 +34,7 @@ class Message implements \IteratorAggregate, MessageInterface {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
#[\ReturnTypeWillChange]
public function isCoalesced() { public function isCoalesced() {
if (count($this->_frames) == 0) { if (count($this->_frames) == 0) {
return false; return false;