update cs

This commit is contained in:
Julien Fastré 2023-09-27 16:45:42 +02:00
parent 2e5954f6fd
commit 27c1bb03ff
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
116 changed files with 343 additions and 215 deletions

View File

@ -13,4 +13,6 @@ namespace Chill\ActivityBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle; use Symfony\Component\HttpKernel\Bundle\Bundle;
class ChillActivityBundle extends Bundle {} class ChillActivityBundle extends Bundle
{
}

View File

@ -72,7 +72,8 @@ final class ActivityController extends AbstractController
private readonly FilterOrderHelperFactoryInterface $filterOrderHelperFactory, private readonly FilterOrderHelperFactoryInterface $filterOrderHelperFactory,
private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly TranslatableStringHelperInterface $translatableStringHelper,
private readonly PaginatorFactory $paginatorFactory, private readonly PaginatorFactory $paginatorFactory,
) {} ) {
}
/** /**
* Deletes a Activity entity. * Deletes a Activity entity.

View File

@ -36,7 +36,9 @@ class AvgActivityDuration implements ExportInterface, GroupedExportInterface
$this->repository = $em->getRepository(Activity::class); $this->repository = $em->getRepository(Activity::class);
} }
public function buildForm(FormBuilderInterface $builder) {} public function buildForm(FormBuilderInterface $builder)
{
}
public function getFormDefaultData(): array public function getFormDefaultData(): array
{ {
return []; return [];

View File

@ -36,7 +36,9 @@ class CountActivity implements ExportInterface, GroupedExportInterface
$this->repository = $em->getRepository(Activity::class); $this->repository = $em->getRepository(Activity::class);
} }
public function buildForm(FormBuilderInterface $builder) {} public function buildForm(FormBuilderInterface $builder)
{
}
public function getFormDefaultData(): array public function getFormDefaultData(): array
{ {
return []; return [];

View File

@ -32,7 +32,9 @@ class CountActivity implements ExportInterface, GroupedExportInterface
$this->activityRepository = $activityRepository; $this->activityRepository = $activityRepository;
} }
public function buildForm(FormBuilderInterface $builder) {} public function buildForm(FormBuilderInterface $builder)
{
}
public function getFormDefaultData(): array public function getFormDefaultData(): array
{ {
return []; return [];

View File

@ -50,7 +50,9 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface
$this->activityRepository = $activityRepository; $this->activityRepository = $activityRepository;
} }
public function buildForm(FormBuilderInterface $builder) {} public function buildForm(FormBuilderInterface $builder)
{
}
public function getFormDefaultData(): array public function getFormDefaultData(): array
{ {
return []; return [];

View File

@ -104,7 +104,9 @@ class ListActivityHelper
->addGroupBy('location.id'); ->addGroupBy('location.id');
} }
public function buildForm(FormBuilderInterface $builder) {} public function buildForm(FormBuilderInterface $builder)
{
}
public function getAllowedFormattersTypes() public function getAllowedFormattersTypes()
{ {

View File

@ -29,7 +29,8 @@ class ActivityTypeFilter implements FilterInterface
public function __construct( public function __construct(
private readonly ActivityTypeRepositoryInterface $activityTypeRepository, private readonly ActivityTypeRepositoryInterface $activityTypeRepository,
private readonly TranslatableStringHelperInterface $translatableStringHelper private readonly TranslatableStringHelperInterface $translatableStringHelper
) {} ) {
}
public function addRole(): ?string public function addRole(): ?string
{ {

View File

@ -23,7 +23,8 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt
{ {
public function __construct( public function __construct(
private RollingDateConverterInterface $rollingDateConverter, private RollingDateConverterInterface $rollingDateConverter,
) {} ) {
}
public function getTitle() public function getTitle()
{ {

View File

@ -47,7 +47,8 @@ final readonly class ActivityACLAwareRepository implements ActivityACLAwareRepos
private EntityManagerInterface $em, private EntityManagerInterface $em,
private Security $security, private Security $security,
private RequestStack $requestStack, private RequestStack $requestStack,
) {} ) {
}
/** /**
* @throws NonUniqueResultException * @throws NonUniqueResultException

View File

@ -43,7 +43,8 @@ final readonly class ActivityDocumentACLAwareRepository implements ActivityDocum
private CenterResolverManagerInterface $centerResolverManager, private CenterResolverManagerInterface $centerResolverManager,
private AuthorizationHelperForCurrentUserInterface $authorizationHelperForCurrentUser, private AuthorizationHelperForCurrentUserInterface $authorizationHelperForCurrentUser,
private Security $security private Security $security
) {} ) {
}
public function buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, ?DateTimeImmutable $startDate = null, ?DateTimeImmutable $endDate = null, ?string $content = null): FetchQueryInterface public function buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, ?DateTimeImmutable $startDate = null, ?DateTimeImmutable $endDate = null, ?string $content = null): FetchQueryInterface
{ {

View File

@ -36,7 +36,8 @@ final class AccompanyingPeriodActivityGenericDocProvider implements GenericDocFo
private EntityManagerInterface $em, private EntityManagerInterface $em,
private Security $security, private Security $security,
private ActivityDocumentACLAwareRepositoryInterface $activityDocumentACLAwareRepository, private ActivityDocumentACLAwareRepositoryInterface $activityDocumentACLAwareRepository,
) {} ) {
}
public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, ?DateTimeImmutable $startDate = null, ?DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, ?DateTimeImmutable $startDate = null, ?DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface
{ {

View File

@ -29,7 +29,8 @@ final readonly class PersonActivityGenericDocProvider implements GenericDocForPe
public function __construct( public function __construct(
private Security $security, private Security $security,
private ActivityDocumentACLAwareRepositoryInterface $personActivityDocumentACLAwareRepository, private ActivityDocumentACLAwareRepositoryInterface $personActivityDocumentACLAwareRepository,
) {} ) {
}
public function buildFetchQueryForPerson(Person $person, ?DateTimeImmutable $startDate = null, ?DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface public function buildFetchQueryForPerson(Person $person, ?DateTimeImmutable $startDate = null, ?DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface
{ {

View File

@ -1,81 +0,0 @@
<?php
declare(strict_types=1);
/*
* 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.
*/
namespace Chill\ActivityBundle\Tests\Export\Filter;
use Chill\ActivityBundle\Entity\Activity;
<<<<<<<< HEAD:src/Bundle/ChillActivityBundle/Tests/Export/Filter/ACPFilters/ByUserFilterTest.php
use Chill\ActivityBundle\Export\Filter\ACPFilters\ByCreatorFilter;
========
use Chill\ActivityBundle\Export\Filter\ByCreatorFilter;
use Chill\ActivityBundle\Export\Filter\UserFilter;
>>>>>>>> 1f4d912d8 (Re-associate activity exports and filters):src/Bundle/ChillActivityBundle/Tests/Export/Filter/ByCreatorFilterTest.php
use Chill\MainBundle\Entity\User;
use Chill\MainBundle\Test\Export\AbstractFilterTest;
use Doctrine\ORM\EntityManagerInterface;
/**
* @internal
* @coversNothing
*/
final class ByUserFilterTest extends AbstractFilterTest
{
private ByCreatorFilter $filter;
protected function setUp(): void
{
self::bootKernel();
$this->filter = self::$container->get('chill.activity.export.byuser_filter');
}
public function getFilter()
{
return $this->filter;
}
public function getFormData(): array
{
$em = self::$container->get(EntityManagerInterface::class);
$array = $em->createQueryBuilder()
->from(User::class, 'u')
->select('u')
->getQuery()
->getResult();
$data = [];
foreach ($array as $a) {
$data[] = [
'accepted_users' => $a,
];
}
return $data;
}
public function getQueryBuilders(): array
{
if (null === self::$kernel) {
self::bootKernel();
}
$em = self::$container->get(EntityManagerInterface::class);
return [
$em->createQueryBuilder()
->select('count(activity.id)')
->from(Activity::class, 'activity')
->join('activity.users', 'actusers'),
];
}
}

