cs: Fix code style (safe rules only).

This commit is contained in:
Pol Dellaiera
2021-11-23 14:06:38 +01:00
parent 149d7ce991
commit 8f96a1121d
1223 changed files with 65199 additions and 64625 deletions

View File

@@ -1,13 +1,20 @@
<?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\DocGeneratorBundle\Repository;
use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate;
use Doctrine\Persistence\ObjectRepository;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Doctrine\Persistence\ObjectRepository;
final class DocGeneratorTemplateRepository implements ObjectRepository
{
@@ -23,11 +30,6 @@ final class DocGeneratorTemplateRepository implements ObjectRepository
return $this->repository->find($id, $lockMode, $lockVersion);
}
public function findOneBy(array $criteria, array $orderBy = null): ?DocGeneratorTemplate
{
return $this->repository->findOneBy($criteria, $orderBy);
}
/**
* @return DocGeneratorTemplate[]
*/
@@ -37,26 +39,34 @@ final class DocGeneratorTemplateRepository implements ObjectRepository
}
/**
* @param mixed|null $limit
* @param mixed|null $offset
*
* @return DocGeneratorTemplate[]
*/
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 findByEntity($entity) {
public function findByEntity($entity)
{
$builder = $this->repository->createQueryBuilder('t');
$builder
->where('t.entities LIKE :entity')
->setParameter('entity', '%'.addslashes($entity).'%')
;
->setParameter('entity', '%' . addslashes($entity) . '%');
return $builder->getQuery()->execute();
}
public function getClassName() {
public function findOneBy(array $criteria, ?array $orderBy = null): ?DocGeneratorTemplate
{
return $this->repository->findOneBy($criteria, $orderBy);
}
public function getClassName()
{
return DocGeneratorTemplate::class;
}
}