@@ -7,7 +7,7 @@ |
||
| 7 | 7 | use AtlassianConnectBundle\Controller\UnlicensedController; |
| 8 | 8 | use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; |
| 9 | 9 | |
| 10 | -return function (RoutingConfigurator $routes) { |
|
| 10 | +return function(RoutingConfigurator $routes) { |
|
| 11 | 11 | $routes |
| 12 | 12 | ->add('atlassian_connect_descriptor', '/atlassian-connect.json') |
| 13 | 13 | ->controller([DescriptorController::class, 'indexAction']) |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | use Symfony\Component\Security\Guard\AbstractGuardAuthenticator; |
| 25 | 25 | use Twig\Environment; |
| 26 | 26 | |
| 27 | -return static function (ContainerConfigurator $container) { |
|
| 27 | +return static function(ContainerConfigurator $container) { |
|
| 28 | 28 | $container->parameters() |
| 29 | 29 | ->set('atlassian_connect_license_listener_class', LicenseListener::class) |
| 30 | 30 | ->set('atlassian_connect_jwt_user_provider_class', JWTUserProvider::class) |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | $this->inner |
| 31 | 31 | ->expects($this->once()) |
| 32 | 32 | ->method('request') |
| 33 | - ->with('GET', 'https://app.atlassian.com/resource', $this->callback(function (array $options): bool { |
|
| 33 | + ->with('GET', 'https://app.atlassian.com/resource', $this->callback(function(array $options): bool { |
|
| 34 | 34 | $this->assertArrayHasKey('Authorization', $options['headers']); |
| 35 | 35 | $this->assertStringStartsWith('JWT', $options['headers']['Authorization']); |
| 36 | 36 | |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | ->method('request') |
| 55 | 55 | ->withConsecutive( |
| 56 | 56 | ['POST', 'https://oauth-2-authorization-server.services.atlassian.com/oauth2/token', $this->anything()], |
| 57 | - ['GET', 'https://app.atlassian.com/resource', $this->callback(function (array $options): bool { |
|
| 57 | + ['GET', 'https://app.atlassian.com/resource', $this->callback(function(array $options): bool { |
|
| 58 | 58 | $this->assertEquals('Bearer token', $options['headers']['Authorization']); |
| 59 | 59 | |
| 60 | 60 | return true; |
@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | unset($options['user_id']); |
| 23 | 23 | |
| 24 | 24 | if (!$userId) { |
| 25 | - $options['headers']['Authorization'] = 'JWT ' . JWTGenerator::generate($url, $method, $tenant->getAddonKey(), $tenant->getSharedSecret()); |
|
| 25 | + $options['headers']['Authorization'] = 'JWT '.JWTGenerator::generate($url, $method, $tenant->getAddonKey(), $tenant->getSharedSecret()); |
|
| 26 | 26 | |
| 27 | 27 | return $this->client->request($method, $url, $options); |
| 28 | 28 | } |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | ], |
| 39 | 39 | ]); |
| 40 | 40 | |
| 41 | - $options['headers']['Authorization'] = 'Bearer ' . $result->toArray()['access_token'] ; |
|
| 41 | + $options['headers']['Authorization'] = 'Bearer '.$result->toArray()['access_token']; |
|
| 42 | 42 | |
| 43 | 43 | return $this->client->request($method, $url, $options); |
| 44 | 44 | } |