View File

@ -13,4 +13,6 @@ namespace Chill\AsideActivityBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle; use Symfony\Component\HttpKernel\Bundle\Bundle;
class ChillAsideActivityBundle extends Bundle {} class ChillAsideActivityBundle extends Bundle
{
}

View File

@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface;
class ByLocationAggregator implements AggregatorInterface class ByLocationAggregator implements AggregatorInterface
{ {
public function __construct(private LocationRepository $locationRepository) {} public function __construct(private LocationRepository $locationRepository)
{
}
/** /**
* @inheritDoc * @inheritDoc

View File

@ -31,7 +31,9 @@ class AvgAsideActivityDuration implements ExportInterface, GroupedExportInterfac
$this->repository = $repository; $this->repository = $repository;
} }
public function buildForm(FormBuilderInterface $builder) {} public function buildForm(FormBuilderInterface $builder)
{
}
public function getFormDefaultData(): array public function getFormDefaultData(): array
{ {
return []; return [];

View File

@ -31,7 +31,9 @@ class CountAsideActivity implements ExportInterface, GroupedExportInterface
$this->repository = $repository; $this->repository = $repository;
} }
public function buildForm(FormBuilderInterface $builder) {} public function buildForm(FormBuilderInterface $builder)
{
}
public function getFormDefaultData(): array public function getFormDefaultData(): array
{ {
return []; return [];

View File

@ -72,7 +72,9 @@ final class ListAsideActivity implements ListInterface, GroupedExportInterface
$this->translatableStringHelper = $translatableStringHelper; $this->translatableStringHelper = $translatableStringHelper;
} }
public function buildForm(FormBuilderInterface $builder) {} public function buildForm(FormBuilderInterface $builder)
{
}
public function getFormDefaultData(): array public function getFormDefaultData(): array
{ {

View File

@ -31,7 +31,9 @@ class SumAsideActivityDuration implements ExportInterface, GroupedExportInterfac
$this->repository = $repository; $this->repository = $repository;
} }
public function buildForm(FormBuilderInterface $builder) {} public function buildForm(FormBuilderInterface $builder)
{
}
public function getFormDefaultData(): array public function getFormDefaultData(): array
{ {
return []; return [];

View File

@ -26,7 +26,8 @@ final readonly class ByLocationFilter implements FilterInterface
{ {
public function __construct( public function __construct(
private Security $security private Security $security
) {} ) {
}
/** /**
* @inheritDoc * @inheritDoc

View File

@ -28,7 +28,8 @@ final readonly class MSUserAbsenceReader implements MSUserAbsenceReaderInterface
private HttpClientInterface $machineHttpClient, private HttpClientInterface $machineHttpClient,
private MapCalendarToUser $mapCalendarToUser, private MapCalendarToUser $mapCalendarToUser,
private ClockInterface $clock, private ClockInterface $clock,
) {} ) {
}
/** /**
* @throw UserAbsenceSyncException when the data cannot be reached or is not valid from microsoft * @throw UserAbsenceSyncException when the data cannot be reached or is not valid from microsoft

View File

@ -21,7 +21,8 @@ readonly class MSUserAbsenceSync
private MSUserAbsenceReaderInterface $absenceReader, private MSUserAbsenceReaderInterface $absenceReader,
private ClockInterface $clock, private ClockInterface $clock,
private LoggerInterface $logger, private LoggerInterface $logger,
) {} ) {
}
public function syncUserAbsence(User $user): void public function syncUserAbsence(User $user): void
{ {

View File

@ -48,13 +48,23 @@ class NullRemoteCalendarConnector implements RemoteCalendarConnectorInterface
return []; return [];
} }
public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, ?CalendarRange $associatedCalendarRange = null): void {} public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, ?CalendarRange $associatedCalendarRange = null): void
{
public function removeCalendarRange(string $remoteId, array $remoteAttributes, User $user): void {} }
public function syncCalendar(Calendar $calendar, string $action, ?CalendarRange $previousCalendarRange, ?User $previousMainUser, ?array $oldInvites, ?array $newInvites): void {} public function removeCalendarRange(string $remoteId, array $remoteAttributes, User $user): void
{
public function syncCalendarRange(CalendarRange $calendarRange): void {} }
public function syncInvite(Invite $invite): void {} public function syncCalendar(Calendar $calendar, string $action, ?CalendarRange $previousCalendarRange, ?User $previousMainUser, ?array $oldInvites, ?array $newInvites): void
{
}
public function syncCalendarRange(CalendarRange $calendarRange): void
{
}
public function syncInvite(Invite $invite): void
{
}
} }

View File

@ -23,4 +23,6 @@ use Symfony\Component\Form\FormBuilderInterface;
* @extends DocGeneratorContextWithPublicFormInterface<Calendar> * @extends DocGeneratorContextWithPublicFormInterface<Calendar>
* @extends DocGeneratorContextWithAdminFormInterface<Calendar> * @extends DocGeneratorContextWithAdminFormInterface<Calendar>
*/ */
interface CalendarContextInterface extends DocGeneratorContextWithPublicFormInterface, DocGeneratorContextWithAdminFormInterface {} interface CalendarContextInterface extends DocGeneratorContextWithPublicFormInterface, DocGeneratorContextWithAdminFormInterface
{
}

View File

@ -39,7 +39,8 @@ final readonly class AccompanyingPeriodCalendarGenericDocProvider implements Gen
public function __construct( public function __construct(
private Security $security, private Security $security,
private EntityManagerInterface $em private EntityManagerInterface $em
) {} ) {
}
/** /**
* @throws MappingException * @throws MappingException

View File

@ -39,7 +39,8 @@ final readonly class PersonCalendarGenericDocProvider implements GenericDocForPe
public function __construct( public function __construct(
private Security $security, private Security $security,
private EntityManagerInterface $em private EntityManagerInterface $em
) {} ) {
}
private function addWhereClausesToQuery(FetchQuery $query, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery private function addWhereClausesToQuery(FetchQuery $query, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery
{ {

View File

@ -16,7 +16,9 @@ use Symfony\Component\Form\FormBuilderInterface;
class CustomFieldsTitleType extends AbstractType class CustomFieldsTitleType extends AbstractType
{ {
public function buildForm(FormBuilderInterface $builder, array $options) {} public function buildForm(FormBuilderInterface $builder, array $options)
{
}
public function getBlockPrefix() public function getBlockPrefix()
{ {

View File

@ -31,7 +31,8 @@ final readonly class GenericDocForAccompanyingPeriodController
private PaginatorFactory $paginator, private PaginatorFactory $paginator,
private Security $security, private Security $security,
private EngineInterface $twig, private EngineInterface $twig,
) {} ) {
}
/** /**
* @param AccompanyingPeriod $accompanyingPeriod * @param AccompanyingPeriod $accompanyingPeriod

View File

@ -30,7 +30,8 @@ final readonly class GenericDocForPerson
private PaginatorFactory $paginator, private PaginatorFactory $paginator,
private Security $security, private Security $security,
private EngineInterface $twig, private EngineInterface $twig,
) {} ) {
}
/** /**
* @throws \Doctrine\DBAL\Exception * @throws \Doctrine\DBAL\Exception

View File

@ -54,7 +54,8 @@ class FetchQuery implements FetchQueryInterface
private array $selectIdentifierTypes = [], private array $selectIdentifierTypes = [],
private array $selectDateParams = [], private array $selectDateParams = [],
private array $selectDateTypes = [], private array $selectDateTypes = [],
) {} ) {
}
public function addJoinClause(string $sql, array $params = [], array $types = []): int public function addJoinClause(string $sql, array $params = [], array $types = []): int
{ {

View File

@ -21,7 +21,8 @@ final readonly class GenericDocDTO
public array $identifiers, public array $identifiers,
public \DateTimeImmutable $docDate, public \DateTimeImmutable $docDate,
public AccompanyingPeriod|Person $linked, public AccompanyingPeriod|Person $linked,
) {} ) {
}
public function getContext(): string public function getContext(): string
{ {

View File

@ -32,7 +32,8 @@ final readonly class AccompanyingCourseDocumentGenericDocProvider implements Gen
public function __construct( public function __construct(
private Security $security, private Security $security,
private EntityManagerInterface $entityManager, private EntityManagerInterface $entityManager,
) {} ) {
}
public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface
{ {

View File

@ -28,7 +28,8 @@ final readonly class PersonDocumentGenericDocProvider implements GenericDocForPe
public function __construct( public function __construct(
private Security $security, private Security $security,
private PersonDocumentACLAwareRepositoryInterface $personDocumentACLAwareRepository, private PersonDocumentACLAwareRepositoryInterface $personDocumentACLAwareRepository,
) {} ) {
}
public function buildFetchQueryForPerson( public function buildFetchQueryForPerson(
Person $person, Person $person,

View File

@ -24,7 +24,8 @@ final readonly class AccompanyingCourseDocumentGenericDocRenderer implements Gen
public function __construct( public function __construct(
private AccompanyingCourseDocumentRepository $accompanyingCourseDocumentRepository, private AccompanyingCourseDocumentRepository $accompanyingCourseDocumentRepository,
private PersonDocumentRepository $personDocumentRepository, private PersonDocumentRepository $personDocumentRepository,
) {} ) {
}
public function supports(GenericDocDTO $genericDocDTO, $options = []): bool public function supports(GenericDocDTO $genericDocDTO, $options = []): bool
{ {

View File

@ -25,7 +25,8 @@ final readonly class GenericDocExtensionRuntime implements RuntimeExtensionInter
* @var list<GenericDocRendererInterface> * @var list<GenericDocRendererInterface>
*/ */
private iterable $renderers, private iterable $renderers,
) {} ) {
}
/** /**
* @throws RuntimeError * @throws RuntimeError

View File

@ -38,7 +38,8 @@ final readonly class PersonDocumentACLAwareRepository implements PersonDocumentA
private CenterResolverManagerInterface $centerResolverManager, private CenterResolverManagerInterface $centerResolverManager,
private AuthorizationHelperForCurrentUserInterface $authorizationHelperForCurrentUser, private AuthorizationHelperForCurrentUserInterface $authorizationHelperForCurrentUser,
private Security $security, private Security $security,
) {} ) {
}
public function buildQueryByPerson(Person $person): QueryBuilder public function buildQueryByPerson(Person $person): QueryBuilder
{ {

View File

@ -13,4 +13,6 @@ namespace Chill\EventBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle; use Symfony\Component\HttpKernel\Bundle\Bundle;
class ChillEventBundle extends Bundle {} class ChillEventBundle extends Bundle
{
}

View File

@ -16,4 +16,6 @@ use Doctrine\ORM\EntityRepository;
/** /**
* Class EventRepository. * Class EventRepository.
*/ */
class EventRepository extends EntityRepository {} class EventRepository extends EntityRepository
{
}

