*/ public array $ran = []; /** @var array> module key => reasons */ public array $held = []; public function ran(string $module): bool { return in_array($module, $this->ran, true); } /** * Reasons of one step, or of all steps that were held back. * * @return list */ public function reasons(?string $module = null): array { if ($module !== null) { return $this->held[$module] ?? []; } return array_values(array_unique(array_merge(...array_values($this->held ?: [[]])))); } }