fixes for last rebase and fixes for runtime

This commit is contained in:
Julien Fastré 2023-04-28 23:03:36 +02:00
parent c35994203d
commit 7e19419861
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
8 changed files with 11 additions and 69 deletions

View File

@ -36,7 +36,7 @@ class CustomFieldsGroupController extends AbstractController
/** /**
* CustomFieldsGroupController constructor. * CustomFieldsGroupController constructor.
*/ */
public function __construct(private CustomFieldProvider $customfieldProvider, private TranslatorInterface $translator) public function __construct(private CustomFieldProvider $customFieldProvider, private TranslatorInterface $translator)
{ {
} }
@ -283,7 +283,7 @@ class CustomFieldsGroupController extends AbstractController
{ {
$fieldChoices = []; $fieldChoices = [];
foreach ($this->customfieldProvider->getAllFields() foreach ($this->customFieldProvider->getAllFields()
as $key => $customType) { as $key => $customType) {
$fieldChoices[$key] = $customType->getName(); $fieldChoices[$key] = $customType->getName();
} }

View File

@ -27,10 +27,8 @@ class ConfigRepository
/** /**
* @param mixed[] $links * @param mixed[] $links
* @param mixed $professionnalSituations
* @param mixed $familialSituations
*/ */
public function __construct(protected $links, $professionnalSituations, $familialSituations) public function __construct(protected $links, mixed $professionnalSituations, mixed $familialSituations)
{ {
$this->professionalSituations = $professionnalSituations ?? []; $this->professionalSituations = $professionnalSituations ?? [];
$this->familialSituations = $familialSituations ?? []; $this->familialSituations = $familialSituations ?? [];

View File

@ -28,15 +28,8 @@ use Symfony\Contracts\Translation\TranslatorInterface;
class FamilyMemberController extends AbstractController class FamilyMemberController extends AbstractController
{ {
private FamilyMemberRepository $familyMemberRepository; public function __construct(private EntityManagerInterface $em, protected TranslatorInterface $translator, protected LoggerInterface $chillMainLogger, private FamilyMemberRepository $familyMemberRepository)
{
public function __construct(
private EntityManagerInterface $em,
protected TranslatorInterface $translator,
protected LoggerInterface $chillMainLogger,
FamilyMemberRepository $familyMemberRepository
) {
$this->familyMemberRepository = $familyMemberRepository;
} }
/** /**

View File

@ -93,7 +93,7 @@ class ChillMainExtension extends Extension implements
$this->widgetFactories[] = $factory; $this->widgetFactories[] = $factory;
} }
public function getConfiguration(array $config, ContainerBuilder $container): \Chill\MainBundle\DependencyInjection\Configuration|object|\Symfony\Component\Config\Definition\ConfigurationInterface|null public function getConfiguration(array $config, ContainerBuilder $container): \Chill\MainBundle\DependencyInjection\Configuration
{ {
return new Configuration($this->widgetFactories, $container); return new Configuration($this->widgetFactories, $container);
} }

View File

@ -34,44 +34,14 @@ use function call_user_func;
*/ */
class Mailer class Mailer
{ {
/**
* @var LoggerInterface
*/
private $logger;
/**
* @var RouterInterface
*/
private $router;
/**
* @var TranslatorInterface
*/
private $translator;
private EngineInterface $twig;
private MailerInterface $mailer;
/** /**
* Mailer constructor. * Mailer constructor.
* *
* @param $routeParameters * @param $routeParameters
* @param mixed[] $routeParameters * @param mixed[] $routeParameters
*/ */
public function __construct( public function __construct(private MailerInterface $mailer, private LoggerInterface $logger, private EngineInterface $twig, private RouterInterface $router, private TranslatorInterface $translator, protected $routeParameters)
MailerInterface $mailer, {
LoggerInterface $logger,
EngineInterface $twig,
RouterInterface $router,
TranslatorInterface $translator,
protected $routeParameters
) {
$this->logger = $logger;
$this->twig = $twig;
$this->mailer = $mailer;
$this->router = $router;
$this->translator = $translator;
} }
/** /**

View File

@ -24,26 +24,8 @@ class RecoverPasswordHelper
{ {
public const RECOVER_PASSWORD_ROUTE = 'password_recover'; public const RECOVER_PASSWORD_ROUTE = 'password_recover';
private MailerInterface $mailer; public function __construct(private TokenManager $tokenManager, private UrlGeneratorInterface $urlGenerator, private MailerInterface $mailer)
{
/**
* @var TokenManager
*/
private $tokenManager;
/**
* @var UrlGeneratorInterface
*/
private $urlGenerator;
public function __construct(
TokenManager $tokenManager,
UrlGeneratorInterface $urlGenerator,
MailerInterface $mailer,
) {
$this->tokenManager = $tokenManager;
$this->urlGenerator = $urlGenerator;
$this->mailer = $mailer;
} }
/** /**

View File

@ -39,7 +39,7 @@ final class ScopeResolverDispatcher
* *
* @return iterable|Scope|Scope[] * @return iterable|Scope|Scope[]
*/ */
public function resolveScope($entity, ?array $options = []): iterable|\Chill\MainBundle\Entity\Scope|array public function resolveScope($entity, ?array $options = []): iterable|\Chill\MainBundle\Entity\Scope
{ {
foreach ($this->resolvers as $resolver) { foreach ($this->resolvers as $resolver) {
if ($resolver->supports($entity, $options)) { if ($resolver->supports($entity, $options)) {

View File

@ -646,7 +646,6 @@ final class SingleTaskController extends AbstractController
/** /**
* Creates a form to delete a Task entity by id. * Creates a form to delete a Task entity by id.
* @param mixed $id
*/ */
private function createDeleteForm(mixed $id): FormInterface private function createDeleteForm(mixed $id): FormInterface
{ {