Code Duplication    Length = 12-12 lines in 2 locations

src/Client/Http/Feed/EventStreamFeedIterator.php 1 location

@@ 89-100 (lines=12) @@
86
    /**
87
     * @return EventStreamFeed
88
     */
89
    public function current(): EventStreamFeed
90
    {
91
        if (null === $this->currentFeed) {
92
            if (true === $this->initialized) {
93
                throw new \OutOfBoundsException('Stream overflow.');
94
            } else {
95
                $this->rewind();
96
            }
97
        }
98
99
        return $this->currentFeed;
100
    }
101
102
    public function next()
103
    {

src/Client/Http/Feed/EventStreamViaPersistentSubscriptionFeedIterator.php 1 location

@@ 84-95 (lines=12) @@
81
    /**
82
     * @return EventStreamViaPersistentSubscriptionFeed
83
     */
84
    public function current(): EventStreamViaPersistentSubscriptionFeed
85
    {
86
        if (null === $this->currentFeed) {
87
            if (true === $this->initialized) {
88
                throw new \OutOfBoundsException('Stream overflow.');
89
            } else {
90
                $this->rewind();
91
            }
92
        }
93
94
        return $this->currentFeed;
95
    }
96
97
    public function next()
98
    {