mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-30 10:29:42 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user