Code Duplication    Length = 10-10 lines in 3 locations

src/IPv4/IPv4Interval.php 1 location

@@ 289-298 (lines=10) @@
286
     *
287
     * @return \Generator
288
     */
289
    public function iterate($step = 1)
290
    {
291
        $end = $this->endPoint()->value();
292
        $ip = $this->startPoint()->value();
293
294
        while ($ip < $end) {
295
            yield long2ip($ip);
296
            $ip += $step;
297
        }
298
    }
299
300
    /**
301
     * @return IntervalType

src/IPv4Network/IPv4Network.php 1 location

@@ 169-178 (lines=10) @@
166
     *
167
     * @return \Generator
168
     */
169
    public function iterate($step = 1)
170
    {
171
        $end = $this->endPoint()->value();
172
        $ip = $this->startPoint()->value();
173
174
        while ($ip < $end) {
175
            yield long2ip($ip);
176
            $ip += $step;
177
        }
178
    }
179
180
    /**
181
     * @return string

src/IPv6Network/IPv6Network.php 1 location

@@ 180-189 (lines=10) @@
177
     *
178
     * @return \Generator
179
     */
180
    public function iterate($step = 1)
181
    {
182
        $end = $this->endPoint()->value();
183
        $ip = $this->startPoint()->value();
184
185
        while ($ip < $end) {
186
            yield long2ip($ip);
187
            $ip += $step;
188
        }
189
    }
190
191
    /**
192
     * @return string