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