mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-03-15 10:27:47 +00:00
apply rules rector up to php82
This commit is contained in:
@@ -32,15 +32,15 @@ use function LogicException;
|
||||
|
||||
class CustomFieldChoice extends AbstractCustomField
|
||||
{
|
||||
public const ALLOW_OTHER = 'other';
|
||||
final public const ALLOW_OTHER = 'other';
|
||||
|
||||
public const CHOICES = 'choices';
|
||||
final public const CHOICES = 'choices';
|
||||
|
||||
public const EXPANDED = 'expanded';
|
||||
final public const EXPANDED = 'expanded';
|
||||
|
||||
public const MULTIPLE = 'multiple';
|
||||
final public const MULTIPLE = 'multiple';
|
||||
|
||||
public const OTHER_VALUE_LABEL = 'otherValueLabel';
|
||||
final public const OTHER_VALUE_LABEL = 'otherValueLabel';
|
||||
|
||||
private $defaultLocales;
|
||||
|
||||
@@ -49,11 +49,11 @@ class CustomFieldChoice extends AbstractCustomField
|
||||
*/
|
||||
public function __construct(
|
||||
TranslatorInterface $translator,
|
||||
private TwigEngine $templating,
|
||||
private readonly TwigEngine $templating,
|
||||
/**
|
||||
* @var TranslatableStringHelper Helper that find the string in current locale from an array of translation
|
||||
*/
|
||||
private TranslatableStringHelper $translatableStringHelper
|
||||
private readonly TranslatableStringHelper $translatableStringHelper
|
||||
) {
|
||||
$this->defaultLocales = $translator->getFallbackLocales();
|
||||
}
|
||||
|
||||
@@ -33,18 +33,18 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
*/
|
||||
class CustomFieldDate extends AbstractCustomField
|
||||
{
|
||||
public const DATE_FORMAT = DateTime::RFC3339;
|
||||
final public const DATE_FORMAT = DateTime::RFC3339;
|
||||
|
||||
public const FORMAT = 'format';
|
||||
final public const FORMAT = 'format';
|
||||
|
||||
public const MAX = 'max';
|
||||
final public const MAX = 'max';
|
||||
|
||||
/**
|
||||
* key for the minimal value of the field.
|
||||
*/
|
||||
public const MIN = 'min';
|
||||
final public const MIN = 'min';
|
||||
|
||||
public function __construct(private TwigEngine $templating, private TranslatableStringHelper $translatableStringHelper)
|
||||
public function __construct(private readonly TwigEngine $templating, private readonly TranslatableStringHelper $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -30,12 +30,12 @@ use function is_object;
|
||||
|
||||
class CustomFieldLongChoice extends AbstractCustomField
|
||||
{
|
||||
public const KEY = 'key';
|
||||
final public const KEY = 'key';
|
||||
|
||||
public function __construct(
|
||||
private OptionRepository $optionRepository,
|
||||
private TranslatableStringHelper $translatableStringHelper,
|
||||
private EngineInterface $templating,
|
||||
private readonly OptionRepository $optionRepository,
|
||||
private readonly TranslatableStringHelper $translatableStringHelper,
|
||||
private readonly EngineInterface $templating,
|
||||
) {
|
||||
}
|
||||
|
||||
|
||||
@@ -28,18 +28,18 @@ use Symfony\Component\Validator\Constraints\LessThanOrEqual;
|
||||
*/
|
||||
class CustomFieldNumber extends AbstractCustomField
|
||||
{
|
||||
public const MAX = 'max';
|
||||
final public const MAX = 'max';
|
||||
|
||||
/**
|
||||
* key for the minimal value of the field.
|
||||
*/
|
||||
public const MIN = 'min';
|
||||
final public const MIN = 'min';
|
||||
|
||||
public const POST_TEXT = 'post_text';
|
||||
final public const POST_TEXT = 'post_text';
|
||||
|
||||
public const SCALE = 'scale';
|
||||
final public const SCALE = 'scale';
|
||||
|
||||
public function __construct(private TwigEngine $templating, private TranslatableStringHelper $translatableStringHelper)
|
||||
public function __construct(private readonly TwigEngine $templating, private readonly TranslatableStringHelper $translatableStringHelper)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -25,17 +25,17 @@ use function array_key_exists;
|
||||
|
||||
class CustomFieldText extends AbstractCustomField
|
||||
{
|
||||
public const MAX_LENGTH = 'maxLength';
|
||||
final public const MAX_LENGTH = 'maxLength';
|
||||
|
||||
public const MULTIPLE_CF_INLINE = 'multipleCFInline';
|
||||
final public const MULTIPLE_CF_INLINE = 'multipleCFInline';
|
||||
|
||||
public function __construct(
|
||||
private RequestStack $requestStack,
|
||||
private TwigEngine $templating,
|
||||
private readonly RequestStack $requestStack,
|
||||
private readonly TwigEngine $templating,
|
||||
/**
|
||||
* @var TranslatableStringHelper Helper that find the string in current locale from an array of translation
|
||||
*/
|
||||
private TranslatableStringHelper $translatableStringHelper
|
||||
private readonly TranslatableStringHelper $translatableStringHelper
|
||||
) {
|
||||
}
|
||||
|
||||
|
||||
@@ -21,19 +21,19 @@ use Symfony\Component\HttpFoundation\RequestStack;
|
||||
|
||||
class CustomFieldTitle extends AbstractCustomField
|
||||
{
|
||||
public const TYPE = 'type';
|
||||
final public const TYPE = 'type';
|
||||
|
||||
public const TYPE_SUBTITLE = 'subtitle';
|
||||
final public const TYPE_SUBTITLE = 'subtitle';
|
||||
|
||||
public const TYPE_TITLE = 'title';
|
||||
final public const TYPE_TITLE = 'title';
|
||||
|
||||
public function __construct(
|
||||
private RequestStack $requestStack,
|
||||
private TwigEngine $templating,
|
||||
private readonly RequestStack $requestStack,
|
||||
private readonly TwigEngine $templating,
|
||||
/**
|
||||
* @var TranslatableStringHelper Helper that find the string in current locale from an array of translation
|
||||
*/
|
||||
private TranslatableStringHelper $translatableStringHelper
|
||||
private readonly TranslatableStringHelper $translatableStringHelper
|
||||
) {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user