Pipeline fixes

This commit is contained in:
Julie Lenaerts 2024-07-17 16:21:19 +02:00
parent 20af766cdf
commit 3fc3f32c5f
2 changed files with 4 additions and 4 deletions

View File

@ -34,7 +34,7 @@ class EventType extends AbstractType
{
$builder
->add('name', TextType::class, [
'required' => true
'required' => true,
])
->add('date', ChillDateTimeType::class, [
'required' => true,

View File

@ -91,7 +91,7 @@ class PartenaireRomeAppellation
try {
$response = $this->httpClient->request('GET', sprintf(self::BASE.'appellation/%s', $code), [
'headers' => [
'Authorization' => 'Bearer ' . $bearer,
'Authorization' => 'Bearer '.$bearer,
'Accept' => 'application/json',
],
'query' => [
@ -101,9 +101,9 @@ class PartenaireRomeAppellation
return $response->toArray();
} catch (HttpExceptionInterface $exception) {
if ($exception->getResponse()->getStatusCode() === 429) {
if (429 === $exception->getResponse()->getStatusCode()) {
$retryAfter = $exception->getResponse()->getHeaders(false)['retry-after'][0] ?? 1;
sleep((int)$retryAfter);
sleep((int) $retryAfter);
} else {
throw $exception;
}