@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | { |
| 59 | 59 | $resolver->setDefaults([ |
| 60 | 60 | 'measurement_unit' => null, |
| 61 | - 'show_prefix' => function (Options $options) { |
|
| 61 | + 'show_prefix' => function(Options $options) { |
|
| 62 | 62 | if ($options['measurement_unit'] !== null) { |
| 63 | 63 | /** @var MeasurementUnit $unit */ |
| 64 | 64 | $unit = $options['measurement_unit']; |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | } |
| 67 | 67 | return true; |
| 68 | 68 | }, |
| 69 | - 'is_integer' => function (Options $options) { |
|
| 69 | + 'is_integer' => function(Options $options) { |
|
| 70 | 70 | if ($options['measurement_unit'] !== null) { |
| 71 | 71 | /** @var MeasurementUnit $unit */ |
| 72 | 72 | $unit = $options['measurement_unit']; |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | } |
| 75 | 75 | return false; |
| 76 | 76 | }, |
| 77 | - 'unit' => function (Options $options) { |
|
| 77 | + 'unit' => function(Options $options) { |
|
| 78 | 78 | if ($options['measurement_unit'] !== null) { |
| 79 | 79 | /** @var MeasurementUnit $unit */ |
| 80 | 80 | $unit = $options['measurement_unit']; |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | } |
| 83 | 83 | return null; |
| 84 | 84 | }, |
| 85 | - 'error_mapping' => [ '.' => 'value'] |
|
| 85 | + 'error_mapping' => ['.' => 'value'] |
|
| 86 | 86 | ]); |
| 87 | 87 | |
| 88 | 88 | $resolver->setAllowedTypes('measurement_unit', [MeasurementUnit::class, 'null']); |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | $resolver->setDefaults([ |
| 93 | 93 | 'min' => 0, |
| 94 | 94 | 'max' => '', |
| 95 | - 'step' => function (Options $options) { |
|
| 95 | + 'step' => function(Options $options) { |
|
| 96 | 96 | if ($options['is_integer'] === true) { |
| 97 | 97 | return 1; |
| 98 | 98 | } |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | |
| 118 | 118 | if ($options['show_prefix']) { |
| 119 | 119 | $builder->add('prefix', ChoiceType::class, [ |
| 120 | - 'choices' => ['M' => 6, 'k' => 3, '' => 0, 'm' => -3 ] |
|
| 120 | + 'choices' => ['M' => 6, 'k' => 3, '' => 0, 'm' => -3] |
|
| 121 | 121 | ]); |
| 122 | 122 | } |
| 123 | 123 | |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | ->add('description', CKEditorType::class, ['required' => false, 'empty_data' => '', |
| 78 | 78 | 'label' => 'description.label', 'help' => 'bbcode.hint', 'config_name' => 'description_config', |
| 79 | 79 | 'attr' => ['placeholder' => 'part.description.placeholder', 'rows' => 2], |
| 80 | - 'disabled' => !$this->security->isGranted('description.edit', $part) ]) |
|
| 80 | + 'disabled' => !$this->security->isGranted('description.edit', $part)]) |
|
| 81 | 81 | ->add('minAmount', SIUnitType::class, |
| 82 | 82 | ['attr' => ['min' => 0, 'placeholder' => 'part.mininstock.placeholder'], 'label' => 'mininstock.label', |
| 83 | 83 | 'measurement_unit' => $part->getPartUnit(), |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | 'disabled' => !$this->security->isGranted('move', $part), ]) |
| 91 | 91 | ->add('tags', TextType::class, ['required' => false, 'label' => 'part.tags', 'empty_data' => "", |
| 92 | 92 | 'attr' => ['data-role' => 'tagsinput'], |
| 93 | - 'disabled' => !$this->security->isGranted('edit', $part) ]); |
|
| 93 | + 'disabled' => !$this->security->isGranted('edit', $part)]); |
|
| 94 | 94 | |
| 95 | 95 | //Manufacturer section |
| 96 | 96 | $builder->add('manufacturer', StructuralEntityType::class, ['class' => Manufacturer::class, |