for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace AtlassianConnectBundle\Service;
use GuzzleHttp\Client;
use GuzzleHttp\Handler\CurlHandler;
use GuzzleHttp\HandlerStack;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
final class AtlassianRestClientFactory
{
public static function createAtlassianRestClient(TokenStorageInterface $tokenStorage): AtlassianRestClient
$stack = new HandlerStack();
$stack->setHandler(new CurlHandler());
$stack->push(GuzzleJWTMiddleware::middleware(new Client()));
return new AtlassianRestClient(new Client(['handler' => $stack]), $tokenStorage);
}