mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
cs: Fix code style (safe rules only).
This commit is contained in:
@@ -1,35 +1,42 @@
|
||||
<?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.
|
||||
*/
|
||||
|
||||
namespace Chill\AMLI\BudgetBundle\Repository;
|
||||
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use DateTime;
|
||||
|
||||
/**
|
||||
* ChargeRepository
|
||||
* ChargeRepository.
|
||||
*
|
||||
* This class was generated by the Doctrine ORM. Add your own custom
|
||||
* repository methods below.
|
||||
*/
|
||||
class ChargeRepository extends \Doctrine\ORM\EntityRepository
|
||||
{
|
||||
public function findByPersonAndDate(Person $person, \DateTime $date, $sort = null)
|
||||
public function findByPersonAndDate(Person $person, DateTime $date, $sort = null)
|
||||
{
|
||||
$qb = $this->createQueryBuilder('c');
|
||||
|
||||
|
||||
$qb->where('c.person = :person')
|
||||
->andWhere('c.startDate < :date')
|
||||
->andWhere('c.startDate < :date OR c.startDate IS NULL')
|
||||
;
|
||||
|
||||
if ($sort !== null) {
|
||||
->andWhere('c.startDate < :date OR c.startDate IS NULL');
|
||||
|
||||
if (null !== $sort) {
|
||||
$qb->orderBy($sort);
|
||||
}
|
||||
|
||||
|
||||
$qb->setParameters([
|
||||
'person' => $person,
|
||||
'date' => $date
|
||||
'date' => $date,
|
||||
]);
|
||||
|
||||
|
||||
return $qb->getQuery()->getResult();
|
||||
}
|
||||
}
|
||||
|
@@ -1,35 +1,42 @@
|
||||
<?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.
|
||||
*/
|
||||
|
||||
namespace Chill\AMLI\BudgetBundle\Repository;
|
||||
|
||||
use Chill\PersonBundle\Entity\Person;
|
||||
use DateTime;
|
||||
|
||||
/**
|
||||
* ResourceRepository
|
||||
* ResourceRepository.
|
||||
*
|
||||
* This class was generated by the Doctrine ORM. Add your own custom
|
||||
* repository methods below.
|
||||
*/
|
||||
class ResourceRepository extends \Doctrine\ORM\EntityRepository
|
||||
{
|
||||
public function findByPersonAndDate(Person $person, \DateTime $date, $sort = null)
|
||||
public function findByPersonAndDate(Person $person, DateTime $date, $sort = null)
|
||||
{
|
||||
$qb = $this->createQueryBuilder('c');
|
||||
|
||||
|
||||
$qb->where('c.person = :person')
|
||||
->andWhere('c.startDate < :date')
|
||||
->andWhere('c.startDate < :date OR c.startDate IS NULL')
|
||||
;
|
||||
|
||||
if ($sort !== null) {
|
||||
->andWhere('c.startDate < :date OR c.startDate IS NULL');
|
||||
|
||||
if (null !== $sort) {
|
||||
$qb->orderBy($sort);
|
||||
}
|
||||
|
||||
|
||||
$qb->setParameters([
|
||||
'person' => $person,
|
||||
'date' => $date
|
||||
'date' => $date,
|
||||
]);
|
||||
|
||||
|
||||
return $qb->getQuery()->getResult();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user