Completed
Push — master ( fd4b47...fbc5b1 )
by Jan
03:42
created
src/Form/AdminPages/MassCreationForm.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 import if user is not allowed to create elements.
62 62
         $entity = new $data['entity_class']();
63 63
         $perm_name = "create";
64
-        $disabled = ! $this->security->isGranted($perm_name, $entity);
64
+        $disabled = !$this->security->isGranted($perm_name, $entity);
65 65
 
66 66
         $builder
67 67
             ->add('lines', TextareaType::class, ['data' => '', 'label' => 'mass_creation.lines',
Please login to merge, or discard this patch.
src/Controller/AdminPages/BaseAdminController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             $em->flush();
97 97
             //$this->addFlash('success', $translator->trans('part.created_flash'));
98 98
 
99
-            return $this->redirectToRoute($this->route_base . '_edit', ['id' => $new_entity->getID()]);
99
+            return $this->redirectToRoute($this->route_base.'_edit', ['id' => $new_entity->getID()]);
100 100
         }
101 101
 
102 102
         //Import form
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 
116 116
             foreach ($errors as $name => $error) {
117 117
                 /** @var $error ConstraintViolationList */
118
-                $this->addFlash('error', $name . ":" . $error);
118
+                $this->addFlash('error', $name.":".$error);
119 119
             }
120 120
         }
121 121
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
             //Show errors to user:
135 135
             foreach ($errors as $name => $error) {
136 136
                 /** @var $error ConstraintViolationList */
137
-                $this->addFlash('error', $name . ":" . $error);
137
+                $this->addFlash('error', $name.":".$error);
138 138
             }
139 139
         }
140 140
 
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
             $this->addFlash('success', 'attachment_type.deleted');
176 176
         }
177 177
 
178
-        return $this->redirectToRoute($this->route_base .  '_new');
178
+        return $this->redirectToRoute($this->route_base.'_new');
179 179
     }
180 180
 
181 181
     protected function _exportAll(EntityManagerInterface $em, EntityExporter $exporter, Request $request)
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 
187 187
         $entities = $em->getRepository($this->entity_class)->findAll();
188 188
 
189
-        return $exporter->exportEntityFromRequest($entities,$request);
189
+        return $exporter->exportEntityFromRequest($entities, $request);
190 190
     }
191 191
 
192 192
     protected function _exportEntity(NamedDBElement $entity, EntityExporter $exporter, Request $request)
Please login to merge, or discard this patch.
src/Command/UpdateExchangeRatesCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
             return;
56 56
         }
57 57
 
58
-        $io->note('Update currency exchange rates with base currency: ' . $this->base_current);
58
+        $io->note('Update currency exchange rates with base currency: '.$this->base_current);
59 59
 
60 60
         $service = $input->getOption('service');
