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

@@ -28,9 +28,9 @@ use function trim;
final class AddressReferenceRepository implements ObjectRepository
{
private EntityManagerInterface $entityManager;
private readonly EntityManagerInterface $entityManager;
private EntityRepository $repository;
private readonly EntityRepository $repository;
public function __construct(EntityManagerInterface $entityManager)
{

View File

@@ -19,7 +19,7 @@ use Doctrine\Persistence\ObjectRepository;
final class AddressRepository implements ObjectRepository
{
private EntityRepository $repository;
private readonly EntityRepository $repository;
public function __construct(EntityManagerInterface $entityManager)
{

View File

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

View File

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

View File

@@ -19,7 +19,7 @@ use Doctrine\Persistence\ObjectRepository;
final class CountryRepository implements ObjectRepository
{
private EntityRepository $repository;
private readonly EntityRepository $repository;
public function __construct(EntityManagerInterface $entityManager)
{

View File

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

View File

@@ -17,7 +17,7 @@ use Doctrine\ORM\EntityRepository;
final class GeographicalUnitLayerLayerRepository implements GeographicalUnitLayerRepositoryInterface
{
private EntityRepository $repository;
private readonly EntityRepository $repository;
public function __construct(EntityManagerInterface $em)
{

View File

@@ -20,7 +20,7 @@ use Doctrine\ORM\QueryBuilder;
final class GeographicalUnitRepository implements GeographicalUnitRepositoryInterface
{
private EntityRepository $repository;
private readonly EntityRepository $repository;
public function __construct(EntityManagerInterface $em)
{

View File

@@ -18,7 +18,7 @@ use Doctrine\Persistence\ObjectRepository;
final class GroupCenterRepository implements ObjectRepository
{
private EntityRepository $repository;
private readonly EntityRepository $repository;
public function __construct(EntityManagerInterface $entityManager)
{

View File

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

View File

@@ -25,7 +25,7 @@ final class NotificationRepository implements ObjectRepository
{
private ?Statement $notificationByRelatedEntityAndUserAssociatedStatement = null;
private EntityRepository $repository;
private readonly EntityRepository $repository;
private const BASE_COUNTER_SQL = <<<'SQL'
SELECT
@@ -36,7 +36,7 @@ final class NotificationRepository implements ObjectRepository
SQL;
public function __construct(private EntityManagerInterface $em)
public function __construct(private readonly EntityManagerInterface $em)
{
$this->repository = $em->getRepository(Notification::class);
}

View File

@@ -18,7 +18,7 @@ use Doctrine\Persistence\ObjectRepository;
final class PermissionsGroupRepository implements ObjectRepository
{
private EntityRepository $repository;
private readonly EntityRepository $repository;
public function __construct(EntityManagerInterface $entityManager)
{

View File

@@ -22,9 +22,9 @@ use RuntimeException;
final class PostalCodeRepository implements PostalCodeRepositoryInterface
{
private EntityManagerInterface $entityManager;
private readonly EntityManagerInterface $entityManager;
private EntityRepository $repository;
private readonly EntityRepository $repository;
public function __construct(EntityManagerInterface $entityManager)
{

View File

@@ -20,7 +20,7 @@ use Doctrine\Persistence\ObjectRepository;
final class RegroupmentRepository implements ObjectRepository
{
private EntityRepository $repository;
private readonly EntityRepository $repository;
public function __construct(EntityManagerInterface $entityManager)
{

View File

@@ -18,7 +18,7 @@ use Doctrine\Persistence\ObjectRepository;
final class RoleScopeRepository implements ObjectRepository
{
private EntityRepository $repository;
private readonly EntityRepository $repository;
public function __construct(EntityManagerInterface $entityManager)
{

View File

@@ -22,7 +22,7 @@ use Doctrine\Persistence\ObjectRepository;
*/
class SavedExportRepository implements SavedExportRepositoryInterface
{
private EntityRepository $repository;
private readonly EntityRepository $repository;
public function __construct(EntityManagerInterface $entityManager)
{

View File

@@ -18,7 +18,7 @@ use Doctrine\ORM\QueryBuilder;
final class ScopeRepository implements ScopeRepositoryInterface
{
private EntityRepository $repository;
private readonly EntityRepository $repository;
public function __construct(EntityManagerInterface $entityManager)
{

View File

@@ -19,7 +19,7 @@ use Doctrine\ORM\EntityManagerInterface;
class UserACLAwareRepository implements UserACLAwareRepositoryInterface
{
public function __construct(private ParentRoleHelper $parentRoleHelper, private EntityManagerInterface $em)
public function __construct(private readonly ParentRoleHelper $parentRoleHelper, private readonly EntityManagerInterface $em)
{
}

View File

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

View File

@@ -23,7 +23,7 @@ use Doctrine\ORM\QueryBuilder;
use function count;
final class UserRepository implements UserRepositoryInterface
final readonly class UserRepository implements UserRepositoryInterface
{
private EntityRepository $repository;

View File

@@ -73,5 +73,5 @@ interface UserRepositoryInterface extends ObjectRepository
* @param \Chill\MainBundle\Entity\User[] $amongstUsers
* @param mixed $flag
*/
public function findUsersHavingFlags($flag, array $amongstUsers = []): array;
public function findUsersHavingFlags(mixed $flag, array $amongstUsers = []): array;
}

View File

@@ -20,7 +20,7 @@ use Doctrine\Persistence\ObjectRepository;
class EntityWorkflowRepository implements ObjectRepository
{
private EntityRepository $repository;
private readonly EntityRepository $repository;
public function __construct(EntityManagerInterface $entityManager)
{

View File

@@ -20,7 +20,7 @@ use Doctrine\Persistence\ObjectRepository;
class EntityWorkflowStepRepository implements ObjectRepository
{
private EntityRepository $repository;
private readonly EntityRepository $repository;
public function __construct(EntityManagerInterface $entityManager)
{