fix small risky code

This commit is contained in:
2023-07-19 16:28:51 +02:00
parent 075aca493b
commit 6e6f19c499
4 changed files with 7 additions and 19 deletions

View File

@@ -95,10 +95,8 @@ class CustomFieldsGroup
/**
* Get all the custom.
*
* @return Collection
*/
public function getActiveCustomFields()
public function getActiveCustomFields(): array
{
if (null === $this->activeCustomFields) {
$this->activeCustomFields = [];
@@ -143,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];
}