apply more cs rules for php-cs

This commit is contained in:
2023-10-17 13:27:03 +02:00
parent 0b0cbed9db
commit bc2041cbdd
1485 changed files with 8169 additions and 9620 deletions

View File

@@ -48,12 +48,12 @@ final class EvaluationRepository implements EvaluationRepositoryInterface
*
* @return array<int, Evaluation>
*/
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);
}
public function findOneBy(array $criteria, ?array $orderBy = null): ?Evaluation
public function findOneBy(array $criteria, array $orderBy = null): ?Evaluation
{
return $this->repository->findOneBy($criteria, $orderBy);
}

View File

@@ -34,9 +34,9 @@ interface EvaluationRepositoryInterface extends ObjectRepository
*
* @return array<int, Evaluation>
*/
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;
public function findOneBy(array $criteria, ?array $orderBy = null): ?Evaluation;
public function findOneBy(array $criteria, array $orderBy = null): ?Evaluation;
/**
* @return class-string

View File

@@ -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);
}

View File

@@ -67,7 +67,7 @@ final class ResultRepository implements ObjectRepository
*
* @return array<int, Result>
*/
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);
}
@@ -75,13 +75,13 @@ final class ResultRepository implements ObjectRepository
/**
* @return array<Result>
*/
public function findByGoal(Goal $goal, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array
public function findByGoal(Goal $goal, array $orderBy = null, int $limit = null, int $offset = null): array
{
$qb = $this->buildQueryByGoal($goal);
if (null !== $orderBy) {
foreach ($orderBy as $sort => $order) {
$qb->addOrderBy('r.' . $sort, $order);
$qb->addOrderBy('r.'.$sort, $order);
}
}
@@ -96,13 +96,13 @@ final class ResultRepository implements ObjectRepository
/**
* @return Result[]
*/
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('r');
foreach ($orderBy as $sort => $order) {
$qb->addOrderBy('r.' . $sort, $order);
$qb->addOrderBy('r.'.$sort, $order);
}
return $qb
@@ -112,7 +112,7 @@ final class ResultRepository implements ObjectRepository
->getResult();
}
public function findOneBy(array $criteria, ?array $orderBy = null): ?Result
public function findOneBy(array $criteria, array $orderBy = null): ?Result
{
return $this->repository->findOneBy($criteria, $orderBy);
}

View File

@@ -12,7 +12,6 @@ declare(strict_types=1);
namespace Chill\PersonBundle\Repository\SocialWork;
use Chill\PersonBundle\Entity\SocialWork\SocialAction;
use DateTime;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\QueryBuilder;
@@ -27,7 +26,7 @@ final class SocialActionRepository implements ObjectRepository
$this->repository = $entityManager->getRepository(SocialAction::class);
}
public function createQueryBuilder(string $alias, ?string $indexBy = null): QueryBuilder
public function createQueryBuilder(string $alias, string $indexBy = null): QueryBuilder
{
return $this->repository->createQueryBuilder($alias, $indexBy);
}
@@ -59,12 +58,12 @@ final class SocialActionRepository implements ObjectRepository
*
* @return array<int, SocialAction>
*/
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);
}
public function findOneBy(array $criteria, ?array $orderBy = null): ?SocialAction
public function findOneBy(array $criteria, array $orderBy = null): ?SocialAction
{
return $this->repository->findOneBy($criteria, $orderBy);
}
@@ -84,7 +83,7 @@ final class SocialActionRepository implements ObjectRepository
$qb->where('sa.desactivationDate is null')
->orWhere('sa.desactivationDate > :now')
->orderBy('sa.ordering', 'ASC')
->setParameter('now', new DateTime('now'));
->setParameter('now', new \DateTime('now'));
return $qb;
}

View File

@@ -12,7 +12,6 @@ declare(strict_types=1);
namespace Chill\PersonBundle\Repository\SocialWork;
use Chill\PersonBundle\Entity\SocialWork\SocialIssue;
use DateTime;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\QueryBuilder;
@@ -54,12 +53,12 @@ final class SocialIssueRepository implements ObjectRepository
*
* @return array<int, SocialIssue>
*/
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);
}
public function findOneBy(array $criteria, ?array $orderBy = null): ?SocialIssue
public function findOneBy(array $criteria, array $orderBy = null): ?SocialIssue
{
return $this->repository->findOneBy($criteria, $orderBy);
}
@@ -79,7 +78,7 @@ final class SocialIssueRepository implements ObjectRepository
$qb->where('si.desactivationDate is null')
->orWhere('si.desactivationDate > :now')
->orderBy('si.ordering', 'ASC')
->setParameter('now', new DateTime('now'));
->setParameter('now', new \DateTime('now'));
return $qb;
}