mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
cs-fixes
This commit is contained in:
@@ -50,7 +50,7 @@ class ChargeRepository extends EntityRepository
|
||||
|
||||
$entityStr = $entity instanceof Person ? 'person' : 'household';
|
||||
|
||||
$qb->where("c.$entityStr = :$entityStr")
|
||||
$qb->where("c.{$entityStr} = :{$entityStr}")
|
||||
->andWhere('c.startDate < :date')
|
||||
->andWhere('c.startDate < :date OR c.startDate IS NULL');
|
||||
|
||||
|
@@ -11,7 +11,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\BudgetBundle\Repository;
|
||||
|
||||
use Chill\PersonBundle\Entity\Household\Household;
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use DateTime;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
@@ -24,7 +23,6 @@ use Doctrine\ORM\EntityRepository;
|
||||
*/
|
||||
class ResourceRepository extends EntityRepository
|
||||
{
|
||||
|
||||
// public function findByEntity($entity)
|
||||
// {
|
||||
|
||||
@@ -36,7 +34,7 @@ class ResourceRepository extends EntityRepository
|
||||
|
||||
$entityStr = $entity instanceof Person ? 'person' : 'household';
|
||||
|
||||
$qb->where("c.$entityStr = :$entityStr")
|
||||
$qb->where("c.{$entityStr} = :{$entityStr}")
|
||||
->andWhere('c.startDate < :date')
|
||||
->andWhere('c.startDate < :date OR c.startDate IS NULL');
|
||||
|
||||
@@ -51,5 +49,4 @@ class ResourceRepository extends EntityRepository
|
||||
|
||||
return $qb->getQuery()->getResult();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user