function max($key = null) {
        if($key !== null) {
            $data = \array_column($this->data, $key);
        } else {
            $data = $this->data;
        }
        
        return \max($data);
    }
function max($key = null) {
        if($key !== null) {
            $data = \array_column($this->data, $key);
        } else {
            $data = $this->data;
        }
        
        return \max($data);
    }
function max ( $ key = null ) { if ( $ key !== null ) { $ data = \ array_column ( $ this -> data , $ key ) ; } else { $ data = $ this -> data ; } return \ max ( $ data ) ; }
Return the maximum value of a given key.
@param mixed|null  $key
@return int
Return the maximum value of a given key .