for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace drupol\phpermutations\Iterators;
use drupol\phpermutations\Iterators;
use function count;
class Cycle extends Iterators
{
/**
* {@inheritdoc}
*/
public function count(): int
return count($this->getDataset());
}
public function current(): mixed
return $this->dataset[$this->key];
*
* @return void
public function next()
$this->key = ($this->key + 1) % $this->datasetCount;
public function rewind(): void
$this->key = 0;
* @return bool
public function valid(): bool
return true;