lib/Github/Api/Issue/Milestones.php
public function update($username, $repository, $id, array $params)
    {
        if (isset($params['state']) && !in_array($params['state'], ['open', 'closed'])) {
            $params['state'] = 'open';
        }

        return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/milestones/'.rawurlencode($id), $params);
    }
public function update($username, $repository, $id, array $params)
    {
        if (isset($params['state']) && !in_array($params['state'], ['open', 'closed'])) {
            $params['state'] = 'open';
        }

        return $this->patch('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/milestones/'.rawurlencode($id), $params);
    }
public function update ( $ username , $ repository , $ id , array $ params ) { if ( isset ( $ params [ 'state' ] ) && ! in_array ( $ params [ 'state' ] , [ 'open' , 'closed' ] ) ) { $ params [ 'state' ] = 'open' ; } return $ this -> patch ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/milestones/' . rawurlencode ( $ id ) , $ params ) ; }
Update a milestone for a repository.

@link https://developer.github.com/v3/issues/milestones/#update-a-milestone

@param string $username
@param string $repository
@param int    $id
@param array  $params

@return array
Update a milestone for a repository .