Passed
Push — master ( d03586...6b06ce )
by Jan
15:31
created
src/Services/LogSystem/LogEntryExtraFormatter.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
                 $context->getOldStock(),
187 187
                 '<i class="fa-solid fa-right-long"></i>',
188 188
                 $context->getNewStock(),
189
-                ($context->getNewStock() > $context->getOldStock() ? '+' : '-'). $context->getChangeAmount(),
189
+                ($context->getNewStock() > $context->getOldStock() ? '+' : '-').$context->getChangeAmount(),
190 190
             );
191 191
             if (!empty($context->getComment())) {
192 192
                 $array['log.part_stock_changed.comment'] = htmlspecialchars($context->getComment());
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
             if ($context->getInstockChangeType() === PartStockChangedLogEntry::TYPE_MOVE) {
195 195
                 $array['log.part_stock_changed.move_target'] =
196 196
                     $this->elementTypeNameGenerator->getLocalizedTypeLabel(PartLot::class)
197
-                    .' ' . $context->getMoveToTargetID();
197
+                    .' '.$context->getMoveToTargetID();
198 198
             }
199 199
         }
200 200
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
     {
206 206
         $output = [];
207 207
 
208
-        foreach($entry->getChangedFields() as $field) {
208
+        foreach ($entry->getChangedFields() as $field) {
209 209
             $key = 'log.element_edited.changed_fields.'.$field;
210 210
             //If the key is not found, use the field name as a fallback
211 211
             $tmp = $this->translator->trans($key);
Please login to merge, or discard this patch.
src/DataTables/LogDataTable.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
         $optionsResolver->setAllowedTypes('mode', 'string');
97 97
         $optionsResolver->setAllowedTypes('filter', ['null', LogFilter::class]);
98 98
 
99
-        $optionsResolver->setNormalizer('filter_elements', static function (Options $options, $value) {
99
+        $optionsResolver->setNormalizer('filter_elements', static function(Options $options, $value) {
100 100
             if (!is_array($value)) {
101 101
                 return [$value];
102 102
             }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 
116 116
         //This special $$rowClass column is used to set the row class depending on the log level. The class gets set by the frontend controller
117 117
         $dataTable->add('dont_matter', RowClassColumn::class, [
118
-            'render' => static function ($value, AbstractLogEntry $context) {
118
+            'render' => static function($value, AbstractLogEntry $context) {
119 119
                 switch ($context->getLevel()) {
120 120
                     case AbstractLogEntry::LEVEL_EMERGENCY:
121 121
                     case AbstractLogEntry::LEVEL_ALERT:
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         $dataTable->add('symbol', TextColumn::class, [
136 136
             'label' => '',
137 137
             'className' => 'no-colvis',
138
-            'render' => static function ($value, AbstractLogEntry $context) {
138
+            'render' => static function($value, AbstractLogEntry $context) {
139 139
                 switch ($context->getLevelString()) {
140 140
                     case LogLevel::DEBUG:
141 141
                         $symbol = 'fa-bug';
@@ -196,13 +196,13 @@  discard block
 block discarded – undo
196 196
         $dataTable->add('type', TextColumn::class, [
197 197
             'label' => 'log.type',
198 198
             'propertyPath' => 'type',
199
-            'render' => function (string $value, AbstractLogEntry $context) {
199
+            'render' => function(string $value, AbstractLogEntry $context) {
200 200
                 $text = $this->translator->trans('log.type.'.$value);
201 201
 
202 202
                 if ($context instanceof PartStockChangedLogEntry) {
203 203
                     $text .= sprintf(
204 204
                         ' (<i>%s</i>)',
205
-                        $this->translator->trans('log.part_stock_changed.' . $context->getInstockChangeType())
205
+                        $this->translator->trans('log.part_stock_changed.'.$context->getInstockChangeType())
206 206
                     );
207 207
                 }
208 208
 
@@ -214,14 +214,14 @@  discard block
 block discarded – undo
214 214
             'label' => 'log.level',
215 215
             'visible' => 'system_log' === $options['mode'],
216 216
             'propertyPath' => 'levelString',
217
-            'render' => function (string $value, AbstractLogEntry $context) {
217
+            'render' => function(string $value, AbstractLogEntry $context) {
218 218
                 return $this->translator->trans('log.level.'.$value);
219 219
             },
220 220
         ]);
221 221
 
222 222
         $dataTable->add('user', TextColumn::class, [
223 223
             'label' => 'log.user',
224
-            'render' => function ($value, AbstractLogEntry $context) {
224
+            'render' => function($value, AbstractLogEntry $context) {
225 225
                 $user = $context->getUser();
226 226
 
227 227
                 //If user was deleted, show the info from the username field
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         $dataTable->add('target_type', TextColumn::class, [
249 249
             'label' => 'log.target_type',
250 250
             'visible' => false,
251
-            'render' => function ($value, AbstractLogEntry $context) {
251
+            'render' => function($value, AbstractLogEntry $context) {
252 252
                 $class = $context->getTargetClass();
253 253
                 if (null !== $class) {
254 254
                     return $this->elementTypeNameGenerator->getLocalizedTypeLabel($class);
@@ -270,7 +270,7 @@  discard block
 block discarded – undo
270 270
         $dataTable->add('timeTravel', IconLinkColumn::class, [
271 271
             'label' => '',
272 272
             'icon' => 'fas fa-fw fa-eye',
273
-            'href' => function ($value, AbstractLogEntry $context) {
273
+            'href' => function($value, AbstractLogEntry $context) {
274 274
                 if (
275 275
                     ($context instanceof TimeTravelInterface
276 276
                         && $context->hasOldDataInformations())
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 
289 289
                 return null;
290 290
             },
291
-            'disabled' => function ($value, AbstractLogEntry $context) {
291
+            'disabled' => function($value, AbstractLogEntry $context) {
292 292
                 return !$this->security->isGranted('show_history', $context->getTargetClass());
293 293
             },
294 294
         ]);
@@ -301,11 +301,11 @@  discard block
 block discarded – undo
301 301
 
302 302
         $dataTable->createAdapter(ORMAdapter::class, [
303 303
             'entity' => AbstractLogEntry::class,
304
-            'query' => function (QueryBuilder $builder) use ($options): void {
304
+            'query' => function(QueryBuilder $builder) use ($options): void {
305 305
                 $this->getQuery($builder, $options);
306 306
             },
307 307
             'criteria' => [
308
-                function (QueryBuilder $builder) use ($options): void {
308
+                function(QueryBuilder $builder) use ($options): void {
309 309
                     $this->buildCriteria($builder, $options);
310 310
                 },
311 311
                 new SearchCriteriaProvider(),
Please login to merge, or discard this patch.