Passed
Push — master ( 892132...fe0f69 )
by Jan
04:10
created
src/Form/AdminPages/GroupAdminForm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,13 +39,13 @@
 block discarded – undo
39 39
             'label' => 'group.edit.enforce_2fa',
40 40
             'help' => 'entity.edit.enforce_2fa.help',
41 41
             'label_attr' => ['class' => 'checkbox-custom'],
42
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
42
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
43 43
         ]);
44 44
 
45 45
         $builder->add('permissions', PermissionsType::class, [
46 46
             'mapped' => false,
47 47
             'data' => $builder->getData(),
48
-            'disabled' => ! $this->security->isGranted('edit_permissions', $entity),
48
+            'disabled' => !$this->security->isGranted('edit_permissions', $entity),
49 49
         ]);
50 50
     }
51 51
 }
Please login to merge, or discard this patch.
src/Form/AdminPages/CompanyForm.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -39,14 +39,14 @@  discard block
 block discarded – undo
39 39
 
40 40
         $builder->add('address', TextareaType::class, [
41 41
             'label' => 'company.edit.address',
42
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
42
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
43 43
             'attr' => ['placeholder' => 'company.edit.address.placeholder'], 'required' => false,
44 44
             'empty_data' => '',
45 45
         ]);
46 46
 
