mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-21 11:24:40 +02:00
Fixed some deprecations.
This commit is contained in:
parent
4fa8eef1bf
commit
5fd608f42a
59 changed files with 202 additions and 165 deletions
|
@ -185,7 +185,7 @@ class AttachmentFormType extends AbstractType
|
|||
]);
|
||||
}
|
||||
|
||||
public function getBlockPrefix()
|
||||
public function getBlockPrefix(): string
|
||||
{
|
||||
return 'attachment';
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -96,7 +96,7 @@ class MasterPictureAttachmentType extends AbstractType
|
|||
$resolver->setAllowedValues('filter', ['', 'picture', '3d_model']);
|
||||
}
|
||||
|
||||
public function getParent()
|
||||
public function getParent(): string
|
||||
{
|
||||
return ChoiceType::class;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ class StructuralEntityType extends AbstractType
|
|||
parent::buildView($view, $form, $options);
|
||||
}
|
||||
|
||||
public function getParent()
|
||||
public function getParent(): string
|
||||
{
|
||||
return ChoiceType::class;
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ final class TriStateCheckboxType extends AbstractType implements DataTransformer
|
|||
]);
|
||||
}
|
||||
|
||||
public function getBlockPrefix()
|
||||
public function getBlockPrefix(): string
|
||||
{
|
||||
return 'tristate';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue