Passed
Pull Request — master (#78)
by
unknown
09:17 queued 04:28
created
src/EventSubscriber/LogSystem/EventLoggerSubscriber.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
             return $fields;
305 305
         }
306 306
 
307
-        return array_filter($fields, function ($value, $key) use ($element) {
307
+        return array_filter($fields, function($value, $key) use ($element) {
308 308
             //Associative array (save changed data) case
309 309
             if (is_string($key)) {
310 310
                 return $this->shouldFieldBeSaved($element, $key);
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
 
333 333
         //Restrict length of string fields, to save memory...
334 334
         $old_data = array_map(
335
-            static function ($value) {
335
+            static function($value) {
336 336
                 if (is_string($value)) {
337 337
                     return mb_strimwidth($value, 0, self::MAX_STRING_LENGTH, '...');
338 338
                 }
Please login to merge, or discard this patch.
src/Services/AmountFormatter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     protected function configureOptions(OptionsResolver $resolver): void
107 107
     {
108 108
         $resolver->setDefaults([
109
-            'show_prefix' => static function (Options $options) {
109
+            'show_prefix' => static function(Options $options) {
110 110
                 if (null !== $options['measurement_unit']) {
111 111
                     /** @var MeasurementUnit $unit */
112 112
                     $unit = $options['measurement_unit'];
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 
117 117
                 return false;
118 118
             },
119
-            'is_integer' => static function (Options $options) {
119
+            'is_integer' => static function(Options $options) {
120 120
                 if (null !== $options['measurement_unit']) {
121 121
                     /** @var MeasurementUnit $unit */
122 122
                     $unit = $options['measurement_unit'];
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
                 return true;
128 128
             },
129
-            'unit' => static function (Options $options) {
129
+            'unit' => static function(Options $options) {
130 130
                 if (null !== $options['measurement_unit']) {
131 131
                     /** @var MeasurementUnit $unit */
132 132
                     $unit = $options['measurement_unit'];
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 
145 145
         $resolver->setAllowedTypes('decimals', 'int');
146 146
 
147
-        $resolver->setNormalizer('decimals', static function (Options $options, $value) {
147
+        $resolver->setNormalizer('decimals', static function(Options $options, $value) {
148 148
             // If the unit is integer based, then dont show any decimals
149 149
             if ($options['is_integer']) {
150 150
                 return 0;
Please login to merge, or discard this patch.
src/Services/PricedetailHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
             } else {
86 86
                 // We have to sort the pricedetails manually
87 87
                 $array = $pricedetails->map(
88
-                    static function (Pricedetail $pricedetail) {
88
+                    static function(Pricedetail $pricedetail) {
89 89
                         return $pricedetail->getMinDiscountQuantity();
90 90
                     }
91 91
                 )->toArray();
Please login to merge, or discard this patch.
src/Twig/AppExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
     public function getTests()
112 112
     {
113 113
         return [
114
-            new TwigTest('instanceof', static function ($var, $instance) {
114
+            new TwigTest('instanceof', static function($var, $instance) {
115 115
                 return $var instanceof $instance;
116 116
             }),
117 117
         ];
Please login to merge, or discard this patch.
src/Twig/BarcodeExtension.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     public function getFilters()
30 30
     {
31 31
         return [
32
-            new TwigFilter('barcodeSVG', static function (string $content, string $type = 'QRCODE') {
32
+            new TwigFilter('barcodeSVG', static function(string $content, string $type = 'QRCODE') {
33 33
                 $barcodeFactory = new Barcode();
34 34
                 $barcode = $barcodeFactory->getBarcodeObj($type, $content);
35 35
 
Please login to merge, or discard this patch.
src/Twig/Sandbox/InheritanceSecurityPolicy.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
         $this->allowedMethods = [];
62 62
         foreach ($methods as $class => $m) {
63 63
             $this->allowedMethods[$class] = array_map(
64
-                static function ($value) { return strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); }, \is_array($m) ? $m : [$m]);
64
+                static function($value) { return strtr($value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz'); }, \is_array($m) ? $m : [$m]);
65 65
         }
66 66
     }
67 67
 
Please login to merge, or discard this patch.
src/DataTables/Column/EntityColumn.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -79,12 +79,12 @@
 block discarded – undo
79 79
 
80 80
         $resolver->setRequired('property');
81 81
 
82
-        $resolver->setDefault('field', static function (Options $option) {
82
+        $resolver->setDefault('field', static function(Options $option) {
83 83
             return $option['property'].'.name';
84 84
         });
85 85
 
86
-        $resolver->setDefault('render', function (Options $options) {
87
-            return function ($value, Part $context) use ($options) {
86
+        $resolver->setDefault('render', function(Options $options) {
87
+            return function($value, Part $context) use ($options) {
88 88
                 /** @var AbstractDBElement|null $entity */
89 89
                 $entity = $this->accessor->getValue($context, $options['property']);
90 90
 
Please login to merge, or discard this patch.
src/DataTables/LogDataTable.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
         $optionsResolver->setAllowedTypes('filter_elements', ['array', 'object']);
103 103
         $optionsResolver->setAllowedTypes('mode', 'string');
104 104
 
105
-        $optionsResolver->setNormalizer('filter_elements', static function (Options $options, $value) {
105
+        $optionsResolver->setNormalizer('filter_elements', static function(Options $options, $value) {
106 106
             if (!is_array($value)) {
107 107
                 return [$value];
108 108
             }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
 
122 122
         $dataTable->add('symbol', TextColumn::class, [
123 123
             'label' => '',
124
-            'render' => static function ($value, AbstractLogEntry $context) {
124
+            'render' => static function($value, AbstractLogEntry $context) {
125 125
                 switch ($context->getLevelString()) {
126 126
                     case LogLevel::DEBUG:
127 127
                         $symbol = 'fa-bug';
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
         $dataTable->add('type', TextColumn::class, [
183 183
             'label' => $this->translator->trans('log.type'),
184 184
             'propertyPath' => 'type',
185
-            'render' => function (string $value, AbstractLogEntry $context) {
185
+            'render' => function(string $value, AbstractLogEntry $context) {
186 186
                 return $this->translator->trans('log.type.'.$value);
187 187
             },
188 188
         ]);
@@ -191,14 +191,14 @@  discard block
 block discarded – undo
191 191
             'label' => $this->translator->trans('log.level'),
192 192
             'visible' => 'system_log' === $options['mode'],
193 193
             'propertyPath' => 'levelString',
194
-            'render' => static function (string $value, AbstractLogEntry $context) {
194
+            'render' => static function(string $value, AbstractLogEntry $context) {
195 195
                 return $value;
196 196
             },
197 197
         ]);
198 198
 
199 199
         $dataTable->add('user', TextColumn::class, [
200 200
             'label' => $this->translator->trans('log.user'),
201
-            'render' => function ($value, AbstractLogEntry $context) {
201
+            'render' => function($value, AbstractLogEntry $context) {
202 202
                 $user = $context->getUser();
203 203
 
204 204
                 return sprintf(
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
         $dataTable->add('target_type', TextColumn::class, [
213 213
             'label' => $this->translator->trans('log.target_type'),
214 214
             'visible' => false,
215
-            'render' => function ($value, AbstractLogEntry $context) {
215
+            'render' => function($value, AbstractLogEntry $context) {
216 216
                 $class = $context->getTargetClass();
217 217
                 if (null !== $class) {
218 218
                     return $this->elementTypeNameGenerator->getLocalizedTypeLabel($class);
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
         $dataTable->add('timeTravel', IconLinkColumn::class, [
235 235
             'label' => '',
236 236
             'icon' => 'fas fa-fw fa-eye',
237
-            'href' => function ($value, AbstractLogEntry $context) {
237
+            'href' => function($value, AbstractLogEntry $context) {
238 238
                 if (
239 239
                     ($context instanceof TimeTravelInterface
240 240
                         && $context->hasOldDataInformations())
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 
253 253
                 return null;
254 254
             },
255
-            'disabled' => function ($value, AbstractLogEntry $context) {
255
+            'disabled' => function($value, AbstractLogEntry $context) {
256 256
                 return
257 257
                     !$this->security->isGranted('@tools.timetravel')
258 258
                     || !$this->security->isGranted('show_history', $context->getTargetClass());
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 
268 268
         $dataTable->createAdapter(ORMAdapter::class, [
269 269
             'entity' => AbstractLogEntry::class,
270
-            'query' => function (QueryBuilder $builder) use ($options): void {
270
+            'query' => function(QueryBuilder $builder) use ($options): void {
271 271
                 $this->getQuery($builder, $options);
272 272
             },
273 273
         ]);
Please login to merge, or discard this patch.
src/DataTables/Adapter/ORMAdapter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 
294 294
     protected function configureOptions(OptionsResolver $resolver): void
295 295
     {
296
-        $providerNormalizer = function (Options $options, $value) {
296
+        $providerNormalizer = function(Options $options, $value) {
297 297
             return array_map([$this, 'normalizeProcessor'], (array) $value);
298 298
         };
299 299
 
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
             ->setDefaults([
302 302
                 'hydrate' => Query::HYDRATE_OBJECT,
303 303
                 'query' => [],
304
-                'criteria' => static function (Options $options) {
304
+                'criteria' => static function(Options $options) {
305 305
                     return [new SearchCriteriaProvider()];
306 306
                 },
307 307
             ])
Please login to merge, or discard this patch.