Completed
Push — master ( 016c28...e7cc53 )
by Jan
03:46
created
src/Form/Part/PartLotType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
             'disable_not_selectable' => true,
62 62
             'attr' => ['class' => 'selectpicker form-control-sm', 'data-live-search' => true]]);
63 63
 
64
-        $builder->add('amount',NumberType::class, [ 'html5' => true,
64
+        $builder->add('amount', NumberType::class, ['html5' => true,
65 65
             'label' => 'part_lot.edit.amount',
66 66
             'attr' => ['class' => 'form-control-sm', 'min' => 0, 'step' => 'any']
67 67
         ]);
Please login to merge, or discard this patch.
src/Form/Type/StructuralEntityType.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -73,9 +73,9 @@  discard block
 block discarded – undo
73 73
     public function buildForm(FormBuilderInterface $builder, array $options)
74 74
     {
75 75
         $builder->addModelTransformer(new CallbackTransformer(
76
-            function ($value) use ($options){
76
+            function($value) use ($options){
77 77
                 return $this->transform($value, $options);
78
-            }, function ($value) use ($options) {
78
+            }, function($value) use ($options) {
79 79
                 return $this->reverseTransform($value, $options);
80 80
         }));
81 81
     }
@@ -85,15 +85,15 @@  discard block
 block discarded – undo
85 85
         $resolver->setRequired(['class']);
86 86
         $resolver->setDefaults(['attr' => ['class' => 'selectpicker', 'data-live-search' => true],
87 87
             'show_fullpath_in_subtext' => true, //When this is enabled, the full path will be shown in subtext
88
-            'subentities_of' => null,   //Only show entities with the given parent class
89
-            'disable_not_selectable' => false,  //Disable entries with not selectable property
90
-            'choice_loader' => function (Options $options) {
91
-                return new CallbackChoiceLoader(function () use ($options) {
88
+            'subentities_of' => null, //Only show entities with the given parent class
89
+            'disable_not_selectable' => false, //Disable entries with not selectable property
90
+            'choice_loader' => function(Options $options) {
91
+                return new CallbackChoiceLoader(function() use ($options) {
92 92
                     return $this->getEntries($options);
93 93
                 });
94
-            }, 'choice_label' => function ($choice, $key, $value) {
94
+            }, 'choice_label' => function($choice, $key, $value) {
95 95
                 return $this->generateChoiceLabels($choice, $key, $value);
96
-            }, 'choice_attr' => function ($choice, $key, $value) {
96
+            }, 'choice_attr' => function($choice, $key, $value) {
97 97
                 return $this->generateChoiceAttr($choice, $key, $value);
98 98
             }
99 99
         ]);
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
 
129 129
 
130 130
         $tmp = str_repeat('   ', $choice->getLevel()); //Use 3 spaces for intendation
131
-        $tmp .=  htmlspecialchars($choice->getName($parent));
131
+        $tmp .= htmlspecialchars($choice->getName($parent));
132 132
         return $tmp;
133 133
     }
134 134
 
Please login to merge, or discard this patch.
src/Migrations/Version20190812154222.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,15 +30,15 @@
 block discarded – undo
30 30
 
31 31
         /** Migrate the part locations for parts with known instock */
32 32
         $this->addSql(
33
-            'INSERT INTO part_lots (id_part, id_store_location, amount, instock_unknown, last_modified, datetime_added) ' .
34
-                'SELECT parts.id, parts.id_storelocation,  parts.instock, 0, NOW(), NOW() FROM parts ' .
33
+            'INSERT INTO part_lots (id_part, id_store_location, amount, instock_unknown, last_modified, datetime_added) '.
34
+                'SELECT parts.id, parts.id_storelocation,  parts.instock, 0, NOW(), NOW() FROM parts '.
35 35
                 'WHERE parts.instock >= 0'
36 36
         );
37 37
 
38 38
         //Migrate part locations for parts with unknown instock
39 39
         $this->addSql(
40
-            'INSERT INTO part_lots (id_part, id_store_location, amount, instock_unknown, last_modified, datetime_added) ' .
41
-            'SELECT parts.id, parts.id_storelocation, 0, 1, NOW(), NOW() FROM parts ' .
40
+            'INSERT INTO part_lots (id_part, id_store_location, amount, instock_unknown, last_modified, datetime_added) '.
41
+            'SELECT parts.id, parts.id_storelocation, 0, 1, NOW(), NOW() FROM parts '.
42 42
             'WHERE parts.instock = -2'
43 43
         );
44 44
 
Please login to merge, or discard this patch.
src/Form/Part/PartBaseType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
             ->add('description', CKEditorType::class, ['required' => false, 'empty_data' => '',
82 82
                 'label' => 'description.label', 'help' => 'bbcode.hint', 'config_name' => 'description_config',
83 83
                 'attr' => ['placeholder' => 'part.description.placeholder', 'rows' => 2],
84
-                'disabled' => !$this->security->isGranted('description.edit', $part) ])
84
+                'disabled' => !$this->security->isGranted('description.edit', $part)])
85 85
             ->add('minAmount', SIUnitType::class,
86 86
                 ['attr' => ['min' => 0, 'placeholder' => 'part.mininstock.placeholder'], 'label' => 'mininstock.label',
87 87
                     'show_prefix' => $use_si_prefix, "unit" => $part_unit_name, "is_integer" => !$part->useFloatAmount(),
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                 'disabled' => !$this->security->isGranted('move', $part), ])
95 95
             ->add('tags', TextType::class, ['required' => false, 'label' => 'part.tags', 'empty_data' => "",
96 96
                 'attr' => ['data-role' => 'tagsinput'],
97
-                'disabled' => !$this->security->isGranted('edit', $part) ]);
97
+                'disabled' => !$this->security->isGranted('edit', $part)]);
98 98
 
99 99
         //Manufacturer section
100 100
         $builder->add('manufacturer', StructuralEntityType::class, ['class' => Manufacturer::class,
Please login to merge, or discard this patch.
src/Form/Type/SIUnitType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
 
70 70
         if ($options['show_prefix']) {
71 71
             $builder->add('prefix', ChoiceType::class, [
72
-                'choices' => ['M' => 6, 'k' => 3, '' => 0, 'm' => -3 ]
72
+                'choices' => ['M' => 6, 'k' => 3, '' => 0, 'm' => -3]
73 73
             ]);
74 74
         }
75 75
 
Please login to merge, or discard this patch.