mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 15:43:51 +00:00
new cs rule: single_line_empty_body
Rule is added to the last version of php-cs-fixer
This commit is contained in:
@@ -145,9 +145,7 @@ abstract class AbstractCRUDController extends AbstractController
|
||||
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)
|
||||
{
|
||||
|
@@ -234,13 +234,9 @@ class CRUDController extends AbstractController
|
||||
/**
|
||||
* 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
|
||||
@@ -884,9 +880,7 @@ 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
|
||||
@@ -909,73 +903,51 @@ class CRUDController extends AbstractController
|
||||
/**
|
||||
* @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.
|
||||
*/
|
||||
protected function onPostIndexBuildQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, mixed $query)
|
||||
{
|
||||
}
|
||||
protected function onPostIndexBuildQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, mixed $query) {}
|
||||
|
||||
/**
|
||||
* method used by indexAction.
|
||||
*/
|
||||
protected function onPostIndexFetchQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, mixed $entities)
|
||||
{
|
||||
}
|
||||
protected function onPostIndexFetchQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, mixed $entities) {}
|
||||
|
||||
/**
|
||||
* @param $entity
|
||||
*/
|
||||
protected function onPostPersist(string $action, $entity, FormInterface $form, Request $request)
|
||||
{
|
||||
}
|
||||
protected function onPostPersist(string $action, $entity, FormInterface $form, Request $request) {}
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
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.
|
||||
*/
|
||||
protected function onPreIndexBuildQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator)
|
||||
{
|
||||
}
|
||||
protected function onPreIndexBuildQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator) {}
|
||||
|
||||
/**
|
||||
* @param $entity
|
||||
*/
|
||||
protected function onPrePersist(string $action, $entity, FormInterface $form, Request $request)
|
||||
{
|
||||
}
|
||||
protected function onPrePersist(string $action, $entity, FormInterface $form, Request $request) {}
|
||||
|
||||
/**
|
||||
* @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.
|
||||
|
@@ -16,6 +16,4 @@ use Symfony\Component\Form\AbstractType;
|
||||
/**
|
||||
* Class CRUDDeleteEntityForm.
|
||||
*/
|
||||
class CRUDDeleteEntityForm extends AbstractType
|
||||
{
|
||||
}
|
||||
class CRUDDeleteEntityForm extends AbstractType {}
|
||||
|
@@ -208,14 +208,8 @@ 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 {}
|
||||
|
@@ -28,9 +28,7 @@ use function trim;
|
||||
|
||||
final class AddressReferenceAPIController extends ApiController
|
||||
{
|
||||
public function __construct(private readonly AddressReferenceRepository $addressReferenceRepository, private readonly PaginatorFactory $paginatorFactory)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly AddressReferenceRepository $addressReferenceRepository, private readonly PaginatorFactory $paginatorFactory) {}
|
||||
|
||||
/**
|
||||
* @Route("/api/1.0/main/address-reference/by-postal-code/{id}/search.json")
|
||||
|
@@ -23,9 +23,7 @@ use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
class AddressToReferenceMatcherController
|
||||
{
|
||||
public function __construct(private readonly Security $security, private readonly EntityManagerInterface $entityManager, private readonly SerializerInterface $serializer)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly Security $security, private readonly EntityManagerInterface $entityManager, private readonly SerializerInterface $serializer) {}
|
||||
|
||||
/**
|
||||
* @Route("/api/1.0/main/address/reference-match/{id}/set/reviewed", methods={"POST"})
|
||||
|
@@ -63,8 +63,7 @@ class ExportController extends AbstractController
|
||||
private readonly ExportFormHelper $exportFormHelper,
|
||||
private readonly SavedExportRepositoryInterface $savedExportRepository,
|
||||
private readonly Security $security
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/exports/download/{alias}", name="chill_main_export_download", methods={"GET"})
|
||||
|
@@ -24,9 +24,7 @@ use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
class GeographicalUnitByAddressApiController
|
||||
{
|
||||
public function __construct(private readonly PaginatorFactory $paginatorFactory, private readonly GeographicalUnitRepositoryInterface $geographicalUnitRepository, private readonly Security $security, private readonly SerializerInterface $serializer)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly PaginatorFactory $paginatorFactory, private readonly GeographicalUnitRepositoryInterface $geographicalUnitRepository, private readonly Security $security, private readonly SerializerInterface $serializer) {}
|
||||
|
||||
/**
|
||||
* @Route("/api/1.0/main/geographical-unit/by-address/{id}.{_format}", requirements={"_format": "json"})
|
||||
|
@@ -13,6 +13,4 @@ namespace Chill\MainBundle\Controller;
|
||||
|
||||
use Chill\MainBundle\CRUD\Controller\CRUDController;
|
||||
|
||||
class LocationTypeController extends CRUDController
|
||||
{
|
||||
}
|
||||
class LocationTypeController extends CRUDController {}
|
||||
|
@@ -45,7 +45,5 @@ class LoginController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
public function LoginCheckAction(Request $request)
|
||||
{
|
||||
}
|
||||
public function LoginCheckAction(Request $request) {}
|
||||
}
|
||||
|
@@ -33,9 +33,7 @@ use UnexpectedValueException;
|
||||
*/
|
||||
class NotificationApiController
|
||||
{
|
||||
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly NotificationRepository $notificationRepository, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly SerializerInterface $serializer)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly NotificationRepository $notificationRepository, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly SerializerInterface $serializer) {}
|
||||
|
||||
/**
|
||||
* @Route("/{id}/mark/read", name="chill_api_main_notification_mark_read", methods={"POST"})
|
||||
|
@@ -41,9 +41,7 @@ use function in_array;
|
||||
*/
|
||||
class NotificationController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly EntityManagerInterface $em, private readonly LoggerInterface $chillLogger, private readonly LoggerInterface $logger, private readonly Security $security, private readonly NotificationRepository $notificationRepository, private readonly NotificationHandlerManager $notificationHandlerManager, private readonly PaginatorFactory $paginatorFactory, private readonly TranslatorInterface $translator, private readonly UserRepository $userRepository)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly EntityManagerInterface $em, private readonly LoggerInterface $chillLogger, private readonly LoggerInterface $logger, private readonly Security $security, private readonly NotificationRepository $notificationRepository, private readonly NotificationHandlerManager $notificationHandlerManager, private readonly PaginatorFactory $paginatorFactory, private readonly TranslatorInterface $translator, private readonly UserRepository $userRepository) {}
|
||||
|
||||
/**
|
||||
* @Route("/create", name="chill_main_notification_create")
|
||||
|
@@ -24,9 +24,7 @@ use function json_decode;
|
||||
|
||||
class PermissionApiController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly Security $security)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly Security $security) {}
|
||||
|
||||
/**
|
||||
* @Route("/api/1.0/main/permissions/info.json", methods={"POST"})
|
||||
|
@@ -50,8 +50,7 @@ final class PermissionsGroupController extends AbstractController
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly PermissionsGroupRepository $permissionsGroupRepository,
|
||||
private readonly RoleScopeRepository $roleScopeRepository,
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/permissionsgroup/{id}/add_link_role_scope", name="admin_permissionsgroup_add_role_scope", methods={"PUT"})
|
||||
|
@@ -26,9 +26,7 @@ use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
|
||||
final class PostalCodeAPIController extends ApiController
|
||||
{
|
||||
public function __construct(private readonly CountryRepository $countryRepository, private readonly PostalCodeRepositoryInterface $postalCodeRepository, private readonly PaginatorFactory $paginatorFactory)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly CountryRepository $countryRepository, private readonly PostalCodeRepositoryInterface $postalCodeRepository, private readonly PaginatorFactory $paginatorFactory) {}
|
||||
|
||||
/**
|
||||
* @Route("/api/1.0/main/postal-code/search.json")
|
||||
|
@@ -36,9 +36,7 @@ use function count;
|
||||
|
||||
class SavedExportController
|
||||
{
|
||||
public function __construct(private readonly \Twig\Environment $templating, private readonly EntityManagerInterface $entityManager, private readonly ExportManager $exportManager, private readonly FormFactoryInterface $formFactory, private readonly SavedExportRepositoryInterface $savedExportRepository, private readonly Security $security, private readonly SessionInterface $session, private readonly TranslatorInterface $translator, private readonly UrlGeneratorInterface $urlGenerator)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly \Twig\Environment $templating, private readonly EntityManagerInterface $entityManager, private readonly ExportManager $exportManager, private readonly FormFactoryInterface $formFactory, private readonly SavedExportRepositoryInterface $savedExportRepository, private readonly Security $security, private readonly SessionInterface $session, private readonly TranslatorInterface $translator, private readonly UrlGeneratorInterface $urlGenerator) {}
|
||||
|
||||
/**
|
||||
* @Route("/{_locale}/exports/saved/{id}/delete", name="chill_main_export_saved_delete")
|
||||
|
@@ -36,9 +36,7 @@ use function reset;
|
||||
*/
|
||||
class SearchController extends AbstractController
|
||||
{
|
||||
public function __construct(protected SearchProvider $searchProvider, protected TranslatorInterface $translator, protected PaginatorFactory $paginatorFactory, protected SearchApi $searchApi)
|
||||
{
|
||||
}
|
||||
public function __construct(protected SearchProvider $searchProvider, protected TranslatorInterface $translator, protected PaginatorFactory $paginatorFactory, protected SearchApi $searchApi) {}
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/search/advanced/{name}", name="chill_main_advanced_search")
|
||||
|
@@ -22,9 +22,7 @@ use function count;
|
||||
|
||||
class TimelineCenterController extends AbstractController
|
||||
{
|
||||
public function __construct(protected TimelineBuilder $timelineBuilder, protected PaginatorFactory $paginatorFactory, private readonly Security $security)
|
||||
{
|
||||
}
|
||||
public function __construct(protected TimelineBuilder $timelineBuilder, protected PaginatorFactory $paginatorFactory, private readonly Security $security) {}
|
||||
|
||||
/**
|
||||
* @Route("/{_locale}/center/timeline",
|
||||
|
@@ -38,9 +38,7 @@ class UserController extends CRUDController
|
||||
{
|
||||
final public const FORM_GROUP_CENTER_COMPOSED = 'composed_groupcenter';
|
||||
|
||||
public function __construct(private readonly LoggerInterface $logger, private readonly ValidatorInterface $validator, private readonly UserPasswordEncoderInterface $passwordEncoder, private readonly UserRepository $userRepository, protected ParameterBagInterface $parameterBag)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly LoggerInterface $logger, private readonly ValidatorInterface $validator, private readonly UserPasswordEncoderInterface $passwordEncoder, private readonly UserRepository $userRepository, protected ParameterBagInterface $parameterBag) {}
|
||||
|
||||
/**
|
||||
* @Route("/{_locale}/admin/main/user/{uid}/add_link_groupcenter",
|
||||
|
@@ -27,8 +27,7 @@ final readonly class UserExportController
|
||||
private UserRepositoryInterface $userRepository,
|
||||
private Security $security,
|
||||
private TranslatorInterface $translator,
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
/**
|
||||
* @throws \League\Csv\CannotInsertRecord
|
||||
|
@@ -30,9 +30,7 @@ use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
class WorkflowApiController
|
||||
{
|
||||
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly SerializerInterface $serializer)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly SerializerInterface $serializer) {}
|
||||
|
||||
/**
|
||||
* Return a list of workflow which are waiting an action for the user.
|
||||
|
@@ -39,9 +39,7 @@ use function count;
|
||||
|
||||
class WorkflowController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager, private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly ValidatorInterface $validator, private readonly PaginatorFactory $paginatorFactory, private readonly Registry $registry, private readonly EntityManagerInterface $entityManager, private readonly TranslatorInterface $translator, private readonly Security $security)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager, private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly ValidatorInterface $validator, private readonly PaginatorFactory $paginatorFactory, private readonly Registry $registry, private readonly EntityManagerInterface $entityManager, private readonly TranslatorInterface $translator, private readonly Security $security) {}
|
||||
|
||||
/**
|
||||
* @Route("/{_locale}/main/workflow/create", name="chill_main_workflow_create")
|
||||
|
@@ -57,8 +57,7 @@ final readonly class CronManager implements CronManagerInterface
|
||||
private EntityManagerInterface $entityManager,
|
||||
private iterable $jobs,
|
||||
private LoggerInterface $logger
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function run(?string $forceJob = null): void
|
||||
{
|
||||
|
@@ -22,9 +22,7 @@ use Symfony\Component\Security\Core\Security;
|
||||
|
||||
class TrackCreateUpdateSubscriber implements EventSubscriber
|
||||
{
|
||||
public function __construct(private readonly Security $security)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly Security $security) {}
|
||||
|
||||
public function getSubscribedEvents()
|
||||
{
|
||||
|
@@ -20,9 +20,7 @@ class Point implements JsonSerializable
|
||||
{
|
||||
public static string $SRID = '4326';
|
||||
|
||||
private function __construct(private readonly ?float $lon, private readonly ?float $lat)
|
||||
{
|
||||
}
|
||||
private function __construct(private readonly ?float $lon, private readonly ?float $lat) {}
|
||||
|
||||
public static function fromArrayGeoJson(array $array): self
|
||||
{
|
||||
|
@@ -45,6 +45,5 @@ class SimpleGeographicalUnitDTO
|
||||
* @Serializer\Groups({"read"})
|
||||
*/
|
||||
public int $layerId
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
}
|
||||
|
@@ -174,9 +174,7 @@ class User implements UserInterface, \Stringable
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function eraseCredentials()
|
||||
{
|
||||
}
|
||||
public function eraseCredentials() {}
|
||||
|
||||
public function getAbsenceStart(): ?DateTimeImmutable
|
||||
{
|
||||
|
@@ -26,8 +26,7 @@ final readonly class ExportFormHelper
|
||||
private AuthorizationHelperForCurrentUserInterface $authorizationHelper,
|
||||
private ExportManager $exportManager,
|
||||
private FormFactoryInterface $formFactory,
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function getDefaultData(string $step, ExportInterface|DirectExportInterface $export, array $options = []): array
|
||||
{
|
||||
|
@@ -18,9 +18,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class DateTimeHelper
|
||||
{
|
||||
public function __construct(private readonly TranslatorInterface $translator)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly TranslatorInterface $translator) {}
|
||||
|
||||
public function getLabel($header): callable
|
||||
{
|
||||
|
@@ -84,9 +84,7 @@ class ExportAddressHelper
|
||||
*/
|
||||
private ?array $unitRefsKeysCache = [];
|
||||
|
||||
public function __construct(private readonly AddressRender $addressRender, private readonly AddressRepository $addressRepository, private readonly GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly AddressRender $addressRender, private readonly AddressRepository $addressRepository, private readonly GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
|
||||
|
||||
public function addSelectClauses(int $params, QueryBuilder $queryBuilder, $entityName = 'address', $prefix = 'add')
|
||||
{
|
||||
|
@@ -21,9 +21,7 @@ use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
||||
*/
|
||||
class TranslatableStringExportLabelHelper
|
||||
{
|
||||
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
|
||||
|
||||
public function getLabel(string $key, array $values, string $header)
|
||||
{
|
||||
|
@@ -18,9 +18,7 @@ use const SORT_NUMERIC;
|
||||
|
||||
class UserHelper
|
||||
{
|
||||
public function __construct(private readonly UserRender $userRender, private readonly UserRepositoryInterface $userRepository)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly UserRender $userRender, private readonly UserRepositoryInterface $userRepository) {}
|
||||
|
||||
public function getLabel($key, array $values, string $header): callable
|
||||
{
|
||||
|
@@ -20,6 +20,4 @@ namespace Chill\MainBundle\Export;
|
||||
*
|
||||
* When used, the `ExportManager` will not handle aggregator for this class.
|
||||
*/
|
||||
interface ListInterface extends ExportInterface
|
||||
{
|
||||
}
|
||||
interface ListInterface extends ExportInterface {}
|
||||
|
@@ -19,9 +19,7 @@ use Symfony\Component\Security\Core\Security;
|
||||
|
||||
final class PrivateCommentDataMapper extends AbstractType implements DataMapperInterface
|
||||
{
|
||||
public function __construct(private readonly Security $security)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly Security $security) {}
|
||||
|
||||
public function mapDataToForms($viewData, $forms)
|
||||
{
|
||||
|
@@ -16,9 +16,7 @@ use Symfony\Component\Form\DataMapperInterface;
|
||||
|
||||
class ScopePickerDataMapper implements DataMapperInterface
|
||||
{
|
||||
public function __construct(private readonly ?Scope $scope = null)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly ?Scope $scope = null) {}
|
||||
|
||||
public function mapDataToForms($data, $forms)
|
||||
{
|
||||
|
@@ -17,9 +17,7 @@ class CustomizeFormEvent extends \Symfony\Contracts\EventDispatcher\Event
|
||||
{
|
||||
final public const NAME = 'chill_main.customize_form';
|
||||
|
||||
public function __construct(protected string $type, protected FormBuilderInterface $builder)
|
||||
{
|
||||
}
|
||||
public function __construct(protected string $type, protected FormBuilderInterface $builder) {}
|
||||
|
||||
public function getBuilder(): FormBuilderInterface
|
||||
{
|
||||
|
@@ -24,9 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
final class LocationFormType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
|
@@ -17,9 +17,7 @@ use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
|
||||
final readonly class AddressToIdDataTransformer implements DataTransformerInterface
|
||||
{
|
||||
public function __construct(private AddressRepository $addressRepository)
|
||||
{
|
||||
}
|
||||
public function __construct(private AddressRepository $addressRepository) {}
|
||||
|
||||
public function reverseTransform($value)
|
||||
{
|
||||
|
@@ -23,9 +23,7 @@ use function count;
|
||||
|
||||
class CenterTransformer implements DataTransformerInterface
|
||||
{
|
||||
public function __construct(private readonly CenterRepository $centerRepository, private readonly bool $multiple = false)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly CenterRepository $centerRepository, private readonly bool $multiple = false) {}
|
||||
|
||||
public function reverseTransform($id)
|
||||
{
|
||||
|
@@ -25,9 +25,7 @@ use function array_key_exists;
|
||||
|
||||
class EntityToJsonTransformer implements DataTransformerInterface
|
||||
{
|
||||
public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly SerializerInterface $serializer, private readonly bool $multiple, private readonly string $type)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly SerializerInterface $serializer, private readonly bool $multiple, private readonly string $type) {}
|
||||
|
||||
public function reverseTransform($value)
|
||||
{
|
||||
|
@@ -17,9 +17,7 @@ use Symfony\Component\Form\DataTransformerInterface;
|
||||
|
||||
class MultipleObjectsToIdTransformer implements DataTransformerInterface
|
||||
{
|
||||
public function __construct(private readonly EntityManagerInterface $em, private readonly ?string $class = null)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly EntityManagerInterface $em, private readonly ?string $class = null) {}
|
||||
|
||||
/**
|
||||
* Transforms a string (id) to an object (item).
|
||||
|
@@ -17,9 +17,7 @@ use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
|
||||
class ObjectToIdTransformer implements DataTransformerInterface
|
||||
{
|
||||
public function __construct(private readonly EntityManagerInterface $em, private readonly ?string $class = null)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly EntityManagerInterface $em, private readonly ?string $class = null) {}
|
||||
|
||||
/**
|
||||
* Transforms a string (id) to an object.
|
||||
|
@@ -20,9 +20,7 @@ use function is_int;
|
||||
|
||||
class PostalCodeToIdTransformer implements DataTransformerInterface
|
||||
{
|
||||
public function __construct(private readonly PostalCodeRepositoryInterface $postalCodeRepository)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly PostalCodeRepositoryInterface $postalCodeRepository) {}
|
||||
|
||||
public function reverseTransform($value)
|
||||
{
|
||||
|
@@ -18,9 +18,7 @@ use Symfony\Component\Form\Exception\TransformationFailedException;
|
||||
|
||||
class ScopeTransformer implements DataTransformerInterface
|
||||
{
|
||||
public function __construct(private readonly EntityManagerInterface $em)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly EntityManagerInterface $em) {}
|
||||
|
||||
public function reverseTransform($id)
|
||||
{
|
||||
|
@@ -19,9 +19,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class AggregatorType extends AbstractType
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
public function __construct() {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
|
@@ -21,9 +21,7 @@ class FilterType extends AbstractType
|
||||
{
|
||||
final public const ENABLED_FIELD = 'enabled';
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
}
|
||||
public function __construct() {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
|
@@ -38,8 +38,7 @@ final class PickCenterType extends AbstractType
|
||||
private readonly ExportManager $exportManager,
|
||||
private readonly RegroupmentRepository $regroupmentRepository,
|
||||
private readonly AuthorizationHelperForCurrentUserInterface $authorizationHelper
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
|
@@ -43,9 +43,7 @@ use function uniqid;
|
||||
*/
|
||||
final class PickAddressType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly AddressToIdDataTransformer $addressToIdDataTransformer, private readonly TranslatorInterface $translator)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly AddressToIdDataTransformer $addressToIdDataTransformer, private readonly TranslatorInterface $translator) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
|
@@ -38,9 +38,7 @@ use function count;
|
||||
*/
|
||||
class PickCenterType extends AbstractType
|
||||
{
|
||||
public function __construct(protected AuthorizationHelperInterface $authorizationHelper, protected Security $security, protected CenterRepository $centerRepository)
|
||||
{
|
||||
}
|
||||
public function __construct(protected AuthorizationHelperInterface $authorizationHelper, protected Security $security, protected CenterRepository $centerRepository) {}
|
||||
|
||||
/**
|
||||
* add a data transformer if user can reach only one center.
|
||||
|
@@ -21,9 +21,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class PickCivilityType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
|
@@ -19,9 +19,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class PickLocationTypeType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
|
@@ -21,9 +21,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class PickPostalCodeType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly PostalCodeToIdTransformer $postalCodeToIdTransformer)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly PostalCodeToIdTransformer $postalCodeToIdTransformer) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
|
@@ -27,9 +27,7 @@ use Symfony\Component\Serializer\SerializerInterface;
|
||||
*/
|
||||
class PickUserDynamicType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly SerializerInterface $serializer, private readonly NormalizerInterface $normalizer)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly SerializerInterface $serializer, private readonly NormalizerInterface $normalizer) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
|
@@ -20,9 +20,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class PickUserLocationType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, private readonly LocationRepository $locationRepository)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, private readonly LocationRepository $locationRepository) {}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
|
@@ -24,9 +24,7 @@ use Symfony\Component\Security\Core\User\UserInterface;
|
||||
|
||||
class PrivateCommentType extends AbstractType
|
||||
{
|
||||
public function __construct(protected PrivateCommentDataMapper $dataMapper)
|
||||
{
|
||||
}
|
||||
public function __construct(protected PrivateCommentDataMapper $dataMapper) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
|
@@ -42,9 +42,7 @@ use function count;
|
||||
*/
|
||||
class ScopePickerType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly AuthorizationHelperInterface $authorizationHelper, private readonly Security $security, private readonly TranslatableStringHelperInterface $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly AuthorizationHelperInterface $authorizationHelper, private readonly Security $security, private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
|
@@ -29,9 +29,7 @@ use const SORT_STRING;
|
||||
*/
|
||||
class Select2CountryType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly RequestStack $requestStack, private readonly ObjectManager $em, protected TranslatableStringHelper $translatableStringHelper, protected ParameterBagInterface $parameterBag)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly RequestStack $requestStack, private readonly ObjectManager $em, protected TranslatableStringHelper $translatableStringHelper, protected ParameterBagInterface $parameterBag) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
|
@@ -29,9 +29,7 @@ use const SORT_STRING;
|
||||
*/
|
||||
class Select2LanguageType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly RequestStack $requestStack, private readonly ObjectManager $em, protected TranslatableStringHelper $translatableStringHelper, protected ParameterBagInterface $parameterBag)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly RequestStack $requestStack, private readonly ObjectManager $em, protected TranslatableStringHelper $translatableStringHelper, protected ParameterBagInterface $parameterBag) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
|
@@ -35,9 +35,7 @@ use Symfony\Component\Validator\Constraints\Regex;
|
||||
|
||||
class UserType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, protected ParameterBagInterface $parameterBag)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, protected ParameterBagInterface $parameterBag) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
|
@@ -36,9 +36,7 @@ use function array_key_exists;
|
||||
|
||||
class WorkflowStepType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager, private readonly Registry $registry, private readonly TranslatableStringHelperInterface $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager, private readonly Registry $registry, private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
|
@@ -25,9 +25,7 @@ use Symfony\Component\Security\Core\User\UserInterface;
|
||||
|
||||
final readonly class NotificationByUserCounter implements NotificationCounterInterface
|
||||
{
|
||||
public function __construct(private CacheItemPoolInterface $cacheItemPool, private NotificationRepository $notificationRepository)
|
||||
{
|
||||
}
|
||||
public function __construct(private CacheItemPoolInterface $cacheItemPool, private NotificationRepository $notificationRepository) {}
|
||||
|
||||
public function addNotification(UserInterface $u): int
|
||||
{
|
||||
|
@@ -25,9 +25,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class NotificationMailer
|
||||
{
|
||||
public function __construct(private readonly MailerInterface $mailer, private readonly LoggerInterface $logger, private readonly TranslatorInterface $translator)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly MailerInterface $mailer, private readonly LoggerInterface $logger, private readonly TranslatorInterface $translator) {}
|
||||
|
||||
public function postPersistComment(NotificationComment $comment, PostPersistEventArgs $eventArgs): void
|
||||
{
|
||||
|
@@ -19,9 +19,7 @@ use function count;
|
||||
|
||||
class PersistNotificationOnTerminateEventSubscriber implements EventSubscriberInterface
|
||||
{
|
||||
public function __construct(private readonly EntityManagerInterface $em, private readonly NotificationPersisterInterface $persister)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly EntityManagerInterface $em, private readonly NotificationPersisterInterface $persister) {}
|
||||
|
||||
public static function getSubscribedEvents()
|
||||
{
|
||||
|
@@ -13,6 +13,4 @@ namespace Chill\MainBundle\Notification\Exception;
|
||||
|
||||
use RuntimeException;
|
||||
|
||||
class NotificationHandlerNotFound extends RuntimeException
|
||||
{
|
||||
}
|
||||
class NotificationHandlerNotFound extends RuntimeException {}
|
||||
|
@@ -40,9 +40,7 @@ class Mailer
|
||||
* @param $routeParameters
|
||||
* @param mixed[] $routeParameters
|
||||
*/
|
||||
public function __construct(private readonly MailerInterface $mailer, private readonly LoggerInterface $logger, private readonly \Twig\Environment $twig, private readonly RouterInterface $router, private readonly TranslatorInterface $translator, protected $routeParameters)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly MailerInterface $mailer, private readonly LoggerInterface $logger, private readonly \Twig\Environment $twig, private readonly RouterInterface $router, private readonly TranslatorInterface $translator, protected $routeParameters) {}
|
||||
|
||||
/**
|
||||
* @param $template
|
||||
|
@@ -17,9 +17,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
final readonly class NotificationHandlerManager
|
||||
{
|
||||
public function __construct(private iterable $handlers, private EntityManagerInterface $em)
|
||||
{
|
||||
}
|
||||
public function __construct(private iterable $handlers, private EntityManagerInterface $em) {}
|
||||
|
||||
/**
|
||||
* @throw NotificationHandlerNotFound if handler is not found
|
||||
|
@@ -24,9 +24,7 @@ class NotificationPresence
|
||||
{
|
||||
private array $cache = [];
|
||||
|
||||
public function __construct(private readonly Security $security, private readonly NotificationRepository $notificationRepository)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly Security $security, private readonly NotificationRepository $notificationRepository) {}
|
||||
|
||||
/**
|
||||
* @param list<array{relatedEntityClass: class-string, relatedEntityId: int}> $more
|
||||
|
@@ -21,9 +21,7 @@ use Twig\Extension\RuntimeExtensionInterface;
|
||||
|
||||
class NotificationTwigExtensionRuntime implements RuntimeExtensionInterface
|
||||
{
|
||||
public function __construct(private readonly FormFactoryInterface $formFactory, private readonly NotificationPresence $notificationPresence, private readonly UrlGeneratorInterface $urlGenerator)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly FormFactoryInterface $formFactory, private readonly NotificationPresence $notificationPresence, private readonly UrlGeneratorInterface $urlGenerator) {}
|
||||
|
||||
public function counterNotificationFor(Environment $environment, string $relatedEntityClass, int $relatedEntityId, array $more = [], array $options = []): string
|
||||
{
|
||||
|
@@ -20,9 +20,7 @@ class PageGenerator implements Iterator
|
||||
{
|
||||
protected int $current = 1;
|
||||
|
||||
public function __construct(protected Paginator $paginator)
|
||||
{
|
||||
}
|
||||
public function __construct(protected Paginator $paginator) {}
|
||||
|
||||
public function current(): Page
|
||||
{
|
||||
|
@@ -58,8 +58,7 @@ class Paginator implements PaginatorInterface
|
||||
* the key in the GET parameter to indicate the number of item per page.
|
||||
*/
|
||||
protected string $itemPerPageKey
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function count(): int
|
||||
{
|
||||
|
@@ -42,8 +42,7 @@ class PaginatorFactory
|
||||
* the request or inside the paginator.
|
||||
*/
|
||||
private $itemPerPage = 20
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
/**
|
||||
* create a paginator instance.
|
||||
|
@@ -16,9 +16,7 @@ use Twig\TwigFilter;
|
||||
|
||||
class Templating extends AbstractExtension
|
||||
{
|
||||
public function __construct(protected PhonenumberHelper $phonenumberHelper)
|
||||
{
|
||||
}
|
||||
public function __construct(protected PhonenumberHelper $phonenumberHelper) {}
|
||||
|
||||
public function formatPhonenumber($phonenumber)
|
||||
{
|
||||
|
@@ -16,6 +16,4 @@ use Redis;
|
||||
/**
|
||||
* Redis client configured by chill main.
|
||||
*/
|
||||
class ChillRedis extends Redis
|
||||
{
|
||||
}
|
||||
class ChillRedis extends Redis {}
|
||||
|
@@ -19,9 +19,7 @@ use Doctrine\ORM\EntityManagerInterface;
|
||||
|
||||
class UserACLAwareRepository implements UserACLAwareRepositoryInterface
|
||||
{
|
||||
public function __construct(private readonly ParentRoleHelper $parentRoleHelper, private readonly EntityManagerInterface $em)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly ParentRoleHelper $parentRoleHelper, private readonly EntityManagerInterface $em) {}
|
||||
|
||||
public function findUsersByReachedACL(string $role, $center, $scope = null, bool $onlyEnabled = true): array
|
||||
{
|
||||
|
@@ -26,9 +26,7 @@ class SectionMenuBuilder implements LocalMenuBuilderInterface
|
||||
/**
|
||||
* SectionMenuBuilder constructor.
|
||||
*/
|
||||
public function __construct(protected AuthorizationCheckerInterface $authorizationChecker, protected TranslatorInterface $translator, protected ParameterBagInterface $parameterBag)
|
||||
{
|
||||
}
|
||||
public function __construct(protected AuthorizationCheckerInterface $authorizationChecker, protected TranslatorInterface $translator, protected ParameterBagInterface $parameterBag) {}
|
||||
|
||||
/**
|
||||
* @param $menuId
|
||||
|
@@ -22,9 +22,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class UserMenuBuilder implements LocalMenuBuilderInterface
|
||||
{
|
||||
public function __construct(private readonly NotificationByUserCounter $notificationByUserCounter, private readonly WorkflowByUserCounter $workflowByUserCounter, private readonly Security $security, private readonly TranslatorInterface $translator, protected ParameterBagInterface $parameterBag, private readonly RequestStack $requestStack)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly NotificationByUserCounter $notificationByUserCounter, private readonly WorkflowByUserCounter $workflowByUserCounter, private readonly Security $security, private readonly TranslatorInterface $translator, protected ParameterBagInterface $parameterBag, private readonly RequestStack $requestStack) {}
|
||||
|
||||
public function buildMenu($menuId, \Knp\Menu\MenuItem $menu, array $parameters)
|
||||
{
|
||||
|
@@ -33,9 +33,7 @@ class MenuComposer
|
||||
|
||||
private RouteCollection $routeCollection;
|
||||
|
||||
public function __construct(private readonly RouterInterface $router, private readonly FactoryInterface $menuFactory, private readonly TranslatorInterface $translator)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly RouterInterface $router, private readonly FactoryInterface $menuFactory, private readonly TranslatorInterface $translator) {}
|
||||
|
||||
public function addLocalMenuBuilder(LocalMenuBuilderInterface $menuBuilder, $menuId)
|
||||
{
|
||||
|
@@ -35,9 +35,7 @@ class MenuTwig extends AbstractExtension implements ContainerAwareInterface
|
||||
'activeRouteKey' => null,
|
||||
];
|
||||
|
||||
public function __construct(private readonly MenuComposer $menuComposer)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly MenuComposer $menuComposer) {}
|
||||
|
||||
/**
|
||||
* Render a Menu corresponding to $menuId.
|
||||
|
@@ -20,9 +20,7 @@ use function in_array;
|
||||
|
||||
class SearchUserApiProvider implements SearchApiInterface
|
||||
{
|
||||
public function __construct(private readonly UserRepository $userRepository)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly UserRepository $userRepository) {}
|
||||
|
||||
public function getResult(string $key, array $metadata, float $pertinence)
|
||||
{
|
||||
|
@@ -22,8 +22,7 @@ class Result
|
||||
* mixed an arbitrary result.
|
||||
*/
|
||||
private $result
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function getRelevance(): float
|
||||
{
|
||||
|
@@ -13,6 +13,4 @@ namespace Chill\MainBundle\Search;
|
||||
|
||||
use Exception;
|
||||
|
||||
class ParsingException extends Exception
|
||||
{
|
||||
}
|
||||
class ParsingException extends Exception {}
|
||||
|
@@ -26,9 +26,7 @@ use function strtr;
|
||||
|
||||
class SearchApi
|
||||
{
|
||||
public function __construct(private readonly EntityManagerInterface $em, private readonly iterable $providers, private readonly PaginatorFactory $paginator)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly EntityManagerInterface $em, private readonly iterable $providers, private readonly PaginatorFactory $paginator) {}
|
||||
|
||||
public function getResults(string $pattern, array $types, array $parameters): Collection
|
||||
{
|
||||
|
@@ -17,9 +17,7 @@ class SearchApiResult
|
||||
{
|
||||
private mixed $result;
|
||||
|
||||
public function __construct(private readonly float $relevance)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly float $relevance) {}
|
||||
|
||||
/**
|
||||
* @Serializer\Groups({"read"})
|
||||
|
@@ -13,9 +13,7 @@ namespace Chill\MainBundle\Search\Utils;
|
||||
|
||||
class SearchExtractionResult
|
||||
{
|
||||
public function __construct(private readonly string $filteredSubject, private readonly array $found)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly string $filteredSubject, private readonly array $found) {}
|
||||
|
||||
public function getFilteredSubject(): string
|
||||
{
|
||||
|
@@ -24,6 +24,4 @@ use const E_USER_DEPRECATED;
|
||||
*
|
||||
* 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 {}
|
||||
|
@@ -33,9 +33,7 @@ use function get_class;
|
||||
*/
|
||||
class AuthorizationHelper implements AuthorizationHelperInterface
|
||||
{
|
||||
public function __construct(private readonly CenterResolverManagerInterface $centerResolverManager, private readonly LoggerInterface $logger, private readonly ScopeResolverDispatcher $scopeResolverDispatcher, private readonly UserACLAwareRepositoryInterface $userACLAwareRepository, private readonly ParentRoleHelper $parentRoleHelper)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly CenterResolverManagerInterface $centerResolverManager, private readonly LoggerInterface $logger, private readonly ScopeResolverDispatcher $scopeResolverDispatcher, private readonly UserACLAwareRepositoryInterface $userACLAwareRepository, private readonly ParentRoleHelper $parentRoleHelper) {}
|
||||
|
||||
/**
|
||||
* Filter an array of centers, return only center which are reachable.
|
||||
|
@@ -17,9 +17,7 @@ use Symfony\Component\Security\Core\Security;
|
||||
|
||||
class AuthorizationHelperForCurrentUser implements AuthorizationHelperForCurrentUserInterface
|
||||
{
|
||||
public function __construct(private readonly AuthorizationHelperInterface $authorizationHelper, private readonly Security $security)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly AuthorizationHelperInterface $authorizationHelper, private readonly Security $security) {}
|
||||
|
||||
public function getReachableCenters(string $role, ?Scope $scope = null): array
|
||||
{
|
||||
|
@@ -14,6 +14,4 @@ namespace Chill\MainBundle\Security\Authorization;
|
||||
/**
|
||||
* Provides methods for compiling voter and build admin role fields.
|
||||
*/
|
||||
interface ChillVoterInterface
|
||||
{
|
||||
}
|
||||
interface ChillVoterInterface {}
|
||||
|
@@ -18,9 +18,7 @@ use function in_array;
|
||||
|
||||
final readonly class DefaultVoterHelper implements VoterHelperInterface
|
||||
{
|
||||
public function __construct(private AuthorizationHelper $authorizationHelper, private CenterResolverDispatcherInterface $centerResolverDispatcher, private array $configuration)
|
||||
{
|
||||
}
|
||||
public function __construct(private AuthorizationHelper $authorizationHelper, private CenterResolverDispatcherInterface $centerResolverDispatcher, private array $configuration) {}
|
||||
|
||||
public function supports($attribute, $subject): bool
|
||||
{
|
||||
|
@@ -15,9 +15,7 @@ use Chill\MainBundle\Security\Resolver\CenterResolverDispatcherInterface;
|
||||
|
||||
class DefaultVoterHelperFactory implements VoterHelperFactoryInterface
|
||||
{
|
||||
public function __construct(protected AuthorizationHelper $authorizationHelper, protected CenterResolverDispatcherInterface $centerResolverDispatcher)
|
||||
{
|
||||
}
|
||||
public function __construct(protected AuthorizationHelper $authorizationHelper, protected CenterResolverDispatcherInterface $centerResolverDispatcher) {}
|
||||
|
||||
public function generate($context): VoterGeneratorInterface
|
||||
{
|
||||
|
@@ -17,9 +17,7 @@ final class DefaultVoterHelperGenerator implements VoterGeneratorInterface
|
||||
{
|
||||
private array $configuration = [];
|
||||
|
||||
public function __construct(private readonly AuthorizationHelper $authorizationHelper, private readonly CenterResolverDispatcherInterface $centerResolverDispatcher)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly AuthorizationHelper $authorizationHelper, private readonly CenterResolverDispatcherInterface $centerResolverDispatcher) {}
|
||||
|
||||
public function addCheckFor(?string $subject, array $attributes): self
|
||||
{
|
||||
|
@@ -29,9 +29,7 @@ class EntityWorkflowVoter extends Voter
|
||||
|
||||
final public const SHOW_ENTITY_LINK = 'CHILL_MAIN_WORKFLOW_LINK_SHOW';
|
||||
|
||||
public function __construct(private readonly EntityWorkflowManager $manager, private readonly Security $security)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly EntityWorkflowManager $manager, private readonly Security $security) {}
|
||||
|
||||
protected function supports($attribute, $subject)
|
||||
{
|
||||
|
@@ -24,9 +24,7 @@ class WorkflowEntityDeletionVoter extends Voter
|
||||
/**
|
||||
* @param \Chill\MainBundle\Workflow\EntityWorkflowHandlerInterface[] $handlers
|
||||
*/
|
||||
public function __construct(private $handlers, private readonly EntityWorkflowRepository $entityWorkflowRepository)
|
||||
{
|
||||
}
|
||||
public function __construct(private $handlers, private readonly EntityWorkflowRepository $entityWorkflowRepository) {}
|
||||
|
||||
protected function supports($attribute, $subject)
|
||||
{
|
||||
|
@@ -31,8 +31,7 @@ class PasswordRecoverEvent extends \Symfony\Contracts\EventDispatcher\Event
|
||||
private readonly ?User $user = null,
|
||||
private $ip = null,
|
||||
private readonly bool $safelyGenerated = false,
|
||||
) {
|
||||
}
|
||||
) {}
|
||||
|
||||
public function getIp()
|
||||
{
|
||||
|
@@ -24,9 +24,7 @@ class RecoverPasswordHelper
|
||||
{
|
||||
final public const RECOVER_PASSWORD_ROUTE = 'password_recover';
|
||||
|
||||
public function __construct(private readonly TokenManager $tokenManager, private readonly UrlGeneratorInterface $urlGenerator, private readonly MailerInterface $mailer)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly TokenManager $tokenManager, private readonly UrlGeneratorInterface $urlGenerator, private readonly MailerInterface $mailer) {}
|
||||
|
||||
/**
|
||||
* @param bool $absolute
|
||||
|
@@ -16,9 +16,7 @@ final readonly class CenterResolverDispatcher implements CenterResolverDispatche
|
||||
/**
|
||||
* @param \Chill\MainBundle\Security\Resolver\CenterResolverInterface[] $resolvers
|
||||
*/
|
||||
public function __construct(private iterable $resolvers = [])
|
||||
{
|
||||
}
|
||||
public function __construct(private iterable $resolvers = []) {}
|
||||
|
||||
public function resolveCenter($entity, ?array $options = [])
|
||||
{
|
||||
|
@@ -22,9 +22,7 @@ final readonly class CenterResolverManager implements CenterResolverManagerInter
|
||||
/**
|
||||
* @param \Chill\MainBundle\Security\Resolver\CenterResolverInterface[] $resolvers
|
||||
*/
|
||||
public function __construct(private iterable $resolvers = [])
|
||||
{
|
||||
}
|
||||
public function __construct(private iterable $resolvers = []) {}
|
||||
|
||||
public function resolveCenters($entity, ?array $options = []): array
|
||||
{
|
||||
|
@@ -15,9 +15,7 @@ use Twig\TwigFilter;
|
||||
|
||||
final class ResolverTwigExtension extends \Twig\Extension\AbstractExtension
|
||||
{
|
||||
public function __construct(private readonly CenterResolverManagerInterface $centerResolverDispatcher, private readonly ScopeResolverDispatcher $scopeResolverDispatcher)
|
||||
{
|
||||
}
|
||||
public function __construct(private readonly CenterResolverManagerInterface $centerResolverDispatcher, private readonly ScopeResolverDispatcher $scopeResolverDispatcher) {}
|
||||
|
||||
public function getFilters()
|
||||
{
|
||||
|
@@ -19,9 +19,7 @@ final readonly class ScopeResolverDispatcher
|
||||
/**
|
||||
* @param \Chill\MainBundle\Security\Resolver\ScopeResolverInterface[] $resolvers
|
||||
*/
|
||||
public function __construct(private iterable $resolvers)
|
||||
{
|
||||
}
|
||||
public function __construct(private iterable $resolvers) {}
|
||||
|
||||
public function isConcerned($entity, ?array $options = []): bool
|
||||
{
|
||||
|
@@ -21,9 +21,7 @@ use Symfony\Component\Security\Core\User\UserProviderInterface;
|
||||
|
||||
class UserProvider implements UserProviderInterface
|
||||
{
|
||||
public function __construct(protected EntityManagerInterface $em)
|
||||
{
|
||||
}
|
||||
public function __construct(protected EntityManagerInterface $em) {}
|
||||
|
||||
public function loadUserByUsername($username): UserInterface
|
||||
{
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user