47 47
         $builder->add('phone_number', TelType::class, [
48 48
             'label' => 'company.edit.phone_number',
49
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
49
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
50 50
             'attr' => ['placeholder' => 'company.edit.phone_number.placeholder'],
51 51
             'required' => false,
52 52
             'empty_data' => '',
@@ -54,21 +54,21 @@  discard block
 block discarded – undo
54 54
 
55 55
         $builder->add('fax_number', TelType::class, [
56 56
             'label' => 'company.edit.fax_number',
57
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
57
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
58 58
             'attr' => ['placeholder' => 'company.fax_number.placeholder'], 'required' => false,
59 59
             'empty_data' => '',
60 60
         ]);
61 61
 
62 62
         $builder->add('email_address', EmailType::class, [
63 63
             'label' => 'company.edit.email',
64
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
64
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
65 65
             'attr' => ['placeholder' => 'company.edit.email.placeholder'], 'required' => false,
66 66
             'empty_data' => '',
67 67
         ]);
68 68
 
69 69
         $builder->add('website', UrlType::class, [
70 70
             'label' => 'company.edit.website',
71
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
71
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
72 72
             'attr' => ['placeholder' => 'company.edit.website.placeholder'], 'required' => false,
73 73
             'empty_data' => '',
74 74
         ]);
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
         $builder->add('auto_product_url', UrlType::class, [
77 77
             'label' => 'company.edit.auto_product_url',
78 78
             'help' => 'company.edit.auto_product_url.help',
79
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
79
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
80 80
             'attr' => ['placeholder' => 'company.edit.auto_product_url.placeholder'],
81 81
             'required' => false,
82 82
             'empty_data' => '',
Please login to merge, or discard this patch.
src/Form/AdminPages/MeasurementUnitAdminForm.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,17 +39,17 @@
 block discarded – undo
39 39
             'label' => 'measurement_unit.edit.is_integer',
40 40
             'help' => 'measurement_unit.edit.is_integer.help',
41 41
             'label_attr' => ['class' => 'checkbox-custom'],
42
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
42
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
43 43
 
44 44
         $builder->add('use_si_prefix', CheckboxType::class, ['required' => false,
45 45
             'label' => 'measurement_unit.edit.use_si_prefix',
46 46
             'help' => 'measurement_unit.edit.use_si_prefix.help',
47 47
             'label_attr' => ['class' => 'checkbox-custom'],
48
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
48
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
49 49
 
50 50
         $builder->add('unit', TextType::class, ['required' => false,
51 51
             'label' => 'measurement_unit.edit.unit_symbol',
52 52
             'attr' => ['placeholder' => 'measurement_unit.edit.unit_symbol.placeholder'],
53
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
53
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
54 54
     }
55 55
 }
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/AttachmentTypeAdminForm.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,14 +51,14 @@
 block discarded – undo
51 51
             'help' => 'attachment_type.edit.filetype_filter.help',
52 52
             'attr' => ['placeholder' => 'attachment_type.edit.filetype_filter.placeholder'],
53 53
             'empty_data' => '',
54
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
54
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
55 55
 
56 56
         //Normalize data before writing it to database
57 57
         $builder->get('filetype_filter')->addViewTransformer(new CallbackTransformer(
58
-            function ($value) {
58
+            function($value) {
59 59
                 return $value;
60 60
             },
61
-            function ($value) {
61
+            function($value) {
62 62
                 return $this->filterTools->normalizeFilterString($value);
63 63
             }
64 64
         ));
Please login to merge, or discard this patch.
src/Form/AdminPages/CategoryAdminForm.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -39,44 +39,44 @@
 block discarded – undo
39 39
             'label' => 'category.edit.disable_footprints',
40 40
             'help' => 'category.edit.disable_footprints.help',
41 41
             'label_attr' => ['class' => 'checkbox-custom'],
42
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
42
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
43 43
 
44 44
         $builder->add('disable_manufacturers', CheckboxType::class, ['required' => false,
45 45
             'label' => 'category.edit.disable_manufacturers',
46 46
             'help' => 'category.edit.disable_manufacturers.help',
47 47
             'label_attr' => ['class' => 'checkbox-custom'],
48
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
48
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
49 49
 
50 50
         $builder->add('disable_autodatasheets', CheckboxType::class, ['required' => false,
51 51
             'label' => 'category.edit.disable_autodatasheets',
52 52
             'help' => 'category.edit.disable_autodatasheets.help',
53 53
             'label_attr' => ['class' => 'checkbox-custom'],
54
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
54
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
55 55
 
56 56
         $builder->add('disable_properties', CheckboxType::class, ['required' => false,
57 57
             'label' => 'category.edit.disable_properties',
58 58
             'help' => 'category.edit.disable_properties.help',
59 59
             'label_attr' => ['class' => 'checkbox-custom'],
60
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
60
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
61 61
 
62 62
         $builder->add('partname_hint', TextType::class, ['required' => false, 'empty_data' => '',
63 63
             'label' => 'category.edit.partname_hint',
64 64
             'attr' => ['placeholder' => 'category.edit.partname_hint.placeholder'],
65
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
65
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
66 66
 
67 67
         $builder->add('partname_regex', TextType::class, ['required' => false, 'empty_data' => '',
68 68
             'label' => 'category.edit.partname_regex',
69 69
             'attr' => ['placeholder' => 'category.edit.partname_regex.placeholder'],
70
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
70
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
71 71
 
72 72
         $builder->add('default_description', TextType::class, ['required' => false, 'empty_data' => '',
73 73
             'label' => 'category.edit.default_description',
74 74
             'attr' => ['placeholder' => 'category.edit.default_description.placeholder'],
75
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
75
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
76 76
 
77 77
         $builder->add('default_comment', TextType::class, ['required' => false, 'empty_data' => '',
78 78
             'label' => 'category.edit.default_comment',
79 79
             'attr' => ['placeholder' => 'category.edit.default_comment.placeholder'],
80
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
80
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
81 81
     }
82 82
 }
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.
src/Form/AdminPages/StorelocationAdminForm.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,27 +41,27 @@
 block discarded – undo
41 41
             'label' => 'storelocation.edit.is_full.label',
42 42
             'help' => 'storelocation.edit.is_full.help',
43 43
             'label_attr' => ['class' => 'checkbox-custom'],
44
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'move', $entity), ]);
44
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'move', $entity), ]);
45 45
 
46 46
         $builder->add('limit_to_existing_parts', CheckboxType::class, [
47 47
             'required' => false,
48 48
             'label' => 'storelocation.limit_to_existing.label',
49 49
             'help' => 'storelocation.limit_to_existing.help',
50 50
             'label_attr' => ['class' => 'checkbox-custom'],
51
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'move', $entity), ]);
51
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'move', $entity), ]);
52 52
 
53 53
         $builder->add('only_single_part', CheckboxType::class, [
54 54
             'required' => false,
55 55
             'label' => 'storelocation.only_single_part.label',
56 56
             'help' => 'storelocation.only_single_part.help',
57 57
             'label_attr' => ['class' => 'checkbox-custom'],
58
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'move', $entity), ]);
58
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'move', $entity), ]);
59 59
 
60 60
         $builder->add('storage_type', StructuralEntityType::class, [
61 61
             'required' => false,
62 62
             'label' => 'storelocation.storage_type.label',
63 63
             'help' => 'storelocation.storage_type.help',
64 64
             'class' => MeasurementUnit::class, 'disable_not_selectable' => true,
65
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'move', $entity), ]);
65
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'move', $entity), ]);
66 66
     }
67 67
 }
Please login to merge, or discard this patch.
src/Form/AdminPages/CurrencyAdminForm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,13 +40,13 @@
 block discarded – undo
40 40
             'label' => 'currency.edit.iso_code',
41 41
             'preferred_choices' => ['EUR', 'USD', 'GBP', 'JPY', 'CNY'],
42 42
             'attr' => ['class' => 'selectpicker', 'data-live-search' => true],
43
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
43
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
44 44
 
45 45
         $builder->add('exchange_rate', MoneyType::class, [
46 46
             'required' => false,
47 47
             'label' => 'currency.edit.exchange_rate',
48 48
             'currency' => $this->params->get('default_currency'),
49 49
             'scale' => 6,
50
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
50
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity), ]);
51 51
     }
52 52
 }
Please login to merge, or discard this patch.