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

@@ -21,7 +21,7 @@ use Doctrine\Persistence\ObjectManager;
*/
class LoadAccompanyingPeriodOrigin extends AbstractFixture implements OrderedFixtureInterface
{
public const ACCOMPANYING_PERIOD_ORIGIN = 'accompanying_period_origin';
final public const ACCOMPANYING_PERIOD_ORIGIN = 'accompanying_period_origin';
public static $references = [];

View File

@@ -31,7 +31,7 @@ class LoadAccompanyingPeriodWork extends \Doctrine\Bundle\FixturesBundle\Fixture
*/
private array $cacheEvaluations = [];
public function __construct(private AccompanyingPeriodRepository $periodRepository, private EvaluationRepository $evaluationRepository)
public function __construct(private readonly AccompanyingPeriodRepository $periodRepository, private readonly EvaluationRepository $evaluationRepository)
{
}

View File

@@ -49,7 +49,7 @@ class LoadCustomFields extends AbstractFixture implements
/**
* LoadCustomFields constructor.
*/
public function __construct(private TranslatableStringHelper $translatableStringHelper, private TranslatorInterface $translator)
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, private readonly TranslatorInterface $translator)
{
}

View File

@@ -37,11 +37,11 @@ class LoadHousehold extends Fixture implements DependentFixtureInterface
{
private const NUMBER_OF_HOUSEHOLD = 10;
private NativeLoader $loader;
private readonly NativeLoader $loader;
private array $personIds;
public function __construct(private MembersEditorFactory $editorFactory, private EntityManagerInterface $em)
public function __construct(private readonly MembersEditorFactory $editorFactory, private readonly EntityManagerInterface $em)
{
$this->loader = new NativeLoader();
}

View File

@@ -18,7 +18,7 @@ use Doctrine\Persistence\ObjectManager;
class LoadHouseholdCompositionType extends AbstractFixture implements FixtureGroupInterface
{
public const TYPES = [
final public const TYPES = [
['fr' => 'Couple avec enfant(s)'],
['fr' => 'Couple sans enfant'],
['fr' => 'Mère seule'],

View File

@@ -17,13 +17,13 @@ use Doctrine\Persistence\ObjectManager;
class LoadHouseholdPosition extends Fixture
{
public const ADULT = 'position_adulte';
final public const ADULT = 'position_adulte';
public const CHILD = 'position_enfant';
final public const CHILD = 'position_enfant';
public const CHILD_OUT = 'position_enfant_hors';
final public const CHILD_OUT = 'position_enfant_hors';
public const POSITIONS_DATA = [
final public const POSITIONS_DATA = [
['Adulte', true, true, 1.0, self::ADULT],
['Enfant', true, false, 2.0, self::CHILD],
['Enfant hors ménage', false, false, 3.0, self::CHILD_OUT],

View File

@@ -54,7 +54,7 @@ class LoadPeople extends AbstractFixture implements ContainerAwareInterface, Ord
{
use \Symfony\Component\DependencyInjection\ContainerAwareTrait;
public const PERSON = 'person';
final public const PERSON = 'person';
/**
* @var array|Center[]

View File

@@ -18,9 +18,9 @@ use Doctrine\Persistence\ObjectManager;
class LoadRelations extends Fixture implements FixtureGroupInterface
{
public const RELATION_KEY = 'relations';
final public const RELATION_KEY = 'relations';
public const RELATIONS = [
final public const RELATIONS = [
['title' => ['fr' => 'Parent'], 'reverseTitle' => ['fr' => 'Enfant']],
['title' => ['fr' => 'En couple'], 'reverseTitle' => ['fr' => 'En couple']],
['title' => ['fr' => 'Beau parent'], 'reverseTitle' => ['fr' => 'Belle-fille·beau-fils']],

View File

@@ -28,7 +28,7 @@ class LoadRelationships extends Fixture implements DependentFixtureInterface
{
use PersonRandomHelper;
public function __construct(private EntityManagerInterface $em)
public function __construct(private readonly EntityManagerInterface $em)
{
}

View File

@@ -21,7 +21,7 @@ use Throwable;
class LoadSocialWorkMetadata extends Fixture implements OrderedFixtureInterface
{
public function __construct(private SocialWorkMetadata $importer)
public function __construct(private readonly SocialWorkMetadata $importer)
{
}