apply rector rules: php up to php82

This commit is contained in:
2023-07-19 23:16:01 +02:00
parent 7b637d1287
commit 023a29cb78
744 changed files with 1369 additions and 1381 deletions

View File

@@ -24,7 +24,7 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
*/
class ActivityReasonController extends AbstractController
{
public function __construct(private ActivityReasonRepository $activityReasonRepository)
public function __construct(private readonly ActivityReasonRepository $activityReasonRepository)
{
}

View File

@@ -30,7 +30,7 @@ class LoadActivity extends AbstractFixture implements OrderedFixtureInterface
*/
private $faker;
public function __construct(private EntityManagerInterface $em)
public function __construct(private readonly EntityManagerInterface $em)
{
$this->faker = FakerFactory::create('fr_FR');
}

View File

@@ -65,9 +65,9 @@ class Activity implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterfac
use TrackUpdateTrait;
public const SENTRECEIVED_RECEIVED = 'received';
final public const SENTRECEIVED_RECEIVED = 'received';
public const SENTRECEIVED_SENT = 'sent';
final public const SENTRECEIVED_SENT = 'sent';
/**
* @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\AccompanyingPeriod")

View File

@@ -27,11 +27,11 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
*/
class ActivityType
{
public const FIELD_INVISIBLE = 0;
final public const FIELD_INVISIBLE = 0;
public const FIELD_OPTIONAL = 1;
final public const FIELD_OPTIONAL = 1;
public const FIELD_REQUIRED = 2;
final public const FIELD_REQUIRED = 2;
/**
* @deprecated not in use

View File

@@ -22,7 +22,7 @@ use function in_array;
class ActivityEntityListener
{
public function __construct(private EntityManagerInterface $em, private AccompanyingPeriodWorkRepository $workRepository)
public function __construct(private readonly EntityManagerInterface $em, private readonly AccompanyingPeriodWorkRepository $workRepository)
{
}

View File

@@ -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)
{
}

View File

@@ -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)
{
}

View File

@@ -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)
{
}

View File

@@ -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)
{
}

View File

@@ -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)
{
}

View File

@@ -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)
{
}

View File

@@ -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)
{

View File

@@ -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)
{
}

View File

@@ -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)
{
}

View File

@@ -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)
{
}

View File

@@ -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)
{
}

View File

@@ -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)
{
}

View File

@@ -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';
}

View File

@@ -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)
{
}

View File

@@ -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)
{
}

View File

@@ -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.
*/

View File

@@ -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

View File

@@ -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)
{
}

View File

@@ -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)
{
}

View File

@@ -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)
{
}

View File

@@ -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)
{
}

View File

@@ -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)
{
}

View File

@@ -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)
{
}

View File

@@ -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)
{
}

View File

@@ -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)
{
}

View File

@@ -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)
{
}

View File

@@ -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)
{
}

View File

@@ -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

View File

@@ -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)
{
}

View File

@@ -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)
{
}

View File

@@ -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)
{
}

View File

@@ -25,7 +25,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class ActivityTypeType extends AbstractType
{
public function __construct(private TranslatableStringHelper $translatableStringHelper)
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper)
{
}

View File

