mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 11:33:49 +00:00
DX: apply rector rules up to php8.0
This commit is contained in:
@@ -58,40 +58,22 @@ use function in_array;
|
||||
|
||||
class ActivityType extends AbstractType
|
||||
{
|
||||
protected AuthorizationHelper $authorizationHelper;
|
||||
|
||||
protected ObjectManager $om;
|
||||
|
||||
protected SocialActionRender $socialActionRender;
|
||||
|
||||
protected SocialIssueRender $socialIssueRender;
|
||||
|
||||
protected array $timeChoices;
|
||||
|
||||
protected TranslatableStringHelper $translatableStringHelper;
|
||||
|
||||
protected User $user;
|
||||
|
||||
public function __construct(
|
||||
TokenStorageInterface $tokenStorage,
|
||||
AuthorizationHelper $authorizationHelper,
|
||||
ObjectManager $om,
|
||||
TranslatableStringHelper $translatableStringHelper,
|
||||
array $timeChoices,
|
||||
SocialIssueRender $socialIssueRender,
|
||||
SocialActionRender $socialActionRender
|
||||
protected AuthorizationHelper $authorizationHelper,
|
||||
protected ObjectManager $om,
|
||||
protected TranslatableStringHelper $translatableStringHelper,
|
||||
protected array $timeChoices,
|
||||
protected SocialIssueRender $socialIssueRender,
|
||||
protected SocialActionRender $socialActionRender
|
||||
) {
|
||||
if (!$tokenStorage->getToken()->getUser() instanceof User) {
|
||||
throw new RuntimeException('you should have a valid user');
|
||||
}
|
||||
|
||||
$this->user = $tokenStorage->getToken()->getUser();
|
||||
$this->authorizationHelper = $authorizationHelper;
|
||||
$this->om = $om;
|
||||
$this->translatableStringHelper = $translatableStringHelper;
|
||||
$this->timeChoices = $timeChoices;
|
||||
$this->socialIssueRender = $socialIssueRender;
|
||||
$this->socialActionRender = $socialActionRender;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
|
@@ -25,11 +25,8 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class ActivityTypeType extends AbstractType
|
||||
{
|
||||
private TranslatableStringHelper $translatableStringHelper;
|
||||
|
||||
public function __construct(TranslatableStringHelper $translatableStringHelper)
|
||||
public function __construct(private TranslatableStringHelper $translatableStringHelper)
|
||||
{
|
||||
$this->translatableStringHelper = $translatableStringHelper;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
|
@@ -24,20 +24,8 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
*/
|
||||
class PickActivityReasonType extends AbstractType
|
||||
{
|
||||
private ActivityReasonRepository $activityReasonRepository;
|
||||
|
||||
private ActivityReasonRender $reasonRender;
|
||||
|
||||
private TranslatableStringHelperInterface $translatableStringHelper;
|
||||
|
||||
public function __construct(
|
||||
ActivityReasonRepository $activityReasonRepository,
|
||||
ActivityReasonRender $reasonRender,
|
||||
TranslatableStringHelperInterface $translatableStringHelper
|
||||
) {
|
||||
$this->activityReasonRepository = $activityReasonRepository;
|
||||
$this->reasonRender = $reasonRender;
|
||||
$this->translatableStringHelper = $translatableStringHelper;
|
||||
public function __construct(private ActivityReasonRepository $activityReasonRepository, private ActivityReasonRender $reasonRender, private TranslatableStringHelperInterface $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
|
@@ -23,14 +23,8 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
*/
|
||||
class TranslatableActivityReasonCategoryType extends AbstractType
|
||||
{
|
||||
private TranslatableStringHelperInterface $translatableStringHelper;
|
||||
|
||||
private TranslatorInterface $translator;
|
||||
|
||||
public function __construct(TranslatableStringHelperInterface $translatableStringHelper, TranslatorInterface $translator)
|
||||
public function __construct(private TranslatableStringHelperInterface $translatableStringHelper, private TranslatorInterface $translator)
|
||||
{
|
||||
$this->translatableStringHelper = $translatableStringHelper;
|
||||
$this->translator = $translator;
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
|
@@ -20,16 +20,8 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
class TranslatableActivityType extends AbstractType
|
||||
{
|
||||
protected ActivityTypeRepositoryInterface $activityTypeRepository;
|
||||
|
||||
protected TranslatableStringHelperInterface $translatableStringHelper;
|
||||
|
||||
public function __construct(
|
||||
TranslatableStringHelperInterface $helper,
|
||||
ActivityTypeRepositoryInterface $activityTypeRepository
|
||||
) {
|
||||
$this->translatableStringHelper = $helper;
|
||||
$this->activityTypeRepository = $activityTypeRepository;
|
||||
public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, protected ActivityTypeRepositoryInterface $activityTypeRepository)
|
||||
{
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
|
Reference in New Issue
Block a user