clientSiret = $siret_checking; } /** * Vérifie si le numéro de Siret passé en paramètre est valide * @param string $siret * @return bool * @throws \Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface * @throws \Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface * @throws \Symfony\Contracts\HttpClient\Exception\ServerExceptionInterface * @throws \Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface * @see SiretTest::testIsSiretIsCorrect() */ public function isSiretIsCorrect(string $siret): bool { $response = $this->clientSiret->request('GET', $siret); return $response->getStatusCode() === Response::HTTP_OK; } }