mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Merge branch 'rector/rules-up-to-php82' into rector/rules-symfony
This commit is contained in:
@@ -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
|
||||
|
@@ -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];
|
||||
}
|
||||
|
Reference in New Issue
Block a user