Code Duplication    Length = 11-11 lines in 2 locations

src/Iterators/Perfect.php 1 location

@@ 59-69 (lines=11) @@
56
  /**
57
   * {@inheritdoc}
58
   */
59
  public function next() {
60
    ++$this->key;
61
    for ($i = $this->key; $i < $this->getMaxLimit(); $i++) {
62
      if ($this->isPerfectNumber($i)) {
63
        $this->key = $i;
64
        $this->current = $i;
65
        $this->count++;
66
        break;
67
      }
68
    }
69
  }
70
71
  /**
72
   * {@inheritdoc}

src/Iterators/Prime.php 1 location

@@ 59-69 (lines=11) @@
56
  /**
57
   * {@inheritdoc}
58
   */
59
  public function next() {
60
    ++$this->key;
61
    for ($i = $this->key; $i < $this->getMaxLimit(); $i++) {
62
      if ($this->isPrimeNumber($i)) {
63
        $this->key = $i;
64
        $this->current = $i;
65
        $this->count++;
66
        break;
67
      }
68
    }
69
  }
70
71
  /**
72
   * {@inheritdoc}