Code Duplication    Length = 9-9 lines in 2 locations

src/Address/IPv4.php 1 location

@@ 247-255 (lines=9) @@
244
     *
245
     * @see \IPLib\Address\AddressInterface::getBits()
246
     */
247
    public function getBits()
248
    {
249
        $parts = array();
250
        foreach ($this->getBytes() as $byte) {
251
            $parts[] = sprintf('%08b', $byte);
252
        }
253
254
        return implode('', $parts);
255
    }
256
257
    /**
258
     * {@inheritdoc}

src/Address/IPv6.php 1 location

@@ 296-304 (lines=9) @@
293
     *
294
     * @see \IPLib\Address\AddressInterface::getBits()
295
     */
296
    public function getBits()
297
    {
298
        $parts = array();
299
        foreach ($this->getBytes() as $byte) {
300
            $parts[] = sprintf('%08b', $byte);
301
        }
302
303
        return implode('', $parts);
304
    }
305
306
    /**
307
     * Get the word list of the IP address.