mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
fix cs
This commit is contained in:
@@ -12,11 +12,8 @@ declare(strict_types=1);
|
||||
namespace Chill\ActivityBundle\Repository;
|
||||
|
||||
use Chill\ActivityBundle\Entity\ActivityType;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use UnexpectedValueException;
|
||||
|
||||
final class ActivityTypeRepository implements ActivityTypeRepositoryInterface
|
||||
{
|
||||
@@ -24,15 +21,7 @@ final class ActivityTypeRepository implements ActivityTypeRepositoryInterface
|
||||
|
||||
public function __construct(EntityManagerInterface $em)
|
||||
{
|
||||
$this->repository = $em->getRepository(ActivityType::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array|ActivityType[]
|
||||
*/
|
||||
public function findAllActive(): array
|
||||
{
|
||||
return $this->findBy(['active' => true]);
|
||||
$this->repository = $em->getRepository(ActivityType::class);
|
||||
}
|
||||
|
||||
public function find($id): ?ActivityType
|
||||
@@ -48,6 +37,14 @@ final class ActivityTypeRepository implements ActivityTypeRepositoryInterface
|
||||
return $this->repository->findAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array|ActivityType[]
|
||||
*/
|
||||
public function findAllActive(): array
|
||||
{
|
||||
return $this->findBy(['active' => true]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array|ActivityType[]
|
||||
*/
|
||||
@@ -65,6 +62,4 @@ final class ActivityTypeRepository implements ActivityTypeRepositoryInterface
|
||||
{
|
||||
return ActivityType::class;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@@ -1,5 +1,14 @@
|
||||
<?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\ActivityBundle\Repository;
|
||||
|
||||
use Chill\ActivityBundle\Entity\ActivityType;
|
||||
@@ -11,5 +20,4 @@ interface ActivityTypeRepositoryInterface extends ObjectRepository
|
||||
* @return array|ActivityType[]
|
||||
*/
|
||||
public function findAllActive(): array;
|
||||
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user