Code Duplication    Length = 12-12 lines in 2 locations

src/Iterators/Perfect.php 1 location

@@ 47-58 (lines=12) @@
44
    /**
45
     * {@inheritdoc}
46
     */
47
    public function current()
48
    {
49
        for ($i = $this->key(); $i < $this->getMaxLimit(); ++$i) {
50
            if ($this->isPerfectNumber($i)) {
51
                $this->key = $i;
52
53
                return $i;
54
            }
55
        }
56
57
        return $this->getMaxLimit();
58
    }
59
60
    /**
61
     * {@inheritdoc}

src/Iterators/Prime.php 1 location

@@ 47-58 (lines=12) @@
44
    /**
45
     * {@inheritdoc}
46
     */
47
    public function current()
48
    {
49
        for ($i = $this->key(); $i < $this->getMaxLimit(); ++$i) {
50
            if ($this->isPrimeNumber($i)) {
51
                $this->key = $i;
52
53
                return $i;
54
            }
55
        }
56
57
        return $this->getMaxLimit();
58
    }
59
60
    /**
61
     * {@inheritdoc}