Passed
Push — master ( 46772c...8a7b90 )
by Jan
05:19
created
src/Form/Part/OrderdetailType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         ]);
80 80
 
81 81
         //Add pricedetails after we know the data, so we can set the default currency
82
-        $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($options): void {
82
+        $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($options): void {
83 83
             /** @var Orderdetail $orderdetail */
84 84
             $orderdetail = $event->getData();
85 85
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                 'prototype_data' => $dummy_pricedetail,
98 98
                 'by_reference' => false,
99 99
                 'entry_options' => [
100
-                    'disabled' => ! $this->security->isGranted('@parts_prices.edit'),
100
+                    'disabled' => !$this->security->isGranted('@parts_prices.edit'),
101 101
                     'measurement_unit' => $options['measurement_unit'],
102 102
                 ],
103 103
             ]);
Please login to merge, or discard this patch.
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/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/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.
src/Form/AdminPages/ImportType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
         //Disable import if user is not allowed to create elements.
52 52
         $entity = new $data['entity_class']();
53 53
         $perm_name = 'create';
54
-        $disabled = ! $this->security->isGranted($perm_name, $entity);
54
+        $disabled = !$this->security->isGranted($perm_name, $entity);
55 55
 
56 56
         $builder
57 57
 
Please login to merge, or discard this patch.
src/Form/AdminPages/FootprintAdminForm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
     {
35 35
         $builder->add('footprint_3d', MasterPictureAttachmentType::class, [
36 36
             'required' => false,
37
-            'disabled' => ! $this->security->isGranted(null === $entity->getID() ? 'create' : 'edit', $entity),
37
+            'disabled' => !$this->security->isGranted(null === $entity->getID() ? 'create' : 'edit', $entity),
38 38
             'label' => 'footprint.edit.3d_model',
39 39
             'filter' => '3d_model',
40 40
             'entity' => $entity,
Please login to merge, or discard this patch.