View File

@ -13,4 +13,6 @@ namespace Chill\FamilyMembersBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle; use Symfony\Component\HttpKernel\Bundle\Bundle;
class ChillAMLIFamilyMembersBundle extends Bundle {} class ChillAMLIFamilyMembersBundle extends Bundle
{
}

View File

@ -150,7 +150,9 @@ abstract class AbstractCRUDController extends AbstractController
return new $class(); return new $class();
} }
protected function customizeQuery(string $action, Request $request, $query): void {} protected function customizeQuery(string $action, Request $request, $query): void
{
}
protected function getActionConfig(string $action) protected function getActionConfig(string $action)
{ {

View File

@ -242,9 +242,13 @@ class CRUDController extends AbstractController
/** /**
* Customize the form created by createFormFor. * Customize the form created by createFormFor.
*/ */
protected function customizeForm(string $action, FormInterface $form) {} protected function customizeForm(string $action, FormInterface $form)
{
}
protected function customizeQuery(string $action, Request $request, $query): void {} protected function customizeQuery(string $action, Request $request, $query): void
{
}
/** /**
* @param $id * @param $id
@ -923,7 +927,9 @@ class CRUDController extends AbstractController
} }
} }
protected function onFormValid(string $action, object $entity, FormInterface $form, Request $request) {} protected function onFormValid(string $action, object $entity, FormInterface $form, Request $request)
{
}
/** /**
* @param $action * @param $action
@ -946,55 +952,77 @@ class CRUDController extends AbstractController
/** /**
* @param $entity * @param $entity
*/ */
protected function onPostFlush(string $action, $entity, FormInterface $form, Request $request) {} protected function onPostFlush(string $action, $entity, FormInterface $form, Request $request)
{
}
/** /**
* method used by indexAction. * method used by indexAction.
* *
* @param mixed $query * @param mixed $query
*/ */
protected function onPostIndexBuildQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, $query) {} protected function onPostIndexBuildQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, $query)
{
}
/** /**
* method used by indexAction. * method used by indexAction.
* *
* @param mixed $entities * @param mixed $entities
*/ */
protected function onPostIndexFetchQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, $entities) {} protected function onPostIndexFetchQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, $entities)
{
}
/** /**
* @param $entity * @param $entity
*/ */
protected function onPostPersist(string $action, $entity, FormInterface $form, Request $request) {} protected function onPostPersist(string $action, $entity, FormInterface $form, Request $request)
{
}
/** /**
* @param $entity * @param $entity
*/ */
protected function onPostRemove(string $action, $entity, FormInterface $form, Request $request) {} protected function onPostRemove(string $action, $entity, FormInterface $form, Request $request)
{
}
protected function onPreDelete(string $action, Request $request) {} protected function onPreDelete(string $action, Request $request)
{
}
/** /**
* @param $entity * @param $entity
*/ */
protected function onPreFlush(string $action, $entity, FormInterface $form, Request $request) {} protected function onPreFlush(string $action, $entity, FormInterface $form, Request $request)
{
}
protected function onPreIndex(string $action, Request $request) {} protected function onPreIndex(string $action, Request $request)
{
}
/** /**
* method used by indexAction. * method used by indexAction.
*/ */
protected function onPreIndexBuildQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator) {} protected function onPreIndexBuildQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator)
{
}
/** /**
* @param $entity * @param $entity
*/ */
protected function onPrePersist(string $action, $entity, FormInterface $form, Request $request) {} protected function onPrePersist(string $action, $entity, FormInterface $form, Request $request)
{
}
/** /**
* @param $entity * @param $entity
*/ */
protected function onPreRemove(string $action, $entity, FormInterface $form, Request $request) {} protected function onPreRemove(string $action, $entity, FormInterface $form, Request $request)
{
}
/** /**
* Add ordering fields in the query build by self::queryEntities. * Add ordering fields in the query build by self::queryEntities.

View File

@ -16,4 +16,6 @@ use Symfony\Component\Form\AbstractType;
/** /**
* Class CRUDDeleteEntityForm. * Class CRUDDeleteEntityForm.
*/ */
class CRUDDeleteEntityForm extends AbstractType {} class CRUDDeleteEntityForm extends AbstractType
{
}

