diff --git a/src/Bridge/Symfony/Bundle/SonataFormBundle.php b/src/Bridge/Symfony/Bundle/SonataFormBundle.php index d1ceceae..80d515b4 100644 --- a/src/Bridge/Symfony/Bundle/SonataFormBundle.php +++ b/src/Bridge/Symfony/Bundle/SonataFormBundle.php @@ -21,18 +21,12 @@ */ final class SonataFormBundle extends Bundle { - /** - * @return string - */ - public function getPath() + public function getPath(): string { return __DIR__.'/..'; } - /** - * @return string - */ - protected function getContainerExtensionClass() + protected function getContainerExtensionClass(): string { return SonataFormExtension::class; } diff --git a/src/Bridge/Symfony/Resources/config/form_types.php b/src/Bridge/Symfony/Resources/config/form_types.php index 46f55204..0626e1e8 100644 --- a/src/Bridge/Symfony/Resources/config/form_types.php +++ b/src/Bridge/Symfony/Resources/config/form_types.php @@ -37,7 +37,7 @@ ]; } - return [$message]; + return [$message, '', '']; }; // Use "service" function for creating references to services when dropping support for Symfony 4.4 diff --git a/src/Type/BaseDoctrineORMSerializationType.php b/src/Type/BaseDoctrineORMSerializationType.php index e5567676..d84f2533 100644 --- a/src/Type/BaseDoctrineORMSerializationType.php +++ b/src/Type/BaseDoctrineORMSerializationType.php @@ -125,7 +125,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void continue; } - if (!\in_array($this->group, $propertyMetadata->groups, true)) { + if (!isset($propertyMetadata->groups) || !\in_array($this->group, $propertyMetadata->groups, true)) { continue; } diff --git a/src/Type/BasePickerType.php b/src/Type/BasePickerType.php index 31a99400..c997f62b 100644 --- a/src/Type/BasePickerType.php +++ b/src/Type/BasePickerType.php @@ -152,6 +152,9 @@ public function getLocale(): string return $this->locale; } + /** + * @param string $locale + */ public function setLocale($locale): void { $this->locale = $locale; diff --git a/src/Validator/InlineValidator.php b/src/Validator/InlineValidator.php index b5106764..d9b6c6ab 100755 --- a/src/Validator/InlineValidator.php +++ b/src/Validator/InlineValidator.php @@ -43,6 +43,9 @@ public function __construct( $this->constraintValidatorFactory = $constraintValidatorFactory; } + /** + * @param mixed $value + */ public function validate($value, Constraint $constraint): void { if (!$constraint instanceof InlineConstraint) {