mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-23 16:13:50 +00:00
fix small risky code
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
Reference in New Issue
Block a user