Fixed some deprecations.

This commit is contained in:
Jan Böhmer 2022-08-14 19:09:07 +02:00
parent 4fa8eef1bf
commit 5fd608f42a
59 changed files with 202 additions and 165 deletions

View file

@ -185,7 +185,7 @@ class AttachmentFormType extends AbstractType
]);
}
public function getBlockPrefix()
public function getBlockPrefix(): string
{
return 'attachment';
}

View file

@ -72,7 +72,7 @@ final class PermissionsMapper implements DataMapperInterface
* @param mixed $viewData View data of the compound form being initialized
* @param FormInterface[]|Traversable $forms A list of {@link FormInterface} instances
*/
public function mapDataToForms($viewData, $forms)
public function mapDataToForms($viewData, $forms): void
{
foreach ($forms as $form) {
if ($this->inherit) {

View file

@ -33,12 +33,12 @@ class BigDecimalMoneyType extends AbstractType implements DataTransformerInterfa
$builder->addModelTransformer($this);
}
public function getParent()
public function getParent(): string
{
return MoneyType::class;
}
public function transform($value)
public function transform($value): ?string
{
if (null === $value) {
return null;
@ -51,7 +51,7 @@ class BigDecimalMoneyType extends AbstractType implements DataTransformerInterfa
return $value;
}
public function reverseTransform($value)
public function reverseTransform($value): ?BigDecimal
{
if (null === $value) {
return null;

View file

@ -33,12 +33,12 @@ class BigDecimalNumberType extends AbstractType implements DataTransformerInterf
$builder->addModelTransformer($this);
}
public function getParent()
public function getParent(): string
{
return NumberType::class;
}
public function transform($value)
public function transform($value): ?string
{
if (null === $value) {
return null;
@ -51,7 +51,7 @@ class BigDecimalNumberType extends AbstractType implements DataTransformerInterf
return $value;
}
public function reverseTransform($value)
public function reverseTransform($value): ?BigDecimal
{
if (null === $value) {
return null;

View file

@ -96,7 +96,7 @@ class MasterPictureAttachmentType extends AbstractType
$resolver->setAllowedValues('filter', ['', 'picture', '3d_model']);
}
public function getParent()
public function getParent(): string
{
return ChoiceType::class;
}

View file

@ -21,7 +21,7 @@ class RichTextEditorType extends AbstractType
}
public function getBlockPrefix()
public function getBlockPrefix(): string
{
return 'rich_text_editor';
}
@ -33,7 +33,7 @@ class RichTextEditorType extends AbstractType
parent::finishView($view, $form, $options); // TODO: Change the autogenerated stub
}
protected function optionsToAttrArray(array $options)
protected function optionsToAttrArray(array $options): array
{
$tmp = [];
@ -49,7 +49,7 @@ class RichTextEditorType extends AbstractType
return $tmp;
}
public function getParent()
public function getParent(): string
{
return TextareaType::class;
}

View file

@ -176,7 +176,7 @@ final class SIUnitType extends AbstractType implements DataMapperInterface
*
* @throws Exception\UnexpectedTypeException if the type of the data parameter is not supported
*/
public function mapDataToForms($viewData, $forms)
public function mapDataToForms($viewData, $forms): void
{
$forms = iterator_to_array($forms);

View file

@ -148,7 +148,7 @@ class StructuralEntityType extends AbstractType
parent::buildView($view, $form, $options);
}
public function getParent()
public function getParent(): string
{
return ChoiceType::class;
}

View file

@ -68,7 +68,7 @@ final class TriStateCheckboxType extends AbstractType implements DataTransformer
]);
}
public function getBlockPrefix()
public function getBlockPrefix(): string
{
return 'tristate';
}