@@ -65,8 +65,8 @@ discard block |
||
| 65 | 65 | 'class' => 'selectpicker', |
| 66 | 66 | 'title' => 'selectpicker.nothing_selected', |
| 67 | 67 | ], |
| 68 | - 'choice_attr' => static function (Options $options) { |
|
| 69 | - return static function ($choice, $key, $value) use ($options) { |
|
| 68 | + 'choice_attr' => static function(Options $options) { |
|
| 69 | + return static function($choice, $key, $value) use ($options) { |
|
| 70 | 70 | /** @var Attachment $choice */ |
| 71 | 71 | $tmp = ['data-subtext' => $choice->getFilename() ?? 'URL']; |
| 72 | 72 | |
@@ -80,9 +80,9 @@ discard block |
||
| 80 | 80 | }; |
| 81 | 81 | }, |
| 82 | 82 | 'choice_label' => 'name', |
| 83 | - 'choice_loader' => static function (Options $options) { |
|
| 83 | + 'choice_loader' => static function(Options $options) { |
|
| 84 | 84 | return new CallbackChoiceLoader( |
| 85 | - static function () use ($options) { |
|
| 85 | + static function() use ($options) { |
|
| 86 | 86 | $entity = $options['entity']; |
| 87 | 87 | if (!$entity instanceof AttachmentContainingDBElement) { |
| 88 | 88 | throw new \RuntimeException('$entity must have Attachments! (be of type AttachmentContainingDBElement)'); |
@@ -124,7 +124,7 @@ |
||
| 124 | 124 | ], |
| 125 | 125 | 'choice_translation_domain' => false, |
| 126 | 126 | 'choices' => User::AVAILABLE_THEMES, |
| 127 | - 'choice_label' => static function ($entity, $key, $value) { |
|
| 127 | + 'choice_label' => static function($entity, $key, $value) { |
|
| 128 | 128 | return $value; |
| 129 | 129 | }, |
| 130 | 130 | 'placeholder' => 'user_settings.theme.placeholder', |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | |
| 64 | 64 | public function buildForm(FormBuilderInterface $builder, array $options): void |
| 65 | 65 | { |
| 66 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, static function (FormEvent $event): void { |
|
| 66 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, static function(FormEvent $event): void { |
|
| 67 | 67 | $form = $event->getForm(); |
| 68 | 68 | /** @var User $user */ |
| 69 | 69 | $user = $event->getData(); |
@@ -76,10 +76,10 @@ |
||
| 76 | 76 | |
| 77 | 77 | //Normalize data before writing it to database |
| 78 | 78 | $builder->get('filetype_filter')->addViewTransformer(new CallbackTransformer( |
| 79 | - static function ($value) { |
|
| 79 | + static function($value) { |
|
| 80 | 80 | return $value; |
| 81 | 81 | }, |
| 82 | - function ($value) { |
|
| 82 | + function($value) { |
|
| 83 | 83 | return $this->filterTools->normalizeFilterString($value); |
| 84 | 84 | } |
| 85 | 85 | )); |
@@ -66,7 +66,7 @@ |
||
| 66 | 66 | { |
| 67 | 67 | $resolver->setDefaults([ |
| 68 | 68 | 'show_legend' => true, |
| 69 | - 'constraints' => static function (Options $options) { |
|
| 69 | + 'constraints' => static function(Options $options) { |
|
| 70 | 70 | if (!$options['disabled']) { |
| 71 | 71 | return [new NoLockout()]; |
| 72 | 72 | } |
@@ -88,13 +88,13 @@ |
||
| 88 | 88 | { |
| 89 | 89 | parent::configureOptions($resolver); |
| 90 | 90 | |
| 91 | - $resolver->setDefault('group_name', static function (Options $options) { |
|
| 91 | + $resolver->setDefault('group_name', static function(Options $options) { |
|
| 92 | 92 | return trim($options['name']); |
| 93 | 93 | }); |
| 94 | 94 | |
| 95 | 95 | $resolver->setDefault('inherit', false); |
| 96 | 96 | |
| 97 | - $resolver->setDefault('label', function (Options $options) { |
|
| 97 | + $resolver->setDefault('label', function(Options $options) { |
|
| 98 | 98 | if (!empty($this->perm_structure['groups'][$options['group_name']]['label'])) { |
| 99 | 99 | return $this->perm_structure['groups'][$options['group_name']]['label']; |
| 100 | 100 | } |
@@ -66,11 +66,11 @@ discard block |
||
| 66 | 66 | { |
| 67 | 67 | parent::configureOptions($resolver); |
| 68 | 68 | |
| 69 | - $resolver->setDefault('perm_name', static function (Options $options) { |
|
| 69 | + $resolver->setDefault('perm_name', static function(Options $options) { |
|
| 70 | 70 | return $options['name']; |
| 71 | 71 | }); |
| 72 | 72 | |
| 73 | - $resolver->setDefault('label', function (Options $options) { |
|
| 73 | + $resolver->setDefault('label', function(Options $options) { |
|
| 74 | 74 | if (!empty($this->perm_structure['perms'][$options['perm_name']]['label'])) { |
| 75 | 75 | return $this->perm_structure['perms'][$options['perm_name']]['label']; |
| 76 | 76 | } |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | return $options['name']; |
| 79 | 79 | }); |
| 80 | 80 | |
| 81 | - $resolver->setDefault('multi_checkbox', static function (Options $options) { |
|
| 81 | + $resolver->setDefault('multi_checkbox', static function(Options $options) { |
|
| 82 | 82 | return !$options['disabled']; |
| 83 | 83 | }); |
| 84 | 84 | |
@@ -83,7 +83,7 @@ |
||
| 83 | 83 | 'label_options.barcode_type.code93' => 'code93', |
| 84 | 84 | 'label_options.barcode_type.datamatrix' => 'datamatrix', |
| 85 | 85 | ], |
| 86 | - 'group_by' => static function ($choice, $key, $value) { |
|
| 86 | + 'group_by' => static function($choice, $key, $value) { |
|
| 87 | 87 | if (in_array($choice, ['qr', 'datamatrix'], true)) { |
| 88 | 88 | return 'label_options.barcode_type.2D'; |
| 89 | 89 | } |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | ], |
| 170 | 170 | ]); |
| 171 | 171 | |
| 172 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event): void { |
|
| 172 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event): void { |
|
| 173 | 173 | $form = $event->getForm(); |
| 174 | 174 | $attachment = $form->getData(); |
| 175 | 175 | |
@@ -187,7 +187,7 @@ discard block |
||
| 187 | 187 | //Check the secure file checkbox, if file is in securefile location |
| 188 | 188 | $builder->get('secureFile')->addEventListener( |
| 189 | 189 | FormEvents::PRE_SET_DATA, |
| 190 | - static function (FormEvent $event): void { |
|
| 190 | + static function(FormEvent $event): void { |
|
| 191 | 191 | $attachment = $event->getForm()->getParent()->getData(); |
| 192 | 192 | if ($attachment instanceof Attachment) { |
| 193 | 193 | $event->setData($attachment->isSecure()); |