This commit is contained in:
2022-10-05 15:23:28 +02:00
parent 58b1778544
commit a967e1ed17
194 changed files with 1580 additions and 1386 deletions

View File

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

View File

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