Passed
Push — master ( 297d77...a008ba )
by Jan
04:27
created
src/Form/AdminPages/SupplierForm.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             'required' => false,
72 72
             'label' => 'supplier.edit.default_currency',
73 73
             'disable_not_selectable' => true,
74
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'move', $entity),
74
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'move', $entity),
75 75
         ]);
76 76
 
77 77
         $builder->add('shipping_costs', BigDecimalMoneyType::class, [
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             'currency' => $this->default_currency,
80 80
             'scale' => 3,
81 81
             'label' => 'supplier.shipping_costs.label',
82
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'move', $entity),
82
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'move', $entity),
83 83
         ]);
84 84
     }
85 85
 }
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
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
                 'title' => 'selectpicker.nothing_selected',
73 73
                 'data-live-search' => true,
74 74
             ],
75
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
75
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
76 76
         ]);
77 77
 
78 78
         $builder->add('exchange_rate', BigDecimalMoneyType::class, [
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             'label' => 'currency.edit.exchange_rate',
81 81
             'currency' => $this->default_currency,
82 82
             'scale' => 6,
83
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
83
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
84 84
         ]);
85 85
     }
86 86
 }
Please login to merge, or discard this patch.
src/DataTables/PartsDataTable.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
         $optionsResolver->setAllowedTypes('search', ['null', 'string']);
120 120
 
121 121
         //Configure search options
122
-        $optionsResolver->setDefault('search_options', function (OptionsResolver $resolver): void {
122
+        $optionsResolver->setDefault('search_options', function(OptionsResolver $resolver): void {
123 123
             $resolver->setDefaults([
124 124
                 'name' => true,
125 125
                 'category' => true,
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
         $dataTable
156 156
             ->add('picture', TextColumn::class, [
157 157
                 'label' => '',
158
-                'render' => function ($value, Part $context) {
158
+                'render' => function($value, Part $context) {
159 159
                     $preview_attachment = $this->previewGenerator->getTablePreviewAttachment($context);
160 160
                     if (null === $preview_attachment) {
161 161
                         return '';
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
             ])
173 173
             ->add('name', TextColumn::class, [
174 174
                 'label' => $this->translator->trans('part.table.name'),
175
-                'render' => function ($value, Part $context) {
175
+                'render' => function($value, Part $context) {
176 176
                     return sprintf(
177 177
                         '<a href="%s">%s</a>',
178 178
                         $this->urlGenerator->infoURL($context),
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
             ])
202 202
             ->add('storelocation', TextColumn::class, [
203 203
                 'label' => $this->translator->trans('part.table.storeLocations'),
204
-                'render' => function ($value, Part $context) {
204
+                'render' => function($value, Part $context) {
205 205
                     $tmp = [];
206 206
                     foreach ($context->getPartLots() as $lot) {
207 207
                         //Ignore lots without storelocation
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
             ])
221 221
             ->add('amount', TextColumn::class, [
222 222
                 'label' => $this->translator->trans('part.table.amount'),
223
-                'render' => function ($value, Part $context) {
223
+                'render' => function($value, Part $context) {
224 224
                     $amount = $context->getAmountSum();
225 225
 
226 226
                     return $this->amountFormatter->format($amount, $context->getPartUnit());
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
             ->add('minamount', TextColumn::class, [
230 230
                 'label' => $this->translator->trans('part.table.minamount'),
231 231
                 'visible' => false,
232
-                'render' => function ($value, Part $context) {
232
+                'render' => function($value, Part $context) {
233 233
                     return $this->amountFormatter->format($value, $context->getPartUnit());
234 234
                 },
235 235
             ])
@@ -292,10 +292,10 @@  discard block
 block discarded – undo
292 292
             ->add('edit', IconLinkColumn::class, [
293 293
                 'label' => $this->translator->trans('part.table.edit'),
294 294
                 'visible' => false,
295
-                'href' => function ($value, Part $context) {
295
+                'href' => function($value, Part $context) {
296 296
                     return $this->urlGenerator->editURL($context);
297 297
                 },
298
-                'disabled' => function ($value, Part $context) {
298
+                'disabled' => function($value, Part $context) {
299 299
                     return !$this->security->isGranted('edit', $context);
300 300
                 },
301 301
                 'title' => $this->translator->trans('part.table.edit.title'),
@@ -304,12 +304,12 @@  discard block
 block discarded – undo
304 304
             ->addOrderBy('name')
305 305
             ->createAdapter(FetchJoinORMAdapter::class, [
306 306
                 'simple_total_query' => true,
307
-                'query' => function (QueryBuilder $builder): void {
307
+                'query' => function(QueryBuilder $builder): void {
308 308
                     $this->getQuery($builder);
309 309
                 },
310 310
                 'entity' => Part::class,
311 311
                 'criteria' => [
312
-                    function (QueryBuilder $builder) use ($options): void {
312
+                    function(QueryBuilder $builder) use ($options): void {
313 313
                         $this->buildCriteria($builder, $options);
314 314
                     },
315 315
                     new SearchCriteriaProvider(),
@@ -390,8 +390,8 @@  discard block
 block discarded – undo
390 390
             $builder->andWhere('part.tags LIKE :tag')->setParameter('tag', '%'.$options['tag'].'%');
391 391
         }
392 392
 
393
-        if (! empty($options['search'])) {
394
-            if (! $options['search_options']['regex']) {
393
+        if (!empty($options['search'])) {
394
+            if (!$options['search_options']['regex']) {
395 395
                 //Dont show results, if no things are selected
396 396
                 $builder->andWhere('0=1');
397 397
                 $defined = false;
Please login to merge, or discard this patch.
src/Controller/SelectAPIController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -107,12 +107,12 @@
 block discarded – undo
107 107
         foreach ($nodes_list as $node) {
108 108
             /** @var AbstractStructuralDBElement $node */
109 109
             $entry = [
110
-                'text' => str_repeat('&nbsp;&nbsp;&nbsp;', $node->getLevel()) . htmlspecialchars($node->getName()),
110
+                'text' => str_repeat('&nbsp;&nbsp;&nbsp;', $node->getLevel()).htmlspecialchars($node->getName()),
111 111
                 'value' => $node->getID(),
112 112
                 'data-subtext' => $node->getParent() ? $node->getParent()->getFullPath() : null,
113 113
             ];
114 114
 
115
-            $entries[] =  $entry;
115
+            $entries[] = $entry;
116 116
         }
117 117
 
118 118
         return $entries;
Please login to merge, or discard this patch.
src/Services/Parts/PartsTableActionHandler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
                     break;
100 100
 
101 101
                 default:
102
-                    throw new \InvalidArgumentException('The given action is unknown! (' . $action . ')');
102
+                    throw new \InvalidArgumentException('The given action is unknown! ('.$action.')');
103 103
             }
104 104
         }
105 105
     }
Please login to merge, or discard this patch.