mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 23:23:51 +00:00
cs: Fix code style (safe rules only).
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user