Skip to content

Commit

Permalink
Add ReturnTypeWillChange for PHP 8.1
Browse files Browse the repository at this point in the history
split: 9dcb857bef090f3bc4d60e9fb64dba4b4461cbb2
  • Loading branch information
kylekatarnls committed Nov 11, 2021
1 parent ab1bf66 commit 7f041b1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Ast/Node.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use InvalidArgumentException;
use Phug\AstException;
use ReturnTypeWillChange;

/**
* Represents a node in a tree-like data structure.
Expand Down Expand Up @@ -418,6 +419,7 @@ public function findArray(callable $callback, $depth = null)
/**
* {@inheritdoc}
*/
#[ReturnTypeWillChange]
public function getIterator()
{
foreach ($this->children as $child) {
Expand All @@ -428,6 +430,7 @@ public function getIterator()
/**
* {@inheritdoc}
*/
#[ReturnTypeWillChange]
public function count()
{
return $this->getChildCount();
Expand All @@ -436,6 +439,7 @@ public function count()
/**
* {@inheritdoc}
*/
#[ReturnTypeWillChange]
public function offsetExists($offset)
{
return $this->hasChildAt($offset);
Expand All @@ -444,6 +448,7 @@ public function offsetExists($offset)
/**
* {@inheritdoc}
*/
#[ReturnTypeWillChange]
public function offsetGet($offset)
{
return $this->getChildAt($offset);
Expand All @@ -452,6 +457,7 @@ public function offsetGet($offset)
/**
* {@inheritdoc}
*/
#[ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
if (!($value instanceof NodeInterface)) {
Expand All @@ -475,6 +481,7 @@ public function offsetSet($offset, $value)
/**
* {@inheritdoc}
*/
#[ReturnTypeWillChange]
public function offsetUnset($offset)
{
$this->removeChildAt($offset);
Expand Down

0 comments on commit 7f041b1

Please sign in to comment.