for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace drupol\phpermutations\Generators;
use drupol\phpermutations\GeneratorInterface;
use drupol\phpermutations\Iterators\NGrams as NGramsIterator;
use Generator;
class NGrams extends NGramsIterator implements GeneratorInterface
{
/**
* {@inheritdoc}
*/
public function generator(): Generator
return $this->get();
}
public function toArray(): array
return [];
* Get the generator.
*
* @return Generator<int>
* The generator
protected function get(): Generator
while (true) {
$this->next();
yield $this->current();