*/ private array $vacantTypes, ) { if ($vacantTypes === []) { return; } foreach ($vacantTypes as $key => $vacantType) { try { $this->vacantTypes[$key] = TypeHelper::assignVacantTypes($vacantType, $vacantTypes); } catch (InvalidType $exception) { $this->vacantTypes[$key] = new UnresolvableType($vacantType->toString(), $exception->getMessage()); } } } public function parse(string $raw): Type { $type = $this->delegate->parse($raw); if ($this->vacantTypes !== []) { $type = TypeHelper::assignVacantTypes($type, $this->vacantTypes); } return $type; } }