mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 06:44:59 +00:00
apply rules rector up to php82
This commit is contained in:
@@ -26,7 +26,7 @@ use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
|
||||
final class PostalCodeAPIController extends ApiController
|
||||
{
|
||||
public function __construct(private CountryRepository $countryRepository, private PostalCodeRepositoryInterface $postalCodeRepository, private PaginatorFactory $paginatorFactory)
|
||||
public function __construct(private readonly CountryRepository $countryRepository, private readonly PostalCodeRepositoryInterface $postalCodeRepository, private readonly PaginatorFactory $paginatorFactory)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ final class PostalCodeAPIController extends ApiController
|
||||
|
||||
$pattern = $request->query->get('q');
|
||||
|
||||
if ('' === trim($pattern)) {
|
||||
if ('' === trim((string) $pattern)) {
|
||||
throw new BadRequestHttpException('the search pattern is empty');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user