Passed
Push — master ( fe0f69...67a0dc )
by Jan
04:33
created
src/Form/TFAGoogleSettingsType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,13 +46,13 @@
 block discarded – undo
46 46
 
47 47
     public function buildForm(FormBuilderInterface $builder, array $options): void
48 48
     {
49
-        $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event): void {
49
+        $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event): void {
50 50
             $form = $event->getForm();
51 51
             /** @var User $user */
52 52
             $user = $event->getData();
53 53
 
54 54
             //Only show setup fields, when google authenticator is not enabled
55
-            if (! $user->isGoogleAuthenticatorEnabled()) {
55
+            if (!$user->isGoogleAuthenticatorEnabled()) {
56 56
                 $form->add(
57 57
                     'google_confirmation',
58 58
                     TextType::class,
Please login to merge, or discard this patch.
src/Form/Permissions/PermissionsType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,8 +48,8 @@
 block discarded – undo
48 48
     {
49 49
         $resolver->setDefaults([
50 50
             'show_legend' => true,
51
-            'constraints' => function (Options $options) {
52
-                if (! $options['disabled']) {
51
+            'constraints' => function(Options $options) {
52
+                if (!$options['disabled']) {
53 53
                     return [new NoLockout()];
54 54
                 }
55 55
 
Please login to merge, or discard this patch.
src/Form/Permissions/PermissionType.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -48,20 +48,20 @@
 block discarded – undo
48 48
     {
49 49
         parent::configureOptions($resolver);
50 50
 
51
-        $resolver->setDefault('perm_name', function (Options $options) {
51
+        $resolver->setDefault('perm_name', function(Options $options) {
52 52
             return $options['name'];
53 53
         });
54 54
 
55
-        $resolver->setDefault('label', function (Options $options) {
56
-            if (! empty($this->perm_structure['perms'][$options['perm_name']]['label'])) {
55
+        $resolver->setDefault('label', function(Options $options) {
56
+            if (!empty($this->perm_structure['perms'][$options['perm_name']]['label'])) {
57 57
                 return $this->perm_structure['perms'][$options['perm_name']]['label'];
58 58
             }
59 59
 
60 60
             return $options['name'];
61 61
         });
62 62
 
63
-        $resolver->setDefault('multi_checkbox', function (Options $options) {
64
-            return ! $options['disabled'];
63
+        $resolver->setDefault('multi_checkbox', function(Options $options) {
64
+            return !$options['disabled'];
65 65
         });
66 66
 
67 67
         $resolver->setDefaults([
Please login to merge, or discard this patch.
src/Form/Permissions/PermissionGroupType.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,14 +73,14 @@
 block discarded – undo
73 73
     {
74 74
         parent::configureOptions($resolver);
75 75
 
76
-        $resolver->setDefault('group_name', function (Options $options) {
76
+        $resolver->setDefault('group_name', function(Options $options) {
77 77
             return trim($options['name']);
78 78
         });
79 79
 
80 80
         $resolver->setDefault('inherit', false);
81 81
 
82
-        $resolver->setDefault('label', function (Options $options) {
83
-            if (! empty($this->perm_structure['groups'][$options['group_name']]['label'])) {
82
+        $resolver->setDefault('label', function(Options $options) {
83
+            if (!empty($this->perm_structure['groups'][$options['group_name']]['label'])) {
84 84
                 return $this->perm_structure['groups'][$options['group_name']]['label'];
85 85
             }
86 86
 
Please login to merge, or discard this patch.
src/Form/AttachmentFormType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
         $builder->add('downloadURL', CheckboxType::class, ['required' => false,
98 98
             'label' => 'attachment.edit.download_url',
99 99
             'mapped' => false,
100
-            'disabled' => ! $this->allow_attachments_download,
100
+            'disabled' => !$this->allow_attachments_download,
101 101
             'attr' => ['class' => 'form-control-sm'],
102 102
             'label_attr' => ['class' => 'checkbox-custom'], ]);
103 103
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         //Check the secure file checkbox, if file is in securefile location
118 118
         $builder->get('secureFile')->addEventListener(
119 119
             FormEvents::PRE_SET_DATA,
120
-            function (FormEvent $event): void {
120
+            function(FormEvent $event): void {
121 121
                 $attachment = $event->getForm()->getParent()->getData();
122 122
                 if ($attachment instanceof Attachment) {
123 123
                     $event->setData($attachment->isSecure());
Please login to merge, or discard this patch.
src/Form/Type/StructuralEntityType.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -62,9 +62,9 @@  discard block
 block discarded – undo
62 62
     public function buildForm(FormBuilderInterface $builder, array $options): void
63 63
     {
64 64
         $builder->addModelTransformer(new CallbackTransformer(
65
-            function ($value) use ($options) {
65
+            function($value) use ($options) {
66 66
                 return $this->transform($value, $options);
67
-            }, function ($value) use ($options) {
67
+            }, function($value) use ($options) {
68 68
                 return $this->reverseTransform($value, $options);
69 69
             }));
70 70
     }
@@ -74,23 +74,23 @@  discard block
 block discarded – undo
74 74
         $resolver->setRequired(['class']);
75 75
         $resolver->setDefaults([
76 76
             'show_fullpath_in_subtext' => true, //When this is enabled, the full path will be shown in subtext
77
-            'subentities_of' => null,   //Only show entities with the given parent class
78
-            'disable_not_selectable' => false,  //Disable entries with not selectable property
77
+            'subentities_of' => null, //Only show entities with the given parent class
78
+            'disable_not_selectable' => false, //Disable entries with not selectable property
79 79
             'choice_value' => 'id', //Use the element id as option value and for comparing items
80
-            'choice_loader' => function (Options $options) {
81
-                return new CallbackChoiceLoader(function () use ($options) {
80
+            'choice_loader' => function(Options $options) {
81
+                return new CallbackChoiceLoader(function() use ($options) {
82 82
                     return $this->getEntries($options);
83 83
                 });
84
-            }, 'choice_label' => function ($choice, $key, $value) {
84
+            }, 'choice_label' => function($choice, $key, $value) {
85 85
                 return $this->generateChoiceLabels($choice, $key, $value);
86
-            }, 'choice_attr' => function ($choice, $key, $value) {
86
+            }, 'choice_attr' => function($choice, $key, $value) {
87 87
                 return $this->generateChoiceAttr($choice, $key, $value);
88 88
             },
89 89
         ]);
90 90
 
91 91
         $resolver->setDefault('empty_message', null);
92 92
 
93
-        $resolver->setDefault('attr', function (Options $options) {
93
+        $resolver->setDefault('attr', function(Options $options) {
94 94
             $tmp = ['class' => 'selectpicker', 'data-live-search' => true];
95 95
             if ($options['empty_message']) {
96 96
                 $tmp['data-none-Selected-Text'] = $options['empty_message'];
Please login to merge, or discard this patch.
src/Form/Type/CurrencyEntityType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         // This options allows you to override the currency shown for the null value
54 54
         $resolver->setDefault('base_currency', null);
55 55
 
56
-        $resolver->setDefault('empty_message', function (Options $options) {
56
+        $resolver->setDefault('empty_message', function(Options $options) {
57 57
             //By default we use the global base currency:
58 58
             $iso_code = $this->base_currency;
59 59
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
         /** @var Currency $choice */
95 95
         $tmp = [];
96 96
 
97
-        if (! empty($choice->getIsoCode())) {
97
+        if (!empty($choice->getIsoCode())) {
98 98
             //Show the name of the currency
99 99
             $tmp += ['data-subtext' => $choice->getName()];
100 100
         }
Please login to merge, or discard this patch.
src/Form/Type/MasterPictureAttachmentType.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
         $resolver->setDefaults([
43 43
             'filter' => 'picture',
44 44
             'attr' => ['class' => 'selectpicker'],
45
-            'choice_attr' => function (Options $options) {
46
-                return  function ($choice, $key, $value) use ($options) {
45
+            'choice_attr' => function(Options $options) {
46
+                return  function($choice, $key, $value) use ($options) {
47 47
                     /** @var Attachment $choice */
48 48
                     $tmp = ['data-subtext' => $choice->getFilename() ?? 'URL'];
49 49
 
50
-                    if ('picture' === $options['filter'] && ! $choice->isPicture()) {
50
+                    if ('picture' === $options['filter'] && !$choice->isPicture()) {
51 51
                         $tmp += ['disabled' => 'disabled'];
52
-                    } elseif ('3d_model' === $options['filter'] && ! $choice->is3DModel()) {
52
+                    } elseif ('3d_model' === $options['filter'] && !$choice->is3DModel()) {
53 53
                         $tmp += ['disabled' => 'disabled'];
54 54
                     }
55 55
 
@@ -57,13 +57,13 @@  discard block
 block discarded – undo
57 57
                 };
58 58
             },
59 59
             'choice_label' => 'name',
60
-            'class' => function (Options $options) {
60
+            'class' => function(Options $options) {
61 61
                 $short_class_name = (new \ReflectionClass($options['entity']))->getShortName();
62 62
                 //Category becomes CategoryAttachment
63 63
                 return 'App\\Entity\\Attachments\\'.$short_class_name.'Attachment';
64 64
             },
65
-            'query_builder' => function (Options $options) {
66
-                return function (EntityRepository $er) use ($options) {
65
+            'query_builder' => function(Options $options) {
66
+                return function(EntityRepository $er) use ($options) {
67 67
                     $entity = $options['entity'];
68 68
                     if (null === $entity->getID()) {
69 69
                         //This query is always false, so we get empty results
Please login to merge, or discard this patch.
src/Form/Type/SIUnitType.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     {
51 51
         $resolver->setDefaults([
52 52
             'measurement_unit' => null,
53
-            'show_prefix' => function (Options $options) {
53
+            'show_prefix' => function(Options $options) {
54 54
                 if (null !== $options['measurement_unit']) {
55 55
                     /** @var MeasurementUnit $unit */
56 56
                     $unit = $options['measurement_unit'];
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
                 return false;
62 62
             },
63
-            'is_integer' => function (Options $options) {
63
+            'is_integer' => function(Options $options) {
64 64
                 if (null !== $options['measurement_unit']) {
65 65
                     /** @var MeasurementUnit $unit */
66 66
                     $unit = $options['measurement_unit'];
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
                 return false;
72 72
             },
73
-            'unit' => function (Options $options) {
73
+            'unit' => function(Options $options) {
74 74
                 if (null !== $options['measurement_unit']) {
75 75
                     /** @var MeasurementUnit $unit */
76 76
                     $unit = $options['measurement_unit'];
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
         $resolver->setDefaults([
91 91
             'min' => 0,
92 92
             'max' => '',
93
-            'step' => function (Options $options) {
93
+            'step' => function(Options $options) {
94 94
                 if (true === $options['is_integer']) {
95 95
                     return 1;
96 96
                 }
Please login to merge, or discard this patch.