Code Duplication    Length = 10-10 lines in 2 locations

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