Passed
Push — master ( 84cb5a...55d268 )
by Jan
11:05 queued 06:38
created
src/Form/Permissions/PermissionsType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     {
46 46
         $resolver->setDefaults([
47 47
             'show_legend' => true,
48
-            'constraints' => function (Options $options) {
48
+            'constraints' => function(Options $options) {
49 49
                 if (!$options['disabled']) {
50 50
                     return [new NoLockout()];
51 51
                 }
Please login to merge, or discard this patch.
src/Controller/PartController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@
 block discarded – undo
151 151
         $cid = $request->get('cid', 1);
152 152
 
153 153
         $category = $em->find(Category::class, $cid);
154
-        if($category !== null) {
154
+        if ($category !== null) {
155 155
             $new_part->setCategory($category);
156 156
         }
157 157
 
Please login to merge, or discard this patch.
src/DataTables/PartsDataTable.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
         $dataTable
162 162
             ->add('picture', TextColumn::class, [
163 163
                 'label' => '',
164
-                'render' => function ($value, Part $context) {
164
+                'render' => function($value, Part $context) {
165 165
                     $preview_attachment = $this->previewGenerator->getTablePreviewAttachment($context);
166 166
                     if (null === $preview_attachment) {
167 167
                         return '';
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
             ])
179 179
             ->add('name', TextColumn::class, [
180 180
                 'label' => $this->translator->trans('part.table.name'),
181
-                'render' => function ($value, Part $context) {
181
+                'render' => function($value, Part $context) {
182 182
                     return sprintf(
183 183
                         '<a href="%s">%s</a>',
184 184
                         $this->urlGenerator->infoURL($context),
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
             ])
208 208
             ->add('storelocation', TextColumn::class, [
209 209
                 'label' => $this->translator->trans('part.table.storeLocations'),
210
-                'render' => function ($value, Part $context) {
210
+                'render' => function($value, Part $context) {
211 211
                     $tmp = [];
212 212
                     foreach ($context->getPartLots() as $lot) {
213 213
                         //Ignore lots without storelocation
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
             ])
227 227
             ->add('amount', TextColumn::class, [
228 228
                 'label' => $this->translator->trans('part.table.amount'),
229
-                'render' => function ($value, Part $context) {
229
+                'render' => function($value, Part $context) {
230 230
                     $amount = $context->getAmountSum();
231 231
 
232 232
                     return $this->amountFormatter->format($amount, $context->getPartUnit());
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
             ->add('minamount', TextColumn::class, [
236 236
                 'label' => $this->translator->trans('part.table.minamount'),
237 237
                 'visible' => false,
238
-                'render' => function ($value, Part $context) {
238
+                'render' => function($value, Part $context) {
239 239
                     return $this->amountFormatter->format($value, $context->getPartUnit());
240 240
                 },
241 241
             ])
@@ -298,12 +298,12 @@  discard block
 block discarded – undo
298 298
 
299 299
             ->addOrderBy('name')
300 300
             ->createAdapter(CustomORMAdapter::class, [
301
-                'query' => function (QueryBuilder $builder) {
301
+                'query' => function(QueryBuilder $builder) {
302 302
                     $this->getQuery($builder);
303 303
                 },
304 304
                 'entity' => Part::class,
305 305
                 'criteria' => [
306
-                    function (QueryBuilder $builder) use ($options) {
306
+                    function(QueryBuilder $builder) use ($options) {
307 307
                         $this->buildCriteria($builder, $options);
308 308
                     },
309 309
                     new SearchCriteriaProvider(),
Please login to merge, or discard this patch.
src/DataTables/Column/PartAttachmentsColumn.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
             throw new \RuntimeException('$context must be a Part object!');
65 65
         }
66 66
         $tmp = "";
67
-        $attachments = $context->getAttachments()->filter(function (Attachment $attachment) {
67
+        $attachments = $context->getAttachments()->filter(function(Attachment $attachment) {
68 68
             return $attachment->getShowInTable() && $this->attachmentManager->isFileExisting($attachment);
69 69
         });
70 70
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
             $tmp .= sprintf(
79 79
                 '<a href="%s" title="%s" class="attach-table-icon" target="_blank" rel="noopener" data-no-ajax>%s</a>',
80 80
                 $this->urlGenerator->viewURL($attachment),
81
-                htmlspecialchars($attachment->getName()) . ': ' . htmlspecialchars($attachment->getFilename()),
81
+                htmlspecialchars($attachment->getName()).': '.htmlspecialchars($attachment->getFilename()),
82 82
                 $this->FAIconGenerator->generateIconHTML(
83 83
                     // Sometimes the extension can not be determined, so ensure a generic icon is shown
84 84
                     $this->FAIconGenerator->fileExtensionToFAType($attachment->getExtension() ?? 'file'),
Please login to merge, or discard this patch.
src/DataTables/AttachmentDataTable.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     {
69 69
         $dataTable->add('picture', TextColumn::class, [
70 70
             'label' => '',
71
-            'render' => function ($value, Attachment $context) {
71
+            'render' => function($value, Attachment $context) {
72 72
                 if ($context->isPicture()
73 73
                     && !$context->isExternal()
74 74
                     && $this->attachmentHelper->isFileExisting($context)) {
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
         $dataTable->add('name', TextColumn::class, [
89 89
             'label' => $this->translator->trans('attachment.edit.name'),
90
-            'render' => function ($value, Attachment $context) {
90
+            'render' => function($value, Attachment $context) {
91 91
                 //Link to external source
92 92
                 if ($context->isExternal()) {
93 93
                     return sprintf(
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         $dataTable->add('attachment_type', TextColumn::class, [
113 113
             'label' => $this->translator->trans('attachment.table.type'),
114 114
             'field' => 'attachment_type.name',
115
-            'render' => function ($value, Attachment $context) {
115
+            'render' => function($value, Attachment $context) {
116 116
                 return sprintf(
117 117
                     '<a href="%s">%s</a>',
118 118
                     $this->entityURLGenerator->editURL($context->getAttachmentType()),
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
         $dataTable->add('element', TextColumn::class, [
125 125
             'label' => $this->translator->trans('attachment.table.element'),
126 126
             //'propertyPath' => 'element.name',
127
-            'render' => function ($value, Attachment $context) {
127
+            'render' => function($value, Attachment $context) {
128 128
                 return sprintf(
129 129
                     '<a href="%s">%s</a>',
130 130
                     $this->entityURLGenerator->infoURL($context->getElement()),
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         ]);
139 139
 
140 140
         $dataTable->add('filesize', TextColumn::class, [
141
-            'render' => function ($value, Attachment $context) {
141
+            'render' => function($value, Attachment $context) {
142 142
                 if ($this->attachmentHelper->isFileExisting($context)) {
143 143
                     return $this->attachmentHelper->getHumanFileSize($context);
144 144
                 }
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
 
203 203
         $dataTable->createAdapter(ORMAdapter::class, [
204 204
             'entity' => Attachment::class,
205
-            'query' => function (QueryBuilder $builder) {
205
+            'query' => function(QueryBuilder $builder) {
206 206
                 $this->getQuery($builder);
207 207
             },
208 208
         ]);
Please login to merge, or discard this patch.
src/EventSubscriber/MailFromListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
 
35 35
     public function __construct(string $email, string $name)
36 36
     {
37
-        $this->email =  $email;
37
+        $this->email = $email;
38 38
         $this->name = $name;
39 39
     }
40 40
 
Please login to merge, or discard this patch.
src/Services/CustomEnvVarProcessor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
         if ('validMailDSN' === $prefix) {
37 37
             try {
38 38
                 $env = $getEnv($name);
39
-                return !empty($env)  && $env !== 'null://null';
39
+                return !empty($env) && $env !== 'null://null';
40 40
             } catch (EnvNotFoundException $exception) {
41 41
                 return false;
42 42
             }
Please login to merge, or discard this patch.
src/Form/UserSettingsType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
                 'required' => false,
96 96
                 'attr' => ['class' => 'selectpicker'],
97 97
                 'choices' => User::AVAILABLE_THEMES,
98
-                'choice_label' => function ($entity, $key, $value) {
98
+                'choice_label' => function($entity, $key, $value) {
99 99
                     return $value;
100 100
                 },
101 101
                 'placeholder' => 'user_settings.theme.placeholder',
Please login to merge, or discard this patch.
src/Form/Part/OrderdetailType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 {
43 43
     protected $security;
44 44
 
45
-    public function __construct( Security $security)
45
+    public function __construct(Security $security)
46 46
     {
47 47
         $this->security = $security;
48 48
     }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         ]);
78 78
 
79 79
         //Add pricedetails after we know the data, so we can set the default currency
80
-        $builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) use ($options) {
80
+        $builder->addEventListener(FormEvents::PRE_SET_DATA, function(FormEvent $event) use ($options) {
81 81
             /** @var Orderdetail $orderdetail */
82 82
             $orderdetail = $event->getData();
83 83
 
Please login to merge, or discard this patch.