src/Model/ApiResourceBase.php
protected function runLongOperation($op, $method = 'post', array $body = [])
    {
        $result = $this->runOperation($op, $method, $body);
        $activities = $result->getActivities();
        if (count($activities) !== 1) {
            trigger_error(sprintf("Expected one activity, found %d", count($activities)), E_USER_WARNING);
        }

        return reset($activities);
    }
protected function runLongOperation($op, $method = 'post', array $body = [])
    {
        $result = $this->runOperation($op, $method, $body);
        $activities = $result->getActivities();
        if (count($activities) !== 1) {
            trigger_error(sprintf("Expected one activity, found %d", count($activities)), E_USER_WARNING);
        }

        return reset($activities);
    }
protected function runLongOperation ( $ op , $ method = 'post' , array $ body = [ ] ) { $ result = $ this -> runOperation ( $ op , $ method , $ body ) ; $ activities = $ result -> getActivities ( ) ; if ( count ( $ activities ) !== 1 ) { trigger_error ( sprintf ( "Expected one activity, found %d" , count ( $ activities ) ) , E_USER_WARNING ) ; } return reset ( $ activities ) ; }
Run a long-running operation.

@param string $op
@param string $method
@param array  $body

@return Activity
Run a long - running operation .