lib/Github/Api/PullRequest/Review.php
public function submit($username, $repository, $pullRequest, $id, array $params = [])
    {
        if (!isset($params['event'])) {
            throw new MissingArgumentException('event');
        }

        if (!in_array($params['event'], ['APPROVE', 'REQUEST_CHANGES', 'COMMENT'], true)) {
            throw new InvalidArgumentException(sprintf('"event" must be one of ["APPROVE", "REQUEST_CHANGES", "COMMENT"] ("%s" given).', $params['event']));
        }

        return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.$pullRequest.'/reviews/'.$id.'/events', $params);
    }
public function submit($username, $repository, $pullRequest, $id, array $params = [])
    {
        if (!isset($params['event'])) {
            throw new MissingArgumentException('event');
        }

        if (!in_array($params['event'], ['APPROVE', 'REQUEST_CHANGES', 'COMMENT'], true)) {
            throw new InvalidArgumentException(sprintf('"event" must be one of ["APPROVE", "REQUEST_CHANGES", "COMMENT"] ("%s" given).', $params['event']));
        }

        return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/pulls/'.$pullRequest.'/reviews/'.$id.'/events', $params);
    }
public function submit ( $ username , $ repository , $ pullRequest , $ id , array $ params = [ ] ) { if ( ! isset ( $ params [ 'event' ] ) ) { throw new MissingArgumentException ( 'event' ) ; } if ( ! in_array ( $ params [ 'event' ] , [ 'APPROVE' , 'REQUEST_CHANGES' , 'COMMENT' ] , true ) ) { throw new InvalidArgumentException ( sprintf ( '"event" must be one of ["APPROVE", "REQUEST_CHANGES", "COMMENT"] ("%s" given).' , $ params [ 'event' ] ) ) ; } return $ this -> post ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/pulls/' . $ pullRequest . '/reviews/' . $ id . '/events' , $ params ) ; }
Submit a pull request review by the username, repository, pull request number and the review id.

@link https://developer.github.com/v3/pulls/reviews/#submit-a-pull-request-review

@param string $username    the username
@param string $repository  the repository
@param int    $pullRequest the pull request number
@param int    $id          the review id
@param array  $params      a list of extra parameters.

@throws MissingArgumentException

@return array the pull request review
Submit a pull request review by the username repository pull request number and the review id .