@@ -47,7 +47,7 @@ |
||
47 | 47 | $resolver->setDefaults([ |
48 | 48 | 'show_legend' => true, |
49 | 49 | 'show_presets' => false, |
50 | - 'constraints' => static function (Options $options) { |
|
50 | + 'constraints' => static function(Options $options) { |
|
51 | 51 | if (!$options['disabled']) { |
52 | 52 | return [new NoLockout()]; |
53 | 53 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | |
23 | 23 | class ParameterValueConstraintType extends NumberConstraintType |
24 | 24 | { |
25 | - protected const CHOICES = [ |
|
25 | + protected const CHOICES = [ |
|
26 | 26 | '' => '', |
27 | 27 | 'filter.parameter_value_constraint.operator.=' => '=', |
28 | 28 | 'filter.parameter_value_constraint.operator.!=' => '!=', |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | |
58 | 58 | $builder->add('value_text', TextConstraintType::class, [ |
59 | 59 | //'required' => false, |
60 | - ] ); |
|
60 | + ]); |
|
61 | 61 | |
62 | 62 | $builder->add('value', ParameterValueConstraintType::class, [ |
63 | 63 | ]); |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * arguments. |
69 | 69 | * Ensure that the data is never null, but use an empty ParameterConstraint instead |
70 | 70 | */ |
71 | - $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) { |
|
71 | + $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) { |
|
72 | 72 | $form = $event->getForm(); |
73 | 73 | $data = $event->getData(); |
74 | 74 |
@@ -63,7 +63,7 @@ |
||
63 | 63 | $valid = $this->resolver->isValidOperation($perm, $op); |
64 | 64 | |
65 | 65 | //if an invalid operation is encountered, throw an exception so the developer knows it |
66 | - if(!$valid) { |
|
66 | + if (!$valid) { |
|
67 | 67 | throw new \RuntimeException('Encountered invalid permission operation "'.$op.'" for permission "'.$perm.'"!'); |
68 | 68 | } |
69 | 69 |
@@ -52,7 +52,7 @@ |
||
52 | 52 | |
53 | 53 | //If the attachment has no element (which should not happen), we deny access, as we can not determine if the user is allowed to access the associated element |
54 | 54 | $target_element = $subject->getElement(); |
55 | - if (! $subject instanceof Attachment || null === $target_element) { |
|
55 | + if (!$subject instanceof Attachment || null === $target_element) { |
|
56 | 56 | return false; |
57 | 57 | } |
58 | 58 |
@@ -112,7 +112,7 @@ |
||
112 | 112 | } elseif ($subject instanceof SupplierParameter) { |
113 | 113 | $param = 'suppliers'; |
114 | 114 | } else { |
115 | - throw new RuntimeException('Encountered unknown Parameter type: ' . get_class($subject)); |
|
115 | + throw new RuntimeException('Encountered unknown Parameter type: '.get_class($subject)); |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | return $this->resolver->inherit($user, $param, $attribute) ?? false; |
@@ -61,7 +61,7 @@ |
||
61 | 61 | |
62 | 62 | protected function voteOnUser(string $attribute, $subject, User $user): bool |
63 | 63 | { |
64 | - if (! is_a($subject, Orderdetail::class, true)) { |
|
64 | + if (!is_a($subject, Orderdetail::class, true)) { |
|
65 | 65 | throw new \RuntimeException('This voter can only handle Orderdetail objects!'); |
66 | 66 | } |
67 | 67 |
@@ -61,7 +61,7 @@ |
||
61 | 61 | |
62 | 62 | protected function voteOnUser(string $attribute, $subject, User $user): bool |
63 | 63 | { |
64 | - if (! is_a($subject, PartLot::class, true)) { |
|
64 | + if (!is_a($subject, PartLot::class, true)) { |
|
65 | 65 | throw new \RuntimeException('This voter can only handle PartLot objects!'); |
66 | 66 | } |
67 | 67 |
@@ -69,7 +69,7 @@ |
||
69 | 69 | $user->getUsername(), |
70 | 70 | $user->getFullName(), |
71 | 71 | $user->getEmail(), |
72 | - $user->getGroup() !== null ? $user->getGroup()->getName() . ' (ID: ' . $user->getGroup()->getID() . ')' : 'No group', |
|
72 | + $user->getGroup() !== null ? $user->getGroup()->getName().' (ID: '.$user->getGroup()->getID().')' : 'No group', |
|
73 | 73 | $user->isDisabled() ? 'Yes' : 'No', |
74 | 74 | ]); |
75 | 75 | } |