View File

@ -213,8 +213,14 @@ class LoadPostalCodesCommand extends Command
} }
} }
class ExistingPostalCodeException extends Exception {} class ExistingPostalCodeException extends Exception
{
}
class CountryCodeNotFoundException extends Exception {} class CountryCodeNotFoundException extends Exception
{
}
class PostalCodeNotValidException extends Exception {} class PostalCodeNotValidException extends Exception
{
}

View File

@ -13,4 +13,6 @@ namespace Chill\MainBundle\Controller;
use Chill\MainBundle\CRUD\Controller\CRUDController; use Chill\MainBundle\CRUD\Controller\CRUDController;
class LocationTypeController extends CRUDController {} class LocationTypeController extends CRUDController
{
}

View File

@ -44,5 +44,7 @@ class LoginController extends AbstractController
]); ]);
} }
public function LoginCheckAction(Request $request) {} public function LoginCheckAction(Request $request)
{
}
} }

View File

@ -50,7 +50,8 @@ final class PermissionsGroupController extends AbstractController
private readonly EntityManagerInterface $em, private readonly EntityManagerInterface $em,
private readonly PermissionsGroupRepository $permissionsGroupRepository, private readonly PermissionsGroupRepository $permissionsGroupRepository,
private readonly RoleScopeRepository $roleScopeRepository, private readonly RoleScopeRepository $roleScopeRepository,
) {} ) {
}
/** /**
*/ */

