function compute_types()

in scripts/extract_redis_commands_argcounts.php [239:252]


function compute_types(): array {
    global $commands;
    $types = [];
    foreach ($commands as $name => $cmd) {
        // printf("%s: %s\n", $name, json_encode($cmd, JSON_PRETTY_PRINT));
        try {
            $type = categorize($cmd, $name);
        } catch (Exception $e) {
            $type = "unknown: {$e->getMessage()} " . json_encode($cmd);
        }
        $types[$name] = $type;
    }
    return $types;
}