Merge branch 'rector/rules-up-to-php82' into rector/rules-symfony

This commit is contained in:
2023-07-19 23:22:57 +02:00
577 changed files with 18339 additions and 2168 deletions

View File

@@ -28,12 +28,12 @@ class Option
private $active = true;
/**
* @var Collection
* @var Collection<Option>
* @ORM\OneToMany(
* targetEntity="Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice\Option",
* mappedBy="parent")
*/
private $children;
private Collection $children;
/**
* @var int

View File

@@ -35,14 +35,13 @@ class CustomFieldsGroup
* The custom fields of the group.
* The custom fields are asc-ordered regarding to their property "ordering".
*
* @var Collection
*
* @var Collection<CustomField>
* @ORM\OneToMany(
* targetEntity="Chill\CustomFieldsBundle\Entity\CustomField",
* mappedBy="customFieldGroup")
* @ORM\OrderBy({"ordering": "ASC"})
*/
private $customFields;
private Collection $customFields;
/**
* @var string
@@ -96,10 +95,8 @@ class CustomFieldsGroup
/**
* Get all the custom.
*
* @return Collection
*/
public function getActiveCustomFields()
public function getActiveCustomFields(): array
{
if (null === $this->activeCustomFields) {
$this->activeCustomFields = [];
@@ -144,15 +141,11 @@ class CustomFieldsGroup
/**
* Get name.
*
* @param mixed|null $language
*
* @return array
*/
public function getName($language = null)
public function getName(?string $language = null): string|array
{
//TODO set this in a service, PLUS twig function
if ($language) {
if (null !== $language) {
if (isset($this->name[$language])) {
return $this->name[$language];
}