private function arrayPair($key, $val): string
    {
        $key_str = is_int($key) ? $key : $this->quoted($key);

        $val_str = $this->arrayValue($val);

        return sprintf('%s => %s', $key_str, $val_str);
    }
private function arrayPair($key, $val): string
    {
        $key_str = is_int($key) ? $key : $this->quoted($key);

        $val_str = $this->arrayValue($val);

        return sprintf('%s => %s', $key_str, $val_str);
    }
private function arrayPair ( $ key , $ val ) : string { $ key_str = is_int ( $ key ) ? $ key : $ this -> quoted ( $ key ) ; $ val_str = $ this -> arrayValue ( $ val ) ; return sprintf ( '%s => %s' , $ key_str , $ val_str ) ; }
Return a formatted string for the given key => value pair.

@param int|string    $key
@param mixed         $val
@return string
Return a formatted string for the given key = > value pair .