apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -18,7 +18,6 @@ use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Query\ResultSetMapping;
use Doctrine\ORM\Query\ResultSetMappingBuilder;
use RuntimeException;
final class PostalCodeRepository implements PostalCodeRepositoryInterface
{
@@ -55,7 +54,7 @@ final class PostalCodeRepository implements PostalCodeRepositoryInterface
return $this->repository->findAll();
}
public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array
{
return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
}
@@ -69,7 +68,7 @@ final class PostalCodeRepository implements PostalCodeRepositoryInterface
$query->addSelectClause($rsm->generateSelectClause());
$sql = strtr(
$query->buildQuery() . 'ORDER BY pertinence DESC, canonical ASC OFFSET ? LIMIT ? ',
$query->buildQuery().'ORDER BY pertinence DESC, canonical ASC OFFSET ? LIMIT ? ',
// little hack for adding sql method to point
['cmpc.center AS center' => 'ST_AsGeojson(cmpc.center) AS center']
);
@@ -80,7 +79,7 @@ final class PostalCodeRepository implements PostalCodeRepositoryInterface
->getResult();
}
public function findOneBy(array $criteria, ?array $orderBy = null): ?PostalCode
public function findOneBy(array $criteria, array $orderBy = null): ?PostalCode
{
return $this->repository->findOneBy($criteria, $orderBy);
}
@@ -95,7 +94,7 @@ final class PostalCodeRepository implements PostalCodeRepositoryInterface
$pattern = trim($pattern);
if ('' === $pattern) {
throw new RuntimeException('the search pattern must not be empty');
throw new \RuntimeException('the search pattern must not be empty');
}
$query = new SearchApiQuery();