mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-10 00:34:58 +00:00
fix cs
This commit is contained in:
@@ -1,12 +1,19 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\MainBundle\Repository;
|
||||
|
||||
use Chill\MainBundle\Entity\GeographicalUnit;
|
||||
use Chill\MainBundle\Entity\GeographicalUnitLayer;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use UnexpectedValueException;
|
||||
|
||||
final class GeographicalUnitLayerLayerRepository implements GeographicalUnitLayerRepositoryInterface
|
||||
{
|
||||
@@ -30,6 +37,15 @@ final class GeographicalUnitLayerLayerRepository implements GeographicalUnitLaye
|
||||
return $this->repository->findAll();
|
||||
}
|
||||
|
||||
public function findAllHavingUnits(): array
|
||||
{
|
||||
$qb = $this->repository->createQueryBuilder('l');
|
||||
|
||||
return $qb->where($qb->expr()->gt('SIZE(l.units)', 0))
|
||||
->getQuery()
|
||||
->getResult();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array|GeographicalUnitLayer[]
|
||||
*/
|
||||
@@ -47,13 +63,4 @@ final class GeographicalUnitLayerLayerRepository implements GeographicalUnitLaye
|
||||
{
|
||||
return GeographicalUnitLayer::class;
|
||||
}
|
||||
|
||||
public function findAllHavingUnits(): array
|
||||
{
|
||||
$qb = $this->repository->createQueryBuilder('l');
|
||||
|
||||
return $qb->where($qb->expr()->gt('SIZE(l.units)', 0))
|
||||
->getQuery()
|
||||
->getResult();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user