61 61
         $api_key = $input->getOption('api_key');
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         //Iterate over each candidate and update exchange rate
82 82
         foreach ($candidates as $currency) {
83 83
             try {
84
-                $rate = $swap->latest($currency->getIsoCode() . '/' . $this->base_current);
84
+                $rate = $swap->latest($currency->getIsoCode().'/'.$this->base_current);
85 85
                 $currency->setExchangeRate($rate->getValue());
86 86
                 $io->note(sprintf('Set exchange rate of %s to %f', $currency->getIsoCode(), $currency->getExchangeRate()));
87 87
                 $this->em->persist($currency);
Please login to merge, or discard this patch.
src/Form/AdminPages/CurrencyAdminForm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
     {
45 45
         $is_new = $entity->getID() === null;
46 46
 
47
-        $builder->add('iso_code', CurrencyType::class , ['required' => true,
47
+        $builder->add('iso_code', CurrencyType::class, ['required' => true,
48 48
             'label' => 'currency.iso_code.label',
49 49
             'preferred_choices' => ['EUR', 'USD', 'GBP', 'JPY', 'CNY'],
50 50
             'attr' => ['class' => 'selectpicker', 'data-live-search' => true],
Please login to merge, or discard this patch.
src/Form/AdminPages/BaseEntityAdminForm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
 
77 77
             ->add('not_selectable', CheckboxType::class, ['required' => false,
78 78
                 'label' => 'not_selectable.label', 'help' => 'not_selectable.help', 'label_attr'=> ['class' => 'checkbox-custom'],
79
-                'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity) ])
79
+                'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity)])
80 80
 
81 81
             ->add('comment', CKEditorType::class, ['required' => false, 'empty_data' => '',
82 82
                 'label' => 'comment.label', 'attr' => ['rows' => 4], 'help' => 'bbcode.hint',
Please login to merge, or discard this patch.
src/Form/Type/StructuralEntityType.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -66,15 +66,15 @@  discard block
 block discarded – undo
66 66
 
67 67
         $resolver->setDefaults(['attr' => ['class' => 'selectpicker', 'data-live-search' => true],
68 68
             'show_fullpath_in_subtext' => true, //When this is enabled, the full path will be shown in subtext
69
-            'subentities_of' => null,   //Only show entities with the given parent class
70
-            'disable_not_selectable' => false,  //Disable entries with not selectable property
71
-            'choice_loader' => function (Options $options) {
72
-                return new CallbackChoiceLoader(function () use ($options) {
69
+            'subentities_of' => null, //Only show entities with the given parent class
70
+            'disable_not_selectable' => false, //Disable entries with not selectable property
71
+            'choice_loader' => function(Options $options) {
72
+                return new CallbackChoiceLoader(function() use ($options) {
73 73
                     return $this->getEntries($options);
74 74
                 });
75
-            }, 'choice_label' => function ($choice, $key, $value) {
75
+            }, 'choice_label' => function($choice, $key, $value) {
76 76
                 return $this->generateChoiceLabels($choice, $key, $value);
77
-            }, 'choice_attr' => function ($choice, $key, $value) {
77
+            }, 'choice_attr' => function($choice, $key, $value) {
78 78
                 return $this->generateChoiceAttr($choice, $key, $value);
79 79
             }
80 80
         ]);
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 
110 110
 
111 111
         $tmp = str_repeat('   ', $choice->getLevel()); //Use 3 spaces for intendation
112
-        $tmp .=  htmlspecialchars($choice->getName($parent));
112
+        $tmp .= htmlspecialchars($choice->getName($parent));
113 113
         return $tmp;
114 114
     }
115 115
 
Please login to merge, or discard this patch.
src/Form/PartType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
                     'disabled' => !$this->security->isGranted('name.edit', $part), ])
66 66
             ->add('description', TextType::class, ['required' => false, 'empty_data' => '',
67 67
                 'label' => 'description.label', 'help' => 'bbcode.hint', 'attr' => ['placeholder' => 'part.description.placeholder'],
68
-                'disabled' => !$this->security->isGranted('description.edit', $part), 'empty_data' => '' ])
68
+                'disabled' => !$this->security->isGranted('description.edit', $part), 'empty_data' => ''])
69 69
             /*->add('instock', IntegerType::class,
70 70
                 ['attr' => ['min' => 0, 'placeholder' => 'part.instock.placeholder'], 'label' => 'instock.label',
71 71
                 'disabled' => !$this->security->isGranted('instock.edit', $part), ]) */
Please login to merge, or discard this patch.
src/Form/AdminPages/SupplierForm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
             'required' => false, 'label' => 'supplier.default_currency.label', 'disable_not_selectable' => true,
94 94
         'disabled' => !$this->security->isGranted($is_new ? 'create' : 'move', $entity), ]);
95 95
 
96
-        $builder->add('shipping_costs', MoneyType::class, [ 'required' => false,
96
+        $builder->add('shipping_costs', MoneyType::class, ['required' => false,
97 97
             'currency' => $this->params->get('default_currency'), 'scale' => 3,
98 98
             'label' => 'supplier.shipping_costs.label',
99 99
             'disabled' => !$this->security->isGranted($is_new ? 'create' : 'move', $entity)
Please login to merge, or discard this patch.