src/Phapi/Endpoint.php
protected function outputSingleValue(array $output, $key, $value, $longKey)
    {
        // save the current value
        $oldValue = $output[$key];

        // remove the key from the value and remove whitespace
        $newValue = trim(str_replace($longKey.' ', '', trim($value)));

        // check if there was a key to remove
        if (trim($value) !== $newValue) {
            // the key was removed so we want to create an array with the previous and new value
            $output[$key] = [$oldValue, $newValue];
        } else {
            // the wasn't a key to remove so we want to merge this line with the previous one
            $output[$key] .= ' '. $newValue;
        }

        return $output;
    }
protected function outputSingleValue(array $output, $key, $value, $longKey)
    {
        // save the current value
        $oldValue = $output[$key];

        // remove the key from the value and remove whitespace
        $newValue = trim(str_replace($longKey.' ', '', trim($value)));

        // check if there was a key to remove
        if (trim($value) !== $newValue) {
            // the key was removed so we want to create an array with the previous and new value
            $output[$key] = [$oldValue, $newValue];
        } else {
            // the wasn't a key to remove so we want to merge this line with the previous one
            $output[$key] .= ' '. $newValue;
        }

        return $output;
    }
protected function outputSingleValue ( array $ output , $ key , $ value , $ longKey ) { // save the current value $ oldValue = $ output [ $ key ] ; // remove the key from the value and remove whitespace $ newValue = trim ( str_replace ( $ longKey . ' ' , '' , trim ( $ value ) ) ) ; // check if there was a key to remove if ( trim ( $ value ) !== $ newValue ) { // the key was removed so we want to create an array with the previous and new value $ output [ $ key ] = [ $ oldValue , $ newValue ] ; } else { // the wasn't a key to remove so we want to merge this line with the previous one $ output [ $ key ] .= ' ' . $ newValue ; } return $ output ; }
Handle output with single value

@param array $output
@param $key
@param $value
@param $longKey
@return array
Handle output with single value