GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 20-20 lines in 2 locations

src/RecursiveCloningIterator.php 1 location

@@ 5-24 (lines=20) @@
2
3
namespace Gielfeldt\Iterators;
4
5
class RecursiveCloningIterator extends CloningIterator implements \RecursiveIterator
6
{
7
    public function __construct($iterator)
8
    {
9
        parent::__construct($iterator);
10
        if (!$this->getInnerIterator() instanceof \RecursiveIterator) {
11
            throw new \InvalidArgumentException('An instance of RecursiveIterator or IteratorAggregate creating it is required');
12
        }
13
    }
14
15
    public function hasChildren()
16
    {
17
        return $this->getInnerIterator()->hasChildren();
18
    }
19
20
    public function getChildren()
21
    {
22
        return new self($this->getInnerIterator()->getChildren());
23
    }
24
}
25

src/RecursiveMapIterator.php 1 location

@@ 5-24 (lines=20) @@
2
3
namespace Gielfeldt\Iterators;
4
5
class RecursiveMapIterator extends MapIterator implements \RecursiveIterator
6
{
7
    public function __construct(\Traversable $iterator, callable $callback)
8
    {
9
        parent::__construct($iterator, $callback);
10
        if (!$this->getInnerIterator() instanceof \RecursiveIterator) {
11
            throw new \InvalidArgumentException('An instance of RecursiveIterator or IteratorAggregate creating it is required');
12
        }
13
    }
14
15
    public function hasChildren()
16
    {
17
        return $this->getInnerIterator()->hasChildren();
18
    }
19
20
    public function getChildren()
21
    {
22
        return new self($this->getInnerIterator()->getChildren(), $this->callback);
23
    }
24
}
25