Code Duplication    Length = 10-10 lines in 2 locations

src/Iterators/Perfect.php 1 location

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

src/Iterators/Prime.php 1 location

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