mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-01-02 23:41:24 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -13,7 +13,6 @@ namespace Chill\PersonBundle\Repository\SocialWork;
|
||||
|
||||
use Chill\PersonBundle\Entity\SocialWork\Goal;
|
||||
use Chill\PersonBundle\Entity\SocialWork\SocialAction;
|
||||
use DateTime;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
@@ -57,7 +56,7 @@ final class GoalRepository implements ObjectRepository
|
||||
*
|
||||
* @return array<int, Goal>
|
||||
*/
|
||||
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);
|
||||
}
|
||||
@@ -65,7 +64,7 @@ final class GoalRepository implements ObjectRepository
|
||||
/**
|
||||
* @return Goal[]
|
||||
*/
|
||||
public function findBySocialActionWithDescendants(SocialAction $action, array $orderBy = [], ?int $limit = null, ?int $offset = null): array
|
||||
public function findBySocialActionWithDescendants(SocialAction $action, array $orderBy = [], int $limit = null, int $offset = null): array
|
||||
{
|
||||
$qb = $this->buildQueryBySocialActionWithDescendants($action);
|
||||
$qb->select('g');
|
||||
@@ -76,10 +75,10 @@ final class GoalRepository implements ObjectRepository
|
||||
$qb->expr()->gt('g.desactivationDate', ':now')
|
||||
)
|
||||
)
|
||||
->setParameter('now', new DateTime('now'));
|
||||
->setParameter('now', new \DateTime('now'));
|
||||
|
||||
foreach ($orderBy as $sort => $order) {
|
||||
$qb->addOrderBy('g.' . $sort, $order);
|
||||
$qb->addOrderBy('g.'.$sort, $order);
|
||||
}
|
||||
|
||||
return $qb
|
||||
@@ -89,7 +88,7 @@ final class GoalRepository implements ObjectRepository
|
||||
->getResult();
|
||||
}
|
||||
|
||||
public function findOneBy(array $criteria, ?array $orderBy = null): ?Goal
|
||||
public function findOneBy(array $criteria, array $orderBy = null): ?Goal
|
||||
{
|
||||
return $this->repository->findOneBy($criteria, $orderBy);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user