src/Connector/Languages.php
protected function updateTeam(
        string $project,
        string $langCode,
        array $members,
        bool $skipInvalidUsername,
        string $team
    ): ResponseInterface {
        // Make sure the $members array is not empty
        if (!\count($members)) {
            throw new \InvalidArgumentException("The $team array must contain at least one username.");
        }

        $uri = $this->createUri("/api/2/project/$project/language/$langCode/$team/");

        if ($skipInvalidUsername) {
            $uri = $uri->withQuery('skip_invalid_username');
        }

        $request = $this->createRequest('PUT', $uri);
        $request = $request->withBody($this->streamFactory->createStream(\json_encode($members)));
        $request = $request->withHeader('Content-Type', 'application/json');

        return $this->client->sendRequest($request);
    }
protected function updateTeam(
        string $project,
        string $langCode,
        array $members,
        bool $skipInvalidUsername,
        string $team
    ): ResponseInterface {
        // Make sure the $members array is not empty
        if (!\count($members)) {
            throw new \InvalidArgumentException("The $team array must contain at least one username.");
        }

        $uri = $this->createUri("/api/2/project/$project/language/$langCode/$team/");

        if ($skipInvalidUsername) {
            $uri = $uri->withQuery('skip_invalid_username');
        }

        $request = $this->createRequest('PUT', $uri);
        $request = $request->withBody($this->streamFactory->createStream(\json_encode($members)));
        $request = $request->withHeader('Content-Type', 'application/json');

        return $this->client->sendRequest($request);
    }
protected function updateTeam ( string $ project , string $ langCode , array $ members , bool $ skipInvalidUsername , string $ team ) : ResponseInterface { // Make sure the $members array is not empty if ( ! \ count ( $ members ) ) { throw new \ InvalidArgumentException ( "The $team array must contain at least one username." ) ; } $ uri = $ this -> createUri ( "/api/2/project/$project/language/$langCode/$team/" ) ; if ( $ skipInvalidUsername ) { $ uri = $ uri -> withQuery ( 'skip_invalid_username' ) ; } $ request = $ this -> createRequest ( 'PUT' , $ uri ) ; $ request = $ request -> withBody ( $ this -> streamFactory -> createStream ( \ json_encode ( $ members ) ) ) ; $ request = $ request -> withHeader ( 'Content-Type' , 'application/json' ) ; return $ this -> client -> sendRequest ( $ request ) ; }
Base method to update a given language team in a project.

@param string   $project             The project to retrieve details for
@param string   $langCode            The language code to retrieve details for
@param string[] $members             An array of the team members for the language
@param bool     $skipInvalidUsername If true, the API call does not fail and instead will return a list of invalid usernames
@param string   $team                The team to update

@return ResponseInterface

@throws \InvalidArgumentException
Base method to update a given language team in a project .