mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 19:43:49 +00:00
apply rector rules: php up to php82
This commit is contained in:
@@ -20,7 +20,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class ByCreatorAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private UserRepositoryInterface $userRepository, private UserRender $userRender)
|
||||
public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly UserRender $userRender)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -21,7 +21,7 @@ use function in_array;
|
||||
|
||||
class BySocialActionAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private SocialActionRender $actionRender, private SocialActionRepository $actionRepository)
|
||||
public function __construct(private readonly SocialActionRender $actionRender, private readonly SocialActionRepository $actionRepository)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -21,7 +21,7 @@ use function in_array;
|
||||
|
||||
class BySocialIssueAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private SocialIssueRepository $issueRepository, private SocialIssueRender $issueRender)
|
||||
public function __construct(private readonly SocialIssueRepository $issueRepository, private readonly SocialIssueRender $issueRender)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -21,7 +21,7 @@ use function in_array;
|
||||
|
||||
class ByThirdpartyAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private ThirdPartyRepository $thirdPartyRepository, private ThirdPartyRender $thirdPartyRender)
|
||||
public function __construct(private readonly ThirdPartyRepository $thirdPartyRepository, private readonly ThirdPartyRender $thirdPartyRender)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -21,7 +21,7 @@ use function in_array;
|
||||
|
||||
class CreatorScopeAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private ScopeRepository $scopeRepository, private TranslatableStringHelper $translatableStringHelper)
|
||||
public function __construct(private readonly ScopeRepository $scopeRepository, private readonly TranslatableStringHelper $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -21,7 +21,7 @@ use function in_array;
|
||||
|
||||
class LocationTypeAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private LocationTypeRepository $locationTypeRepository, private TranslatableStringHelper $translatableStringHelper)
|
||||
public function __construct(private readonly LocationTypeRepository $locationTypeRepository, private readonly TranslatableStringHelper $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -22,7 +22,7 @@ use function in_array;
|
||||
|
||||
class ActivityTypeAggregator implements AggregatorInterface
|
||||
{
|
||||
public const KEY = 'activity_type_aggregator';
|
||||
final public const KEY = 'activity_type_aggregator';
|
||||
|
||||
public function __construct(protected ActivityTypeRepositoryInterface $activityTypeRepository, protected TranslatableStringHelperInterface $translatableStringHelper)
|
||||
{
|
||||
|
@@ -21,9 +21,9 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class ActivityUserAggregator implements AggregatorInterface
|
||||
{
|
||||
public const KEY = 'activity_user_id';
|
||||
final public const KEY = 'activity_user_id';
|
||||
|
||||
public function __construct(private UserRepository $userRepository, private UserRender $userRender)
|
||||
public function __construct(private readonly UserRepository $userRepository, private readonly UserRender $userRender)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -21,7 +21,7 @@ use function in_array;
|
||||
|
||||
class ActivityUsersAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private UserRepositoryInterface $userRepository, private UserRender $userRender)
|
||||
public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly UserRender $userRender)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -20,7 +20,7 @@ use function in_array;
|
||||
|
||||
class ActivityUsersJobAggregator implements \Chill\MainBundle\Export\AggregatorInterface
|
||||
{
|
||||
public function __construct(private UserJobRepositoryInterface $userJobRepository, private TranslatableStringHelperInterface $translatableStringHelper)
|
||||
public function __construct(private readonly UserJobRepositoryInterface $userJobRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -20,7 +20,7 @@ use function in_array;
|
||||
|
||||
class ActivityUsersScopeAggregator implements \Chill\MainBundle\Export\AggregatorInterface
|
||||
{
|
||||
public function __construct(private ScopeRepositoryInterface $scopeRepository, private TranslatableStringHelperInterface $translatableStringHelper)
|
||||
public function __construct(private readonly ScopeRepositoryInterface $scopeRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -20,7 +20,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class SentReceivedAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private TranslatorInterface $translator)
|
||||
public function __construct(private readonly TranslatorInterface $translator)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -16,9 +16,9 @@ namespace Chill\ActivityBundle\Export;
|
||||
*/
|
||||
abstract class Declarations
|
||||
{
|
||||
public const ACTIVITY = 'activity';
|
||||
final public const ACTIVITY = 'activity';
|
||||
|
||||
public const ACTIVITY_ACP = 'activity_linked_to_acp';
|
||||
final public const ACTIVITY_ACP = 'activity_linked_to_acp';
|
||||
|
||||
public const ACTIVITY_PERSON = 'activity_linked_to_person';
|
||||
final public const ACTIVITY_PERSON = 'activity_linked_to_person';
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class ListActivity implements ListInterface, GroupedExportInterface
|
||||
{
|
||||
public function __construct(private ListActivityHelper $helper, private EntityManagerInterface $entityManager, private TranslatableStringExportLabelHelper $translatableStringExportLabelHelper)
|
||||
public function __construct(private readonly ListActivityHelper $helper, private readonly EntityManagerInterface $entityManager, private readonly TranslatableStringExportLabelHelper $translatableStringExportLabelHelper)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -50,7 +50,7 @@ class ListActivity implements ListInterface, GroupedExportInterface
|
||||
'person_id',
|
||||
];
|
||||
|
||||
public function __construct(protected EntityManagerInterface $entityManager, protected TranslatorInterface $translator, protected TranslatableStringHelperInterface $translatableStringHelper, private ActivityRepository $activityRepository)
|
||||
public function __construct(protected EntityManagerInterface $entityManager, protected TranslatorInterface $translator, protected TranslatableStringHelperInterface $translatableStringHelper, private readonly ActivityRepository $activityRepository)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -30,13 +30,13 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
*/
|
||||
class StatActivityDuration implements ExportInterface, GroupedExportInterface
|
||||
{
|
||||
public const SUM = 'sum';
|
||||
final public const SUM = 'sum';
|
||||
|
||||
/**
|
||||
* @param string $action the stat to perform
|
||||
*/
|
||||
public function __construct(
|
||||
private ActivityRepository $activityRepository,
|
||||
private readonly ActivityRepository $activityRepository,
|
||||
/**
|
||||
* The action for this report.
|
||||
*/
|
||||
|
@@ -30,10 +30,19 @@ use const SORT_NUMERIC;
|
||||
|
||||
class ListActivityHelper
|
||||
{
|
||||
public const MSG_KEY = 'export.list.activity.';
|
||||
final public const MSG_KEY = 'export.list.activity.';
|
||||
|
||||
public function __construct(private ActivityPresenceRepositoryInterface $activityPresenceRepository, private ActivityTypeRepositoryInterface $activityTypeRepository, private DateTimeHelper $dateTimeHelper, private LabelPersonHelper $labelPersonHelper, private LabelThirdPartyHelper $labelThirdPartyHelper, private TranslatorInterface $translator, private TranslatableStringHelperInterface $translatableStringHelper, private TranslatableStringExportLabelHelper $translatableStringLabelHelper, private UserHelper $userHelper)
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ActivityPresenceRepositoryInterface $activityPresenceRepository,
|
||||
private readonly ActivityTypeRepositoryInterface $activityTypeRepository,
|
||||
private readonly DateTimeHelper $dateTimeHelper,
|
||||
private readonly LabelPersonHelper $labelPersonHelper,
|
||||
private readonly LabelThirdPartyHelper $labelThirdPartyHelper,
|
||||
private readonly TranslatorInterface $translator,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
private readonly TranslatableStringExportLabelHelper $translatableStringLabelHelper,
|
||||
private readonly UserHelper $userHelper
|
||||
) {
|
||||
}
|
||||
|
||||
public function addSelect(QueryBuilder $qb): void
|
||||
|
@@ -23,7 +23,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class ActivityTypeFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private ActivityTypeRepositoryInterface $activityTypeRepository, private TranslatableStringHelperInterface $translatableStringHelper)
|
||||
public function __construct(private readonly ActivityTypeRepositoryInterface $activityTypeRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -20,7 +20,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class ByCreatorFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private UserRender $userRender)
|
||||
public function __construct(private readonly UserRender $userRender)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -22,7 +22,7 @@ use function in_array;
|
||||
|
||||
class BySocialActionFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private SocialActionRender $actionRender)
|
||||
public function __construct(private readonly SocialActionRender $actionRender)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -22,7 +22,7 @@ use function in_array;
|
||||
|
||||
class BySocialIssueFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private SocialIssueRender $issueRender)
|
||||
public function __construct(private readonly SocialIssueRender $issueRender)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -28,7 +28,7 @@ class EmergencyFilter implements FilterInterface
|
||||
|
||||
private const DEFAULT_CHOICE = false;
|
||||
|
||||
public function __construct(private TranslatorInterface $translator)
|
||||
public function __construct(private readonly TranslatorInterface $translator)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -22,7 +22,7 @@ use function in_array;
|
||||
|
||||
class LocationTypeFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private TranslatableStringHelper $translatableStringHelper)
|
||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -29,7 +29,7 @@ class SentReceivedFilter implements FilterInterface
|
||||
|
||||
private const DEFAULT_CHOICE = Activity::SENTRECEIVED_SENT;
|
||||
|
||||
public function __construct(private TranslatorInterface $translator)
|
||||
public function __construct(private readonly TranslatorInterface $translator)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -21,7 +21,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class UserFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private UserRender $userRender)
|
||||
public function __construct(private readonly UserRender $userRender)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -23,7 +23,7 @@ use function in_array;
|
||||
|
||||
class UserScopeFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private TranslatableStringHelper $translatableStringHelper)
|
||||
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -27,7 +27,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class ActivityDateFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(protected TranslatorInterface $translator, private RollingDateConverterInterface $rollingDateConverter)
|
||||
public function __construct(protected TranslatorInterface $translator, private readonly RollingDateConverterInterface $rollingDateConverter)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -26,8 +26,10 @@ use function count;
|
||||
|
||||
class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInterface
|
||||
{
|
||||
public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, protected ActivityTypeRepositoryInterface $activityTypeRepository)
|
||||
{
|
||||
public function __construct(
|
||||
protected TranslatableStringHelperInterface $translatableStringHelper,
|
||||
protected ActivityTypeRepositoryInterface $activityTypeRepository
|
||||
) {
|
||||
}
|
||||
|
||||
public function addRole(): ?string
|
||||
|
@@ -20,7 +20,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class ActivityUsersFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private UserRender $userRender)
|
||||
public function __construct(private readonly UserRender $userRender)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class UsersJobFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private TranslatableStringHelperInterface $translatableStringHelper)
|
||||
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -23,7 +23,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class UsersScopeFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private ScopeRepositoryInterface $scopeRepository, private TranslatableStringHelperInterface $translatableStringHelper)
|
||||
public function __construct(private readonly ScopeRepositoryInterface $scopeRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user