View File

@ -27,7 +27,8 @@ final readonly class UserExportController
private UserRepositoryInterface $userRepository, private UserRepositoryInterface $userRepository,
private Security $security, private Security $security,
private TranslatorInterface $translator, private TranslatorInterface $translator,
) {} ) {
}
/** /**
* @throws \League\Csv\CannotInsertRecord * @throws \League\Csv\CannotInsertRecord

View File

@ -175,7 +175,9 @@ class User implements UserInterface
return $this; return $this;
} }
public function eraseCredentials() {} public function eraseCredentials()
{
}
public function getAbsenceStart(): ?DateTimeImmutable public function getAbsenceStart(): ?DateTimeImmutable
{ {

View File

@ -26,7 +26,8 @@ final readonly class ExportFormHelper
private AuthorizationHelperForCurrentUserInterface $authorizationHelper, private AuthorizationHelperForCurrentUserInterface $authorizationHelper,
private ExportManager $exportManager, private ExportManager $exportManager,
private FormFactoryInterface $formFactory, private FormFactoryInterface $formFactory,
) {} ) {
}
public function getDefaultData(string $step, ExportInterface|DirectExportInterface $export, array $options = []): array public function getDefaultData(string $step, ExportInterface|DirectExportInterface $export, array $options = []): array
{ {

View File

@ -20,4 +20,6 @@ namespace Chill\MainBundle\Export;
* *
* When used, the `ExportManager` will not handle aggregator for this class. * When used, the `ExportManager` will not handle aggregator for this class.
*/ */
interface ListInterface extends ExportInterface {} interface ListInterface extends ExportInterface
{
}

View File