@@ -24,8 +24,11 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
*/
class PickActivityReasonType extends AbstractType
{
public function __construct(private ActivityReasonRepository $activityReasonRepository, private ActivityReasonRender $reasonRender, private TranslatableStringHelperInterface $translatableStringHelper)
{
public function __construct(
private readonly ActivityReasonRepository $activityReasonRepository,
private readonly ActivityReasonRender $reasonRender,
private readonly TranslatableStringHelperInterface $translatableStringHelper
) {
}
public function configureOptions(OptionsResolver $resolver)

View File

@@ -23,7 +23,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
*/
class TranslatableActivityReasonCategoryType extends AbstractType
{
public function __construct(private TranslatableStringHelperInterface $translatableStringHelper, private TranslatorInterface $translator)
public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly TranslatorInterface $translator)
{
}

View File

@@ -18,7 +18,7 @@ use Symfony\Component\Security\Core\Security;
/**
* @implements LocalMenuBuilderInterface<array>
*/
final class AdminMenuBuilder implements LocalMenuBuilderInterface
final readonly class AdminMenuBuilder implements LocalMenuBuilderInterface
{
public function __construct(private Security $security)
{

View File

@@ -21,7 +21,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
/**
* @implements LocalMenuBuilderInterface<array{person: Person}>
*/
final class PersonMenuBuilder implements LocalMenuBuilderInterface
final readonly class PersonMenuBuilder implements LocalMenuBuilderInterface
{
public function __construct(private AuthorizationCheckerInterface $authorizationChecker, private TranslatorInterface $translator)
{

View File

@@ -16,7 +16,7 @@ use Chill\ActivityBundle\Repository\ActivityRepository;
use Chill\MainBundle\Entity\Notification;
use Chill\MainBundle\Notification\NotificationHandlerInterface;
final class ActivityNotificationHandler implements NotificationHandlerInterface
final readonly class ActivityNotificationHandler implements NotificationHandlerInterface
{
public function __construct(private ActivityRepository $activityRepository)
{

View File

@@ -17,7 +17,7 @@ use Doctrine\ORM\EntityRepository;
class ActivityPresenceRepository implements ActivityPresenceRepositoryInterface
{
private EntityRepository $repository;
private readonly EntityRepository $repository;
public function __construct(EntityManagerInterface $entityManager)
{

View File

@@ -25,7 +25,7 @@ class ActivityReasonRepository extends ServiceEntityRepository
{
public function __construct(
ManagerRegistry $registry,
private RequestStack $requestStack
private readonly RequestStack $requestStack
) {
parent::__construct($registry, ActivityReason::class);
}

View File

@@ -21,7 +21,7 @@ use Doctrine\ORM\Query\Expr\Join;
final class ActivityTypeRepository implements ActivityTypeRepositoryInterface
{
private EntityRepository $repository;
private readonly EntityRepository $repository;
public function __construct(EntityManagerInterface $em)
{

View File

@@ -20,9 +20,9 @@ use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
class ActivityStatsVoter extends AbstractChillVoter implements ProvideRoleHierarchyInterface
{
public const LISTS = 'CHILL_ACTIVITY_LIST';
final public const LISTS = 'CHILL_ACTIVITY_LIST';
public const STATS = 'CHILL_ACTIVITY_STATS';
final public const STATS = 'CHILL_ACTIVITY_STATS';
protected VoterHelperInterface $helper;

View File

@@ -35,7 +35,7 @@ class ActivityVoter extends AbstractChillVoter implements ProvideRoleHierarchyIn
*
* It is safe for usage in template and controller
*/
public const CREATE = 'CHILL_ACTIVITY_CREATE';
final public const CREATE = 'CHILL_ACTIVITY_CREATE';
/**
* role to allow to create an activity associated win an accompanying course.
@@ -44,7 +44,7 @@ class ActivityVoter extends AbstractChillVoter implements ProvideRoleHierarchyIn
*
* @internal
*/
public const CREATE_ACCOMPANYING_COURSE = 'CHILL_ACTIVITY_CREATE_ACCOMPANYING_COURSE';
final public const CREATE_ACCOMPANYING_COURSE = 'CHILL_ACTIVITY_CREATE_ACCOMPANYING_COURSE';
/**
* role to allow to create an activity associated with a person.
@@ -53,17 +53,17 @@ class ActivityVoter extends AbstractChillVoter implements ProvideRoleHierarchyIn
*
* @internal
*/
public const CREATE_PERSON = 'CHILL_ACTIVITY_CREATE_PERSON';
final public const CREATE_PERSON = 'CHILL_ACTIVITY_CREATE_PERSON';
public const DELETE = 'CHILL_ACTIVITY_DELETE';
final public const DELETE = 'CHILL_ACTIVITY_DELETE';
public const FULL = 'CHILL_ACTIVITY_FULL';
final public const FULL = 'CHILL_ACTIVITY_FULL';
public const SEE = 'CHILL_ACTIVITY_SEE';
final public const SEE = 'CHILL_ACTIVITY_SEE';
public const SEE_DETAILS = 'CHILL_ACTIVITY_SEE_DETAILS';
final public const SEE_DETAILS = 'CHILL_ACTIVITY_SEE_DETAILS';
public const UPDATE = 'CHILL_ACTIVITY_UPDATE';
final public const UPDATE = 'CHILL_ACTIVITY_UPDATE';
private const ALL = [
self::CREATE,

View File

@@ -43,15 +43,15 @@ class ActivityContext implements
DocGeneratorContextWithPublicFormInterface
{
public function __construct(
private NormalizerInterface $normalizer,
private TranslatableStringHelperInterface $translatableStringHelper,
private EntityManagerInterface $em,
private PersonRenderInterface $personRender,
private PersonRepository $personRepository,
private TranslatorInterface $translator,
private BaseContextData $baseContextData,
private ThirdPartyRender $thirdPartyRender,
private ThirdPartyRepository $thirdPartyRepository
private readonly NormalizerInterface $normalizer,
private readonly TranslatableStringHelperInterface $translatableStringHelper,
private readonly EntityManagerInterface $em,
private readonly PersonRenderInterface $personRender,
private readonly PersonRepository $personRepository,
private readonly TranslatorInterface $translator,
private readonly BaseContextData $baseContextData,
private readonly ThirdPartyRender $thirdPartyRender,
private readonly ThirdPartyRepository $thirdPartyRepository
) {
}

View File

@@ -48,8 +48,17 @@ class ListActivitiesByAccompanyingPeriodContext implements
DocGeneratorContextWithAdminFormInterface,
DocGeneratorContextWithPublicFormInterface
{
public function __construct(private AccompanyingPeriodContext $accompanyingPeriodContext, private ActivityACLAwareRepositoryInterface $activityACLAwareRepository, private NormalizerInterface $normalizer, private PersonRepository $personRepository, private SocialActionRepository $socialActionRepository, private SocialIssueRepository $socialIssueRepository, private ThirdPartyRepository $thirdPartyRepository, private TranslatableStringHelperInterface $translatableStringHelper, private UserRepository $userRepository)
{
public function __construct(
private readonly AccompanyingPeriodContext $accompanyingPeriodContext,
private readonly ActivityACLAwareRepositoryInterface $activityACLAwareRepository,
private readonly NormalizerInterface $normalizer,
private readonly PersonRepository $personRepository,
private readonly SocialActionRepository $socialActionRepository,
private readonly SocialIssueRepository $socialIssueRepository,
private readonly ThirdPartyRepository $thirdPartyRepository,
private readonly TranslatableStringHelperInterface $translatableStringHelper,
private readonly UserRepository $userRepository
) {
}
public function adminFormReverseTransform(array $data): array

View File

@@ -28,7 +28,7 @@ use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\Mapping\MappingException;
use Symfony\Component\Security\Core\Security;
final class AccompanyingPeriodActivityGenericDocProvider implements GenericDocForAccompanyingPeriodProviderInterface, GenericDocForPersonProviderInterface
final readonly class AccompanyingPeriodActivityGenericDocProvider implements GenericDocForAccompanyingPeriodProviderInterface, GenericDocForPersonProviderInterface
{
public const KEY = 'accompanying_period_activity_document';

View File

@@ -19,7 +19,7 @@ use Chill\DocStoreBundle\GenericDoc\Twig\GenericDocRendererInterface;
use Chill\DocStoreBundle\Repository\StoredObjectRepository;
use Chill\PersonBundle\Entity\AccompanyingPeriod;
final class AccompanyingPeriodActivityGenericDocRenderer implements GenericDocRendererInterface
final readonly class AccompanyingPeriodActivityGenericDocRenderer implements GenericDocRendererInterface
{
public function __construct(private StoredObjectRepository $objectRepository, private ActivityRepository $activityRepository)
{

View File

@@ -214,7 +214,7 @@ final class ActivityControllerTest extends WebTestCase
->setName('social without activity');
//copy role scopes where ACTIVITY is not present
foreach ($socialPermissionGroup->getRoleScopes() as $roleScope) {
if (!strpos($roleScope->getRole(), 'ACTIVITY')) {
if (!strpos((string) $roleScope->getRole(), 'ACTIVITY')) {
$withoutActivityPermissionGroup->addRoleScope($roleScope);
}
}

View File

@@ -19,7 +19,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
*/
final class ActivityReasonCategoryControllerTest extends WebTestCase
{
public function testToWrite()
public function testToWrite(): never
{
$this->markTestSkipped();
}

View File

@@ -19,7 +19,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
*/
final class ActivityReasonControllerTest extends WebTestCase
{
public function testToWrite()
public function testToWrite(): never
{
$this->markTestSkipped();
}

View File

@@ -19,7 +19,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
*/
final class ActivityTypeControllerTest extends WebTestCase
{
public function testToWrite()
public function testToWrite(): never
{
$this->markTestSkipped();
}

View File

@@ -34,7 +34,7 @@ final class TranslatableActivityReasonTest extends TypeTestCase
parent::setUp();
}
public function testSimple()
public function testSimple(): never
{
$translatableActivityReasonType = new PickActivityReasonType(
$this->getTranslatableStringHelper()

View File

@@ -19,7 +19,7 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
*/
final class TimelineProviderTest extends WebTestCase
{
public function testAnActivityIsShownOnTimeline()
public function testAnActivityIsShownOnTimeline(): never
{
$this->markTestSkipped('we have to write fixtures before writing this tests');
}

View File

@@ -18,9 +18,9 @@ use Symfony\Component\Validator\Constraint;
*/
class ActivityValidity extends Constraint
{
public const IS_REQUIRED_MESSAGE = ' is required';
final public const IS_REQUIRED_MESSAGE = ' is required';
public const ROOT_MESSAGE = 'For this type of activity, ';
final public const ROOT_MESSAGE = 'For this type of activity, ';
public $noPersonsMessage = 'For this type of activity, you must add at least one person';