| @@ 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} |
|
| @@ 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} |
|