Clean up generator preset handling

This commit is contained in:
Dylan K. Taylor
2021-04-13 20:19:53 +01:00
parent bfa1b4384b
commit 6ce15854af
8 changed files with 23 additions and 51 deletions

View File

@ -50,22 +50,15 @@ abstract class Generator{
/** @var int */
protected $seed;
/**
* @var mixed[]
* @phpstan-var array<string, mixed>
*/
protected $options;
protected string $preset;
/** @var Random */
protected $random;
/**
* @param mixed[] $options
* @phpstan-param array<string, mixed> $options
*/
public function __construct(int $seed, array $options = []){
public function __construct(int $seed, string $preset){
$this->seed = $seed;
$this->options = $options;
$this->preset = $preset;
$this->random = new Random($seed);
}