@ -19,7 +19,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class AggregatorType extends AbstractType class AggregatorType extends AbstractType
{ {
public function __construct() {} public function __construct()
{
}
public function buildForm(FormBuilderInterface $builder, array $options) public function buildForm(FormBuilderInterface $builder, array $options)
{ {

View File

@ -21,7 +21,9 @@ class FilterType extends AbstractType
{ {
public const ENABLED_FIELD = 'enabled'; public const ENABLED_FIELD = 'enabled';
public function __construct() {} public function __construct()
{
}
public function buildForm(FormBuilderInterface $builder, array $options) public function buildForm(FormBuilderInterface $builder, array $options)
{ {

View File

@ -13,4 +13,6 @@ namespace Chill\MainBundle\Notification\Exception;
use RuntimeException; use RuntimeException;
class NotificationHandlerNotFound extends RuntimeException {} class NotificationHandlerNotFound extends RuntimeException
{
}

View File

@ -16,4 +16,6 @@ use Redis;
/** /**
* Redis client configured by chill main. * Redis client configured by chill main.
*/ */
class ChillRedis extends Redis {} class ChillRedis extends Redis
{
}

View File

@ -13,4 +13,6 @@ namespace Chill\MainBundle\Search;
use Exception; use Exception;
class ParsingException extends Exception {} class ParsingException extends Exception
{
}

View File

@ -24,4 +24,6 @@ use const E_USER_DEPRECATED;
* *
* This abstract Voter provide generic methods to handle object specific to Chill * This abstract Voter provide generic methods to handle object specific to Chill
*/ */
abstract class AbstractChillVoter extends Voter implements ChillVoterInterface {} abstract class AbstractChillVoter extends Voter implements ChillVoterInterface
{
}

View File

@ -14,4 +14,6 @@ namespace Chill\MainBundle\Security\Authorization;
/** /**
* Provides methods for compiling voter and build admin role fields. * Provides methods for compiling voter and build admin role fields.
*/ */
interface ChillVoterInterface {} interface ChillVoterInterface
{
}

View File

@ -101,7 +101,8 @@ final readonly class CollateAddressWithReferenceOrPostalCode implements CollateA
public function __construct( public function __construct(
private Connection $connection, private Connection $connection,
private LoggerInterface $logger, private LoggerInterface $logger,
) {} ) {
}
/** /**
* @throws \Throwable * @throws \Throwable

View File

@ -22,7 +22,8 @@ final readonly class CollateAddressWithReferenceOrPostalCodeCronJob implements C
public function __construct( public function __construct(
private ClockInterface $clock, private ClockInterface $clock,
private CollateAddressWithReferenceOrPostalCodeInterface $collateAddressWithReferenceOrPostalCode, private CollateAddressWithReferenceOrPostalCodeInterface $collateAddressWithReferenceOrPostalCode,
) {} ) {
}
public function canRun(?CronJobExecution $cronJobExecution): bool public function canRun(?CronJobExecution $cronJobExecution): bool
{ {

View File

@ -21,7 +21,8 @@ class ViewEntityInfoManager
*/ */
private iterable $vienEntityInfoProviders, private iterable $vienEntityInfoProviders,
private Connection $connection, private Connection $connection,
) {} ) {
}
public function synchronizeOnDB(): void public function synchronizeOnDB(): void
{ {

View File

@ -20,5 +20,7 @@ namespace Chill\MainBundle\Service\ShortMessage;
class NullShortMessageSender implements ShortMessageSenderInterface class NullShortMessageSender implements ShortMessageSenderInterface
{ {
public function send(ShortMessage $shortMessage): void {} public function send(ShortMessage $shortMessage): void
{
}
} }

View File

@ -22,7 +22,8 @@ final readonly class FilterOrderGetActiveFilterHelper
private TranslatorInterface $translator, private TranslatorInterface $translator,
private PropertyAccessorInterface $propertyAccessor, private PropertyAccessorInterface $propertyAccessor,
private UserRender $userRender, private UserRender $userRender,
) {} ) {
}
/** /**
* Return all the data required to display the active filters * Return all the data required to display the active filters

View File

@ -54,7 +54,8 @@ final class FilterOrderHelper
public function __construct( public function __construct(
private readonly FormFactoryInterface $formFactory, private readonly FormFactoryInterface $formFactory,
private readonly RequestStack $requestStack, private readonly RequestStack $requestStack,
) {} ) {
}
public function addSingleCheckbox(string $name, string $label): self public function addSingleCheckbox(string $name, string $label): self
{ {

View File

@ -25,7 +25,8 @@ class Templating extends AbstractExtension
public function __construct( public function __construct(
private readonly RequestStack $requestStack, private readonly RequestStack $requestStack,
private readonly FilterOrderGetActiveFilterHelper $filterOrderGetActiveFilterHelper, private readonly FilterOrderGetActiveFilterHelper $filterOrderGetActiveFilterHelper,
) {} ) {
}
public function getFilters(): array public function getFilters(): array
{ {

View File

@ -36,7 +36,9 @@ final class TokenManagerTest extends KernelTestCase
$this->tokenManager = new TokenManager('secret', $logger); $this->tokenManager = new TokenManager('secret', $logger);
} }
public static function setUpBefore() {} public static function setUpBefore()
{
}
public function testGenerate() public function testGenerate()
{ {

View File

@ -13,4 +13,6 @@ namespace Chill\MainBundle\Workflow\Exception;
use RuntimeException; use RuntimeException;
class HandlerNotFoundException extends RuntimeException {} class HandlerNotFoundException extends RuntimeException
{
}

View File

@ -16,7 +16,9 @@ use Doctrine\Migrations\AbstractMigration;
class Version20100000000000 extends AbstractMigration class Version20100000000000 extends AbstractMigration
{ {
public function down(Schema $schema): void {} public function down(Schema $schema): void
{
}
public function up(Schema $schema): void public function up(Schema $schema): void
{ {

View File

@ -16,7 +16,9 @@ use Doctrine\Migrations\AbstractMigration;
final class Version20220513151853 extends AbstractMigration final class Version20220513151853 extends AbstractMigration
{ {
public function down(Schema $schema): void {} public function down(Schema $schema): void
{
}
public function getDescription(): string public function getDescription(): string
{ {

View File

@ -20,7 +20,8 @@ readonly class AccompanyingPeriodStepChangeCronjob implements CronJobInterface
public function __construct( public function __construct(
private ClockInterface $clock, private ClockInterface $clock,
private AccompanyingPeriodStepChangeRequestor $requestor, private AccompanyingPeriodStepChangeRequestor $requestor,
) {} ) {
}
public function canRun(?CronJobExecution $cronJobExecution): bool public function canRun(?CronJobExecution $cronJobExecution): bool
{ {

View File

@ -23,7 +23,8 @@ class AccompanyingPeriodStepChangeMessageHandler implements MessageHandlerInterf
public function __construct( public function __construct(
private AccompanyingPeriodRepository $accompanyingPeriodRepository, private AccompanyingPeriodRepository $accompanyingPeriodRepository,
private AccompanyingPeriodStepChanger $changer, private AccompanyingPeriodStepChanger $changer,
) {} ) {
}
public function __invoke(AccompanyingPeriodStepChangeRequestMessage $message): void public function __invoke(AccompanyingPeriodStepChangeRequestMessage $message): void
{ {

View File

@ -30,7 +30,8 @@ class AccompanyingPeriodStepChanger
private EntityManagerInterface $entityManager, private EntityManagerInterface $entityManager,
private LoggerInterface $logger, private LoggerInterface $logger,
private Registry $workflowRegistry, private Registry $workflowRegistry,
) {} ) {
}
public function __invoke(AccompanyingPeriod $period, string $transition, ?string $workflowName = null): void public function __invoke(AccompanyingPeriod $period, string $transition, ?string $workflowName = null): void
{ {

View File

@ -19,7 +19,8 @@ class PersonMoveCenterHistoryHandler implements PersonMoveSqlHandlerInterface
{ {
public function __construct( public function __construct(
private PersonCenterHistoryRepository $centerHistoryRepository, private PersonCenterHistoryRepository $centerHistoryRepository,
) {} ) {
}
public function supports(string $className, string $field): bool public function supports(string $className, string $field): bool
{ {

View File

@ -39,7 +39,8 @@ class PersonMove
private EntityManagerInterface $em, private EntityManagerInterface $em,
private PersonMoveManager $personMoveManager, private PersonMoveManager $personMoveManager,
private EventDispatcherInterface $eventDispatcher private EventDispatcherInterface $eventDispatcher
) {} ) {
}
/** /**
* Return the sql used to move or delete entities associated to a person to * Return the sql used to move or delete entities associated to a person to

View File

@ -20,7 +20,8 @@ class PersonMoveManager
* @var iterable<PersonMoveSqlHandlerInterface> * @var iterable<PersonMoveSqlHandlerInterface>
*/ */
private iterable $handlers, private iterable $handlers,
) {} ) {
}
/** /**
* @param class-string $className * @param class-string $className

View File

@ -43,7 +43,8 @@ final class AccompanyingCourseWorkController extends AbstractController
private readonly LoggerInterface $chillLogger, private readonly LoggerInterface $chillLogger,
private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly TranslatableStringHelperInterface $translatableStringHelper,
private readonly FilterOrderHelperFactoryInterface $filterOrderHelperFactory private readonly FilterOrderHelperFactoryInterface $filterOrderHelperFactory
) {} ) {
}
/** /**
* @Route( * @Route(

View File

@ -20,7 +20,9 @@ use Symfony\Component\Security\Core\Security;
class AccompanyingCourseWorkEvaluationDocumentController extends AbstractController class AccompanyingCourseWorkEvaluationDocumentController extends AbstractController
{ {
public function __construct(private Security $security) {} public function __construct(private Security $security)
{
}
/** /**
* @Route( * @Route(

View File

@ -28,7 +28,8 @@ final class SocialWorkSocialActionApiController extends ApiController
private readonly SocialIssueRepository $socialIssueRepository, private readonly SocialIssueRepository $socialIssueRepository,
private readonly PaginatorFactory $paginator, private readonly PaginatorFactory $paginator,
private readonly ClockInterface $clock, private readonly ClockInterface $clock,
) {} ) {
}
public function listBySocialIssueApi($id, Request $request) public function listBySocialIssueApi($id, Request $request)
{ {

View File

@ -74,5 +74,6 @@ class AccompanyingPeriodInfo
* @ORM\Column(type="text") * @ORM\Column(type="text")
*/ */
public readonly string $discriminator, public readonly string $discriminator,
) {} ) {
}
} }

