Fixed some inspection issues

This commit is contained in:
Jan Böhmer 2023-02-05 03:01:25 +01:00
parent a5cbe59a7c
commit ba5ae35809
20 changed files with 35 additions and 36 deletions

View file

@ -38,7 +38,7 @@ class DateTimeConstraintType extends AbstractType
$resolver->setDefaults([
'compound' => true,
'data_class' => DateTimeConstraint::class,
'text_suffix' => '', // An suffix which is attached as text-append to the input group. This can for example be used for units
'text_suffix' => '', // A suffix which is attached as text-append to the input group. This can for example be used for units
'value1_options' => [], // Options for the first value input
'value2_options' => [], // Options for the second value input

View file

@ -55,7 +55,7 @@ class RichTextEditorType extends AbstractType
{
$tmp = [];
//Set novalidate attribute or we will get problems that form can not be submitted as textarea is not focusable
//Set novalidate attribute, or we will get problems that form can not be submitted as textarea is not focusable
$tmp['novalidate'] = 'novalidate';
$tmp['data-mode'] = $options['mode'];

View file

@ -109,12 +109,7 @@ class StructuralEntityType extends AbstractType
return null;
}
if ($element->getID() === null) {
//Must be the same as the separator in the choice_loader, otherwise this will not work!
return $element->getFullPath('->');
}
return $element->getID();
return (string) $element->getID() ?? $element->getFullPath('->');
}, //Use the element id as option value and for comparing items
'choice_loader' => function (Options $options) {
return new StructuralEntityChoiceLoader($options, $this->builder, $this->em);

View file

@ -70,7 +70,7 @@ final class TriStateCheckboxType extends AbstractType implements DataTransformer
*
* 1. Model transformers which normalize the model data.
* This is mainly useful when the same form type (the same configuration)
* has to handle different kind of underlying data, e.g The DateType can
* has to handle different kind of underlying data, e.g. The DateType can
* deal with strings or \DateTime objects as input.
*
* 2. View transformers which adapt the normalized data to the view format.