@@ -9,7 +9,6 @@ |
||
| 9 | 9 | use CommerceGuys\Guzzle\Oauth2\Tests\MockOAuth2Server; |
| 10 | 10 | use CommerceGuys\Guzzle\Oauth2\Tests\MockOAuthMiddleware; |
| 11 | 11 | use CommerceGuys\Guzzle\Oauth2\Tests\TestBase; |
| 12 | -use GuzzleHttp\HandlerStack; |
|
| 13 | 12 | use GuzzleHttp\RequestOptions; |
| 14 | 13 | use Psr\Http\Message\ResponseInterface; |
| 15 | 14 | |
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | array_fill( |
| 48 | 48 | 0, |
| 49 | 49 | $this->options[self::KEY_EXPECTED_QUERY_COUNT], |
| 50 | - function (RequestInterface $request, array $options) { |
|
| 50 | + function(RequestInterface $request, array $options) { |
|
| 51 | 51 | return $this->getResult($request, $options); |
| 52 | 52 | } |
| 53 | 53 | ) |
@@ -50,12 +50,12 @@ |
||
| 50 | 50 | { |
| 51 | 51 | $calls = 0; |
| 52 | 52 | |
| 53 | - return function (callable $handler) use (&$calls) { |
|
| 54 | - return function (RequestInterface $request, array $options) use ($handler, &$calls) { |
|
| 53 | + return function(callable $handler) use (&$calls) { |
|
| 54 | + return function(RequestInterface $request, array $options) use ($handler, &$calls) { |
|
| 55 | 55 | /** @var PromiseInterface */ |
| 56 | 56 | $promise = $handler($request, $options); |
| 57 | 57 | return $promise->then( |
| 58 | - function (ResponseInterface $response) use ($request, $options, &$calls) { |
|
| 58 | + function(ResponseInterface $response) use ($request, $options, &$calls) { |
|
| 59 | 59 | if ( |
| 60 | 60 | isset($this->options[self::KEY_TOKEN_EXPIRED_ON_FAILURE_COUNT]) && |
| 61 | 61 | isset($options['auth']) && |
@@ -4,4 +4,4 @@ |
||
| 4 | 4 | * A script containing any set-up steps required for PHPUnit testing. |
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | -require __DIR__ . '/../vendor/autoload.php'; |
|
| 7 | +require __DIR__.'/../vendor/autoload.php'; |
|
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | $grantType = new JwtBearer($this->createClient(), [ |
| 39 | 39 | 'client_id' => 'testClient', |
| 40 | 40 | 'client_secret' => 'clientSecret', |
| 41 | - 'private_key' => new SplFileObject(__DIR__ . '/../private.key') |
|
| 41 | + 'private_key' => new SplFileObject(__DIR__.'/../private.key') |
|
| 42 | 42 | ]); |
| 43 | 43 | $token = $grantType->getToken(); |
| 44 | 44 | $this->assertNotEmpty($token->getToken()); |
@@ -56,8 +56,8 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | public function onBefore() |
| 58 | 58 | { |
| 59 | - return function (callable $handler) { |
|
| 60 | - return function (RequestInterface $request, array $options) use ($handler) { |
|
| 59 | + return function(callable $handler) { |
|
| 60 | + return function(RequestInterface $request, array $options) use ($handler) { |
|
| 61 | 61 | if ( |
| 62 | 62 | isset($options['auth']) && |
| 63 | 63 | 'oauth2' == $options['auth'] && |
@@ -79,13 +79,13 @@ discard block |
||
| 79 | 79 | { |
| 80 | 80 | $calls = 0; |
| 81 | 81 | |
| 82 | - return function (callable $handler) use (&$calls, $limit) { |
|
| 83 | - return function (RequestInterface $request, array $options) use ($handler, &$calls, $limit) { |
|
| 82 | + return function(callable $handler) use (&$calls, $limit) { |
|
| 83 | + return function(RequestInterface $request, array $options) use ($handler, &$calls, $limit) { |
|
| 84 | 84 | /* @var PromiseInterface */ |
| 85 | 85 | $promise = $handler($request, $options); |
| 86 | 86 | |
| 87 | 87 | return $promise->then( |
| 88 | - function (ResponseInterface $response) use ($request, $options, &$calls, $limit) { |
|
| 88 | + function(ResponseInterface $response) use ($request, $options, &$calls, $limit) { |
|
| 89 | 89 | if ( |
| 90 | 90 | $response->getStatusCode() == 401 && |
| 91 | 91 | isset($options['auth']) && |