public function addHistory(array $entry)
    {
        if ($this->path !== '') {
            $this->appendNewEntryToPath($entry);
        } else {
            Validate::isTrue(
                array_key_exists('request', $entry) &&
                array_key_exists('options', $entry) &&
                (array_key_exists('response', $entry) ||
                array_key_exists('reason', $entry)),
                'Given history entry not in correct format'
            );
            $this->history[] = $entry;
        }
        ++$this->count;
    }
public function addHistory(array $entry)
    {
        if ($this->path !== '') {
            $this->appendNewEntryToPath($entry);
        } else {
            Validate::isTrue(
                array_key_exists('request', $entry) &&
                array_key_exists('options', $entry) &&
                (array_key_exists('response', $entry) ||
                array_key_exists('reason', $entry)),
                'Given history entry not in correct format'
            );
            $this->history[] = $entry;
        }
        ++$this->count;
    }
public function addHistory ( array $ entry ) { if ( $ this -> path !== '' ) { $ this -> appendNewEntryToPath ( $ entry ) ; } else { Validate :: isTrue ( array_key_exists ( 'request' , $ entry ) && array_key_exists ( 'options' , $ entry ) && ( array_key_exists ( 'response' , $ entry ) || array_key_exists ( 'reason' , $ entry ) ) , 'Given history entry not in correct format' ) ; $ this -> history [ ] = $ entry ; } ++ $ this -> count ; }
Add an entry to history

@param array $entry the entry to be added.
Add an entry to history