Conditions | 1 |
Paths | 1 |
Total Lines | 20 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
20 | 4 | public static function buildWithOAuth2Provider( |
|
21 | string $endpoint, |
||
22 | OAuth2Provider $oauthProvider, |
||
23 | array $tokenOptions, |
||
24 | Cache $cache, |
||
25 | array $guzzleOptions = [] |
||
26 | ): Client { |
||
27 | 4 | $guzzleOptions = array_merge(['base_uri' => $endpoint], $guzzleOptions); |
|
28 | |||
29 | |||
30 | 4 | return new \Softonic\GraphQL\Client( |
|
31 | 4 | \Softonic\OAuth2\Guzzle\Middleware\ClientBuilder::build( |
|
32 | 4 | $oauthProvider, |
|
33 | 2 | $tokenOptions, |
|
34 | 2 | $cache, |
|
35 | 2 | $guzzleOptions |
|
36 | ), |
||
37 | 4 | new \Softonic\GraphQL\ResponseBuilder() |
|
38 | ); |
||
39 | } |
||
40 | } |
||
41 |