Merge pull request #46 from 3kbest/pr81

silence PHP 8.1 deprecations
This commit is contained in:
Chris Boden 2021-12-05 16:51:02 -05:00 committed by GitHub
commit ef9dbe8dfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;