public function grant($owner, $repo, $account, $privilege)
    {
        if (!in_array($privilege, array('read', 'write', 'admin'))) {
            throw new \InvalidArgumentException("Invalid privilege provided.");
        }

        return $this->requestPut(
            sprintf('privileges/%s/%s/%s', $owner, $repo, $account),
            $privilege
        );
    }
public function grant($owner, $repo, $account, $privilege)
    {
        if (!in_array($privilege, array('read', 'write', 'admin'))) {
            throw new \InvalidArgumentException("Invalid privilege provided.");
        }

        return $this->requestPut(
            sprintf('privileges/%s/%s/%s', $owner, $repo, $account),
            $privilege
        );
    }
public function grant ( $ owner , $ repo , $ account , $ privilege ) { if ( ! in_array ( $ privilege , array ( 'read' , 'write' , 'admin' ) ) ) { throw new \ InvalidArgumentException ( "Invalid privilege provided." ) ; } return $ this -> requestPut ( sprintf ( 'privileges/%s/%s/%s' , $ owner , $ repo , $ account ) , $ privilege ) ; }
Grants an account a privilege on a repository.

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

@throws \InvalidArgumentException
Grants an account a privilege on a repository .