Passed
Push — master ( fe0f69...67a0dc )
by Jan
04:33
created
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.
src/Validator/Constraints/ValidPermissionValidator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function validate($value, Constraint $constraint): void
51 51
     {
52
-        if (! $constraint instanceof ValidPermission) {
52
+        if (!$constraint instanceof ValidPermission) {
53 53
             throw new UnexpectedTypeException($constraint, ValidPermission::class);
54 54
         }
55 55
 
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         //Check for each permission and operation, for an alsoSet attribute
60 60
         foreach ($this->perm_structure['perms'] as $perm_key => $permission) {
61 61
             foreach ($permission['operations'] as $op_key => $op) {
62
-                if (! empty($op['alsoSet']) &&
62
+                if (!empty($op['alsoSet']) &&
63 63
                     true === $this->resolver->dontInherit($perm_holder, $perm_key, $op_key)) {
64 64
                     //Set every op listed in also Set
65 65
                     foreach ($op['alsoSet'] as $set_also) {
Please login to merge, or discard this patch.
src/Validator/Constraints/UrlOrBuiltinValidator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,14 +38,14 @@  discard block
 block discarded – undo
38 38
 {
39 39
     public function validate($value, Constraint $constraint): void
40 40
     {
41
-        if (! $constraint instanceof UrlOrBuiltin) {
41
+        if (!$constraint instanceof UrlOrBuiltin) {
42 42
             throw new UnexpectedTypeException($constraint, UrlOrBuiltin::class);
43 43
         }
44 44
 
45 45
         if (null === $value || '' === $value) {
46 46
             return;
47 47
         }
48
-        if (! is_scalar($value) && ! (\is_object($value) && method_exists($value, '__toString'))) {
48
+        if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) {
49 49
             throw new UnexpectedValueException($value, 'string');
50 50
         }
51 51
         $value = (string) $value;
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         //After the %PLACEHOLDER% comes a slash, so we can check if we have a placholder via explode
57 57
         $tmp = explode('/', $value);
58 58
         //Builtins must have a %PLACEHOLDER% construction
59
-        if (! empty($tmp) && \in_array($tmp[0], $constraint->allowed_placeholders, false)) {
59
+        if (!empty($tmp) && \in_array($tmp[0], $constraint->allowed_placeholders, false)) {
60 60
             return;
61 61
         }
62 62
 
Please login to merge, or discard this patch.
src/Validator/Constraints/ValidGoogleAuthCodeValidator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
     public function validate($value, Constraint $constraint): void
45 45
     {
46
-        if (! $constraint instanceof ValidGoogleAuthCode) {
46
+        if (!$constraint instanceof ValidGoogleAuthCode) {
47 47
             throw new UnexpectedTypeException($constraint, ValidGoogleAuthCode::class);
48 48
         }
49 49
 
@@ -51,11 +51,11 @@  discard block
 block discarded – undo
51 51
             return;
52 52
         }
53 53
 
54
-        if (! \is_string($value)) {
54
+        if (!\is_string($value)) {
55 55
             throw new UnexpectedValueException($value, 'string');
56 56
         }
57 57
 
58
-        if (! ctype_digit($value)) {
58
+        if (!ctype_digit($value)) {
59 59
             $this->context->addViolation('validator.google_code.only_digits_allowed');
60 60
         }
61 61
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             $user = $this->context->getObject()->getParent()->getData();
72 72
 
73 73
             //Check if the given code is valid
74
-            if (! $this->googleAuthenticator->checkCode($user, $value)) {
74
+            if (!$this->googleAuthenticator->checkCode($user, $value)) {
75 75
                 $this->context->addViolation('validator.google_code.wrong_code');
76 76
             }
77 77
         }
Please login to merge, or discard this patch.
src/Validator/Constraints/ValidFileFilterValidator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function validate($value, Constraint $constraint): void
49 49
     {
50
-        if (! $constraint instanceof ValidFileFilter) {
50
+        if (!$constraint instanceof ValidFileFilter) {
51 51
             throw new UnexpectedTypeException($constraint, ValidFileFilter::class);
52 52
         }
53 53
 
@@ -55,12 +55,12 @@  discard block
 block discarded – undo
55 55
             return;
56 56
         }
57 57
 
58
-        if (! \is_string($value)) {
58
+        if (!\is_string($value)) {
59 59
             // throw this exception if your validator cannot handle the passed type so that it can be marked as invalid
60 60
             throw new UnexpectedValueException($value, 'string');
61 61
         }
62 62
 
63
-        if (! $this->filterTools->validateFilterString($value)) {
63
+        if (!$this->filterTools->validateFilterString($value)) {
64 64
             $this->context->buildViolation('validator.file_type_filter.invalid')
65 65
                 ->addViolation();
66 66
         }
Please login to merge, or discard this patch.
src/Validator/Constraints/NoLockoutValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
      */
57 57
     public function validate($value, Constraint $constraint): void
58 58
     {
59
-        if (! $constraint instanceof NoLockout) {
59
+        if (!$constraint instanceof NoLockout) {
60 60
             throw new UnexpectedTypeException($constraint, NoLockout::class);
61 61
         }
62 62
 
Please login to merge, or discard this patch.