mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-29 22:30:01 +02:00
Fixed code for symfony 7
This commit is contained in:
parent
9eb825f89a
commit
7e6b931db4
6 changed files with 20 additions and 19 deletions
|
@ -41,7 +41,7 @@ class SelectTypeOrderExtension extends AbstractTypeExtension
|
|||
];
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefault('ordered', false);
|
||||
$resolver->setDefault('by_reference', function (Options $options) {
|
||||
|
@ -50,7 +50,7 @@ class SelectTypeOrderExtension extends AbstractTypeExtension
|
|||
});
|
||||
}
|
||||
|
||||
public function buildView(FormView $view, FormInterface $form, array $options)
|
||||
public function buildView(FormView $view, FormInterface $form, array $options): void
|
||||
{
|
||||
//Pass the data in ordered form to the frontend controller, so it can make the items appear in the correct order.
|
||||
if ($options['ordered']) {
|
||||
|
|
|
@ -100,7 +100,7 @@ final class TriStateCheckboxType extends AbstractType implements DataTransformer
|
|||
* @return mixed The value in the transformed representation
|
||||
*
|
||||
*/
|
||||
public function transform(mixed $value)
|
||||
public function transform(mixed $value): mixed
|
||||
{
|
||||
if (true === $value) {
|
||||
return 'true';
|
||||
|
@ -142,7 +142,7 @@ final class TriStateCheckboxType extends AbstractType implements DataTransformer
|
|||
*
|
||||
* @return mixed The value in the original representation
|
||||
*/
|
||||
public function reverseTransform(mixed $value)
|
||||
public function reverseTransform(mixed $value): mixed
|
||||
{
|
||||
return match ($value) {
|
||||
'true' => true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue