mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
apply rules rector up to php82
This commit is contained in:
@@ -32,7 +32,7 @@ use function array_merge;
|
||||
|
||||
final class ThirdPartyController extends CRUDController
|
||||
{
|
||||
private bool $askCenter;
|
||||
private readonly bool $askCenter;
|
||||
|
||||
public function __construct(
|
||||
protected AuthorizationHelper $authorizationHelper,
|
||||
|
@@ -30,7 +30,7 @@ use function count;
|
||||
|
||||
class LoadThirdParty extends Fixture implements DependentFixtureInterface
|
||||
{
|
||||
private PhoneNumberUtil $phoneNumberUtil;
|
||||
private readonly PhoneNumberUtil $phoneNumberUtil;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
|
@@ -25,7 +25,7 @@ use function in_array;
|
||||
*/
|
||||
class ThirdPartyTypeCompilerPass implements CompilerPassInterface
|
||||
{
|
||||
public const TAG = 'chill_3party.provider';
|
||||
final public const TAG = 'chill_3party.provider';
|
||||
|
||||
public function process(ContainerBuilder $container)
|
||||
{
|
||||
|
@@ -90,11 +90,11 @@ use function spl_object_hash;
|
||||
*/
|
||||
class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Stringable
|
||||
{
|
||||
public const KIND_CHILD = 'child';
|
||||
final public const KIND_CHILD = 'child';
|
||||
|
||||
public const KIND_COMPANY = 'company';
|
||||
final public const KIND_COMPANY = 'company';
|
||||
|
||||
public const KIND_CONTACT = 'contact';
|
||||
final public const KIND_CONTACT = 'contact';
|
||||
|
||||
/**
|
||||
* [fr] Sigle.
|
||||
|
@@ -18,7 +18,7 @@ use const SORT_NUMERIC;
|
||||
|
||||
class LabelThirdPartyHelper
|
||||
{
|
||||
public function __construct(private ThirdPartyRender $thirdPartyRender, private ThirdPartyRepository $thirdPartyRepository)
|
||||
public function __construct(private readonly ThirdPartyRender $thirdPartyRender, private readonly ThirdPartyRepository $thirdPartyRepository)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -38,7 +38,7 @@ use function array_key_exists;
|
||||
|
||||
class ThirdPartyType extends AbstractType
|
||||
{
|
||||
private bool $askCenter;
|
||||
private readonly bool $askCenter;
|
||||
|
||||
public function __construct(
|
||||
protected AuthorizationHelper $authorizationHelper,
|
||||
|
@@ -30,7 +30,7 @@ class PickThirdPartyTypeCategoryType extends \Symfony\Component\Form\AbstractTyp
|
||||
{
|
||||
private const PREFIX_TYPE = 'chill_3party.key_label.';
|
||||
|
||||
public function __construct(private ThirdPartyCategoryRepository $thirdPartyCategoryRepository, private ThirdPartyTypeManager $thirdPartyTypeManager, private TranslatableStringHelper $translatableStringHelper, private TranslatorInterface $translator)
|
||||
public function __construct(private readonly ThirdPartyCategoryRepository $thirdPartyCategoryRepository, private readonly ThirdPartyTypeManager $thirdPartyTypeManager, private readonly TranslatableStringHelper $translatableStringHelper, private readonly TranslatorInterface $translator)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@ use Symfony\Component\Serializer\SerializerInterface;
|
||||
*/
|
||||
class PickThirdpartyDynamicType extends AbstractType
|
||||
{
|
||||
public function __construct(private DenormalizerInterface $denormalizer, private SerializerInterface $serializer, private NormalizerInterface $normalizer)
|
||||
public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly SerializerInterface $serializer, private readonly NormalizerInterface $normalizer)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -15,7 +15,7 @@ use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
||||
use Doctrine\ORM\QueryBuilder;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
|
||||
final class ThirdPartyACLAwareRepository implements ThirdPartyACLAwareRepositoryInterface
|
||||
final readonly class ThirdPartyACLAwareRepository implements ThirdPartyACLAwareRepositoryInterface
|
||||
{
|
||||
public function __construct(private Security $security, private AuthorizationHelper $authorizationHelper, private ThirdPartyRepository $thirdPartyRepository)
|
||||
{
|
||||
|
@@ -23,7 +23,7 @@ use function array_key_exists;
|
||||
|
||||
final class ThirdPartyRepository implements ObjectRepository
|
||||
{
|
||||
private EntityRepository $repository;
|
||||
private readonly EntityRepository $repository;
|
||||
|
||||
public function __construct(EntityManagerInterface $em)
|
||||
{
|
||||
|
@@ -49,7 +49,7 @@ FROM rows, searches
|
||||
*/
|
||||
class ThirdPartyApiSearch implements SearchApiInterface
|
||||
{
|
||||
public function __construct(private ThirdPartyRepository $thirdPartyRepository)
|
||||
public function __construct(private readonly ThirdPartyRepository $thirdPartyRepository)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@ use Symfony\Component\Security\Core\Role\Role;
|
||||
*/
|
||||
class ThirdPartySearch implements SearchInterface
|
||||
{
|
||||
public const NAME = '3party';
|
||||
final public const NAME = '3party';
|
||||
|
||||
/**
|
||||
* @var AuthorizationHelper
|
||||
@@ -53,7 +53,7 @@ class ThirdPartySearch implements SearchInterface
|
||||
TokenStorageInterface $tokenStorage,
|
||||
AuthorizationHelper $authorizationHelper,
|
||||
PaginatorFactory $paginatorFactory,
|
||||
private ThirdPartyRepository $thirdPartyRepository
|
||||
private readonly ThirdPartyRepository $thirdPartyRepository
|
||||
) {
|
||||
$this->em = $em;
|
||||
$this->tokenStorage = $tokenStorage;
|
||||
|
@@ -28,11 +28,11 @@ use function in_array;
|
||||
*/
|
||||
class ThirdPartyVoter extends AbstractChillVoter implements ProvideRoleHierarchyInterface
|
||||
{
|
||||
public const CREATE = 'CHILL_3PARTY_3PARTY_CREATE';
|
||||
final public const CREATE = 'CHILL_3PARTY_3PARTY_CREATE';
|
||||
|
||||
public const SHOW = 'CHILL_3PARTY_3PARTY_SHOW';
|
||||
final public const SHOW = 'CHILL_3PARTY_3PARTY_SHOW';
|
||||
|
||||
public const UPDATE = 'CHILL_3PARTY_3PARTY_UPDATE';
|
||||
final public const UPDATE = 'CHILL_3PARTY_3PARTY_UPDATE';
|
||||
|
||||
/**
|
||||
* @var AuthorizationHelper
|
||||
|
@@ -24,7 +24,7 @@ class ThirdPartyNormalizer implements NormalizerAwareInterface, NormalizerInterf
|
||||
{
|
||||
use NormalizerAwareTrait;
|
||||
|
||||
public function __construct(private ThirdPartyRender $thirdPartyRender, private TranslatableStringHelperInterface $translatableStringHelper)
|
||||
public function __construct(private readonly ThirdPartyRender $thirdPartyRender, private readonly TranslatableStringHelperInterface $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -21,7 +21,7 @@ class ThirdPartyTypeManager
|
||||
/**
|
||||
* The prefix used to translate the key of provider.
|
||||
*/
|
||||
public const THIRD_PARTY_TRANSLATOR_KEY = 'chill_3party.key_label.';
|
||||
final public const THIRD_PARTY_TRANSLATOR_KEY = 'chill_3party.key_label.';
|
||||
|
||||
/**
|
||||
* @var ThirdPartyTypeProviderInterface[]
|
||||
|
Reference in New Issue
Block a user