public function delete($owner, $repo = null, $account = null)
    {
        if (!is_null($account) && is_null($repo)) {
            throw new \InvalidArgumentException("To delete an account privileges, you need to specify a repository.");
        }

        $endpoint = sprintf('privileges/%s', $owner);

        if (!is_null($repo)) {
            $endpoint .= '/'.$repo;
        }

        if (!is_null($account)) {
            $endpoint .= '/'.$account;
        }

        return $this->requestDelete($endpoint);
    }
public function delete($owner, $repo = null, $account = null)
    {
        if (!is_null($account) && is_null($repo)) {
            throw new \InvalidArgumentException("To delete an account privileges, you need to specify a repository.");
        }

        $endpoint = sprintf('privileges/%s', $owner);

        if (!is_null($repo)) {
            $endpoint .= '/'.$repo;
        }

        if (!is_null($account)) {
            $endpoint .= '/'.$account;
        }

        return $this->requestDelete($endpoint);
    }
public function delete ( $ owner , $ repo = null , $ account = null ) { if ( ! is_null ( $ account ) && is_null ( $ repo ) ) { throw new \ InvalidArgumentException ( "To delete an account privileges, you need to specify a repository." ) ; } $ endpoint = sprintf ( 'privileges/%s' , $ owner ) ; if ( ! is_null ( $ repo ) ) { $ endpoint .= '/' . $ repo ; } if ( ! is_null ( $ account ) ) { $ endpoint .= '/' . $ account ; } return $ this -> requestDelete ( $ endpoint ) ; }
Delete account privileges from a repository

if `$account` is specified, then all account privileges will be deleted from repository.
If `$account` is not specified, then all privileges from repository will be deleted.
If `repo` is not specified, then all privileges from all repositories will be deleted.

@access public
@param  string           $owner   Owner of the repository.
@param  string           $repo    Repository identifier.
@param  string           $account The account to list privileges for.
@return MessageInterface

@throws \InvalidArgumentException
Delete account privileges from a repository