public static function getBool(array $array, $key, bool $default = false) : bool
    {
        $key = (string) $key;

        if ($array[$key] ?? 0) {
            return (bool) $array[$key];
        }

        return $default;
    }