mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
DX: apply rector rules up to php8.0
This commit is contained in:
@@ -31,16 +31,8 @@ class LoadAccompanyingPeriodWork extends \Doctrine\Bundle\FixturesBundle\Fixture
|
||||
*/
|
||||
private array $cacheEvaluations = [];
|
||||
|
||||
private EvaluationRepository $evaluationRepository;
|
||||
|
||||
private AccompanyingPeriodRepository $periodRepository;
|
||||
|
||||
public function __construct(
|
||||
AccompanyingPeriodRepository $periodRepository,
|
||||
EvaluationRepository $evaluationRepository
|
||||
) {
|
||||
$this->periodRepository = $periodRepository;
|
||||
$this->evaluationRepository = $evaluationRepository;
|
||||
public function __construct(private AccompanyingPeriodRepository $periodRepository, private EvaluationRepository $evaluationRepository)
|
||||
{
|
||||
}
|
||||
|
||||
public function getDependencies()
|
||||
|
@@ -46,25 +46,11 @@ class LoadCustomFields extends AbstractFixture implements
|
||||
*/
|
||||
private $customFieldText;
|
||||
|
||||
/**
|
||||
* @var TranslatableStringHelper
|
||||
*/
|
||||
private $translatableStringHelper;
|
||||
|
||||
/**
|
||||
* @var TranslatorInterface
|
||||
*/
|
||||
private $translator;
|
||||
|
||||
/**
|
||||
* LoadCustomFields constructor.
|
||||
*/
|
||||
public function __construct(
|
||||
TranslatableStringHelper $translatableStringHelper,
|
||||
TranslatorInterface $translator
|
||||
) {
|
||||
$this->translatableStringHelper = $translatableStringHelper;
|
||||
$this->translator = $translator;
|
||||
public function __construct(private TranslatableStringHelper $translatableStringHelper, private TranslatorInterface $translator)
|
||||
{
|
||||
}
|
||||
|
||||
//put your code here
|
||||
|
@@ -37,18 +37,12 @@ class LoadHousehold extends Fixture implements DependentFixtureInterface
|
||||
{
|
||||
private const NUMBER_OF_HOUSEHOLD = 10;
|
||||
|
||||
private MembersEditorFactory $editorFactory;
|
||||
|
||||
private EntityManagerInterface $em;
|
||||
|
||||
private NativeLoader $loader;
|
||||
|
||||
private array $personIds;
|
||||
|
||||
public function __construct(MembersEditorFactory $editorFactory, EntityManagerInterface $em)
|
||||
public function __construct(private MembersEditorFactory $editorFactory, private EntityManagerInterface $em)
|
||||
{
|
||||
$this->editorFactory = $editorFactory;
|
||||
$this->em = $em;
|
||||
$this->loader = new NativeLoader();
|
||||
}
|
||||
|
||||
|
@@ -86,24 +86,10 @@ class LoadPeople extends AbstractFixture implements ContainerAwareInterface, Ord
|
||||
*/
|
||||
protected array $cacheUsers = [];
|
||||
|
||||
protected CenterRepository $centerRepository;
|
||||
|
||||
protected CountryRepository $countryRepository;
|
||||
|
||||
protected Generator $faker;
|
||||
|
||||
protected NativeLoader $loader;
|
||||
|
||||
protected MaritalStatusRepository $maritalStatusRepository;
|
||||
|
||||
protected ScopeRepository $scopeRepository;
|
||||
|
||||
protected SocialIssueRepository $socialIssueRepository;
|
||||
|
||||
protected UserRepository $userRepository;
|
||||
|
||||
protected Registry $workflowRegistry;
|
||||
|
||||
private $genders = [Person::MALE_GENDER, Person::FEMALE_GENDER, Person::BOTH_GENDER];
|
||||
|
||||
private $peoples = [
|
||||
@@ -243,24 +229,17 @@ class LoadPeople extends AbstractFixture implements ContainerAwareInterface, Ord
|
||||
];
|
||||
|
||||
public function __construct(
|
||||
Registry $workflowRegistry,
|
||||
SocialIssueRepository $socialIssueRepository,
|
||||
CenterRepository $centerRepository,
|
||||
CountryRepository $countryRepository,
|
||||
MaritalStatusRepository $maritalStatusRepository,
|
||||
ScopeRepository $scopeRepository,
|
||||
UserRepository $userRepository
|
||||
protected Registry $workflowRegistry,
|
||||
protected SocialIssueRepository $socialIssueRepository,
|
||||
protected CenterRepository $centerRepository,
|
||||
protected CountryRepository $countryRepository,
|
||||
protected MaritalStatusRepository $maritalStatusRepository,
|
||||
protected ScopeRepository $scopeRepository,
|
||||
protected UserRepository $userRepository
|
||||
) {
|
||||
$this->faker = Factory::create('fr_FR');
|
||||
$this->faker->addProvider($this);
|
||||
$this->workflowRegistry = $workflowRegistry;
|
||||
$this->socialIssueRepository = $socialIssueRepository;
|
||||
$this->centerRepository = $centerRepository;
|
||||
$this->countryRepository = $countryRepository;
|
||||
$this->maritalStatusRepository = $maritalStatusRepository;
|
||||
$this->loader = new NativeLoader($this->faker);
|
||||
$this->scopeRepository = $scopeRepository;
|
||||
$this->userRepository = $userRepository;
|
||||
}
|
||||
|
||||
public function getOrder()
|
||||
|
@@ -28,11 +28,8 @@ class LoadRelationships extends Fixture implements DependentFixtureInterface
|
||||
{
|
||||
use PersonRandomHelper;
|
||||
|
||||
private EntityManagerInterface $em;
|
||||
|
||||
public function __construct(EntityManagerInterface $em)
|
||||
public function __construct(private EntityManagerInterface $em)
|
||||
{
|
||||
$this->em = $em;
|
||||
}
|
||||
|
||||
public function getDependencies(): array
|
||||
|
@@ -21,11 +21,8 @@ use Throwable;
|
||||
|
||||
class LoadSocialWorkMetadata extends Fixture implements OrderedFixtureInterface
|
||||
{
|
||||
private SocialWorkMetadata $importer;
|
||||
|
||||
public function __construct(SocialWorkMetadata $importer)
|
||||
public function __construct(private SocialWorkMetadata $importer)
|
||||
{
|
||||
$this->importer = $importer;
|
||||
}
|
||||
|
||||
public function getOrder()
|
||||
|
Reference in New Issue
Block a user