src/Phapi/Endpoint.php
protected function outputMultipleValues(array $output, $key, $value, $longKey)
    {
        // remove the key from the value and remove whitespace
        $newValue = str_replace($longKey.' ', '', trim($value));

        // check if there was a key to remove
        if (trim($value) !== $newValue) {
            // the key was removed and that means we wasn't to add the line as a new row in the array
            $output[$key][] = $newValue;
        } else {
            // the key wasn't removed so we want to merge this line with the previous one
            // count rows in array to get the last key
            $last = count($output[$key]) -1;
            // merge this line with the previous one
            $output[$key][$last] = $output[$key][$last]. ' '. $newValue;
        }

        return $output;
    }
protected function outputMultipleValues(array $output, $key, $value, $longKey)
    {
        // remove the key from the value and remove whitespace
        $newValue = str_replace($longKey.' ', '', trim($value));

        // check if there was a key to remove
        if (trim($value) !== $newValue) {
            // the key was removed and that means we wasn't to add the line as a new row in the array
            $output[$key][] = $newValue;
        } else {
            // the key wasn't removed so we want to merge this line with the previous one
            // count rows in array to get the last key
            $last = count($output[$key]) -1;
            // merge this line with the previous one
            $output[$key][$last] = $output[$key][$last]. ' '. $newValue;
        }

        return $output;
    }
protected function outputMultipleValues ( array $ output , $ key , $ value , $ longKey ) { // remove the key from the value and remove whitespace $ newValue = str_replace ( $ longKey . ' ' , '' , trim ( $ value ) ) ; // check if there was a key to remove if ( trim ( $ value ) !== $ newValue ) { // the key was removed and that means we wasn't to add the line as a new row in the array $ output [ $ key ] [ ] = $ newValue ; } else { // the key wasn't removed so we want to merge this line with the previous one // count rows in array to get the last key $ last = count ( $ output [ $ key ] ) - 1 ; // merge this line with the previous one $ output [ $ key ] [ $ last ] = $ output [ $ key ] [ $ last ] . ' ' . $ newValue ; } return $ output ; }
Handle output with multiple values

@param array $output
@param $key
@param $value
@param $longKey
@return array
Handle output with multiple values