public static function create(?TypeCollection $types = null): self
    {
        $types = $types ?? TypeCollection::createDefault();

        $parser = new Parser();

        $factory = new RouteFactory($parser, $types);

        return new self($factory);
    }