View File

@ -27,7 +27,8 @@ final readonly class JobWorkingOnCourseAggregator implements AggregatorInterface
public function __construct( public function __construct(
private UserJobRepositoryInterface $userJobRepository, private UserJobRepositoryInterface $userJobRepository,
private TranslatableStringHelperInterface $translatableStringHelper, private TranslatableStringHelperInterface $translatableStringHelper,
) {} ) {
}
public function buildForm(FormBuilderInterface $builder) public function buildForm(FormBuilderInterface $builder)
{ {

View File

@ -28,7 +28,8 @@ final readonly class ScopeWorkingOnCourseAggregator implements AggregatorInterfa
public function __construct( public function __construct(
private ScopeRepositoryInterface $scopeRepository, private ScopeRepositoryInterface $scopeRepository,
private TranslatableStringHelperInterface $translatableStringHelper, private TranslatableStringHelperInterface $translatableStringHelper,
) {} ) {
}
public function buildForm(FormBuilderInterface $builder) public function buildForm(FormBuilderInterface $builder)
{ {

View File

@ -27,7 +27,8 @@ final readonly class UserWorkingOnCourseAggregator implements AggregatorInterfac
public function __construct( public function __construct(
private UserRender $userRender, private UserRender $userRender,
private UserRepositoryInterface $userRepository, private UserRepositoryInterface $userRepository,
) {} ) {
}
public function buildForm(FormBuilderInterface $builder) public function buildForm(FormBuilderInterface $builder)
{ {

View File

@ -24,7 +24,8 @@ final readonly class AgeAggregator implements AggregatorInterface, ExportElement
{ {
public function __construct( public function __construct(
private RollingDateConverterInterface $rollingDateConverter, private RollingDateConverterInterface $rollingDateConverter,
) {} ) {
}
public function addRole(): ?string public function addRole(): ?string
{ {

View File

@ -28,7 +28,8 @@ final readonly class CenterAggregator implements AggregatorInterface
public function __construct( public function __construct(
private CenterRepositoryInterface $centerRepository, private CenterRepositoryInterface $centerRepository,
private RollingDateConverterInterface $rollingDateConverter, private RollingDateConverterInterface $rollingDateConverter,
) {} ) {
}
public function buildForm(FormBuilderInterface $builder) public function buildForm(FormBuilderInterface $builder)
{ {

View File

@ -45,7 +45,9 @@ final class GenderAggregator implements AggregatorInterface
return Declarations::PERSON_TYPE; return Declarations::PERSON_TYPE;
} }
public function buildForm(FormBuilderInterface $builder) {} public function buildForm(FormBuilderInterface $builder)
{
}
public function getFormDefaultData(): array public function getFormDefaultData(): array
{ {
return []; return [];

View File

@ -52,7 +52,8 @@ final readonly class ListAccompanyingPeriod implements ListInterface, GroupedExp
private EntityManagerInterface $entityManager, private EntityManagerInterface $entityManager,
private RollingDateConverterInterface $rollingDateConverter, private RollingDateConverterInterface $rollingDateConverter,
private ListAccompanyingPeriodHelper $listAccompanyingPeriodHelper, private ListAccompanyingPeriodHelper $listAccompanyingPeriodHelper,
) {} ) {
}
public function buildForm(FormBuilderInterface $builder) public function buildForm(FormBuilderInterface $builder)
{ {

View File

@ -146,7 +146,9 @@ class ListPersonDuplicate implements DirectExportInterface, ExportElementValidat
return PersonVoter::DUPLICATE; return PersonVoter::DUPLICATE;
} }
public function validateForm($data, ExecutionContextInterface $context) {} public function validateForm($data, ExecutionContextInterface $context)
{
}
protected function getHeaders(): array protected function getHeaders(): array
{ {

View File

@ -50,7 +50,8 @@ final readonly class ListPersonWithAccompanyingPeriodDetails implements ListInte
private ListAccompanyingPeriodHelper $listAccompanyingPeriodHelper, private ListAccompanyingPeriodHelper $listAccompanyingPeriodHelper,
private EntityManagerInterface $entityManager, private EntityManagerInterface $entityManager,
private RollingDateConverterInterface $rollingDateConverter, private RollingDateConverterInterface $rollingDateConverter,
) {} ) {
}
public function buildForm(FormBuilderInterface $builder) public function buildForm(FormBuilderInterface $builder)
{ {

View File

@ -30,7 +30,8 @@ final readonly class HavingAnAccompanyingPeriodInfoWithinDatesFilter implements
{ {
public function __construct( public function __construct(
private RollingDateConverterInterface $rollingDateConverter, private RollingDateConverterInterface $rollingDateConverter,
) {} ) {
}
public function buildForm(FormBuilderInterface $builder): void public function buildForm(FormBuilderInterface $builder): void
{ {

View File

@ -38,7 +38,8 @@ readonly class JobWorkingOnCourseFilter implements FilterInterface
private UserJobRepositoryInterface $userJobRepository, private UserJobRepositoryInterface $userJobRepository,
private RollingDateConverterInterface $rollingDateConverter, private RollingDateConverterInterface $rollingDateConverter,
private TranslatableStringHelperInterface $translatableStringHelper, private TranslatableStringHelperInterface $translatableStringHelper,
) {} ) {
}
public function buildForm(FormBuilderInterface $builder): void public function buildForm(FormBuilderInterface $builder): void
{ {

View File

@ -40,7 +40,8 @@ readonly class ScopeWorkingOnCourseFilter implements FilterInterface
private ScopeRepositoryInterface $scopeRepository, private ScopeRepositoryInterface $scopeRepository,
private RollingDateConverterInterface $rollingDateConverter, private RollingDateConverterInterface $rollingDateConverter,
private TranslatableStringHelperInterface $translatableStringHelper, private TranslatableStringHelperInterface $translatableStringHelper,
) {} ) {
}
public function buildForm(FormBuilderInterface $builder): void public function buildForm(FormBuilderInterface $builder): void
{ {

View File

@ -33,7 +33,8 @@ readonly class UserWorkingOnCourseFilter implements FilterInterface
public function __construct( public function __construct(
private UserRender $userRender, private UserRender $userRender,
private RollingDateConverterInterface $rollingDateConverter, private RollingDateConverterInterface $rollingDateConverter,
) {} ) {
}
public function buildForm(FormBuilderInterface $builder): void public function buildForm(FormBuilderInterface $builder): void
{ {

View File

@ -24,7 +24,8 @@ final readonly class AccompanyingPeriodWorkEndDateBetweenDateFilter implements F
{ {
public function __construct( public function __construct(
private RollingDateConverterInterface $rollingDateConverter, private RollingDateConverterInterface $rollingDateConverter,
) {} ) {
}
public function buildForm(FormBuilderInterface $builder): void public function buildForm(FormBuilderInterface $builder): void
{ {

View File

@ -24,7 +24,8 @@ final readonly class AccompanyingPeriodWorkStartDateBetweenDateFilter implements
{ {
public function __construct( public function __construct(
private RollingDateConverterInterface $rollingDateConverter, private RollingDateConverterInterface $rollingDateConverter,
) {} ) {
}
public function buildForm(FormBuilderInterface $builder): void public function buildForm(FormBuilderInterface $builder): void
{ {

View File

@ -75,7 +75,8 @@ final readonly class ListAccompanyingPeriodHelper
private SocialIssueRender $socialIssueRender, private SocialIssueRender $socialIssueRender,
private TranslatableStringHelperInterface $translatableStringHelper, private TranslatableStringHelperInterface $translatableStringHelper,
private TranslatorInterface $translator, private TranslatorInterface $translator,
) {} ) {
}
public function getQueryKeys($data) public function getQueryKeys($data)
{ {

View File

@ -13,4 +13,6 @@ namespace Chill\PersonBundle\Repository\Person;
use Doctrine\Persistence\ObjectRepository; use Doctrine\Persistence\ObjectRepository;
interface PersonCenterHistoryInterface extends ObjectRepository {} interface PersonCenterHistoryInterface extends ObjectRepository
{
}

View File

@ -19,4 +19,6 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
*/ */
interface PersonJsonNormalizerInterface extends interface PersonJsonNormalizerInterface extends
DenormalizerInterface, DenormalizerInterface,
NormalizerInterface {} NormalizerInterface
{
}

View File

@ -21,7 +21,8 @@ class AccompanyingPeriodViewEntityInfoProvider implements ViewEntityInfoProvider
*/ */
private iterable $unions, private iterable $unions,
private AccompanyingPeriodInfoQueryBuilder $builder, private AccompanyingPeriodInfoQueryBuilder $builder,
) {} ) {
}
public function getViewQuery(): string public function getViewQuery(): string
{ {

View File

@ -31,7 +31,8 @@ final readonly class AccompanyingPeriodWorkEvaluationGenericDocProvider implemen
public function __construct( public function __construct(
private Security $security, private Security $security,
private EntityManagerInterface $entityManager, private EntityManagerInterface $entityManager,
) {} ) {
}
public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface
{ {

View File

@ -21,7 +21,8 @@ final readonly class AccompanyingPeriodWorkEvaluationGenericDocRenderer implemen
{ {
public function __construct( public function __construct(
private AccompanyingPeriodWorkEvaluationDocumentRepository $accompanyingPeriodWorkEvaluationDocumentRepository, private AccompanyingPeriodWorkEvaluationDocumentRepository $accompanyingPeriodWorkEvaluationDocumentRepository,
) {} ) {
}
public function supports(GenericDocDTO $genericDocDTO, $options = []): bool public function supports(GenericDocDTO $genericDocDTO, $options = []): bool
{ {

Some files were not shown because too many files have changed in this diff Show More