Passed
Push — master ( fe9587...fca2ad )
by Jan
04:47
created
src/DataTables/LogDataTable.php 1 patch
Spacing   +12 added lines, -12 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', function (Options $options, $value) {
105
+        $optionsResolver->setNormalizer('filter_elements', function(Options $options, $value) {
106 106
             if (!is_array($value)) {
107 107
                 return [$value];
108 108
             }
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
         $dataTable->add('symbol', TextColumn::class, [
122 122
             'label' => '',
123
-            'render' => function ($value, AbstractLogEntry $context) {
123
+            'render' => function($value, AbstractLogEntry $context) {
124 124
                 switch ($context->getLevelString()) {
125 125
                     case LogLevel::DEBUG:
126 126
                         $symbol = 'fa-bug';
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
         $dataTable->add('type', TextColumn::class, [
182 182
             'label' => $this->translator->trans('log.type'),
183 183
             'propertyPath' => 'type',
184
-            'render' => function (string $value, AbstractLogEntry $context) {
184
+            'render' => function(string $value, AbstractLogEntry $context) {
185 185
                 return $this->translator->trans('log.type.'.$value);
186 186
             },
187 187
         ]);
@@ -190,14 +190,14 @@  discard block
 block discarded – undo
190 190
             'label' => $this->translator->trans('log.level'),
191 191
             'visible' => 'system_log' === $options['mode'],
192 192
             'propertyPath' => 'levelString',
193
-            'render' => function (string $value, AbstractLogEntry $context) {
193
+            'render' => function(string $value, AbstractLogEntry $context) {
194 194
                 return $value;
195 195
             },
196 196
         ]);
197 197
 
198 198
         $dataTable->add('user', TextColumn::class, [
199 199
             'label' => $this->translator->trans('log.user'),
200
-            'render' => function ($value, AbstractLogEntry $context) {
200
+            'render' => function($value, AbstractLogEntry $context) {
201 201
                 $user = $context->getUser();
202 202
 
203 203
                 return sprintf(
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
         $dataTable->add('target_type', TextColumn::class, [
212 212
             'label' => $this->translator->trans('log.target_type'),
213 213
             'visible' => false,
214
-            'render' => function ($value, AbstractLogEntry $context) {
214
+            'render' => function($value, AbstractLogEntry $context) {
215 215
                 $class = $context->getTargetClass();
216 216
                 if (null !== $class) {
217 217
                     return $this->elementTypeNameGenerator->getLocalizedTypeLabel($class);
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
         $dataTable->add('timeTravel', IconLinkColumn::class, [
234 234
             'label' => '',
235 235
             'icon' => 'fas fa-fw fa-eye',
236
-            'href' => function ($value, AbstractLogEntry $context) {
236
+            'href' => function($value, AbstractLogEntry $context) {
237 237
                 if (
238 238
                     ($context instanceof TimeTravelInterface
239 239
                         && $context->hasOldDataInformations())
@@ -251,10 +251,10 @@  discard block
 block discarded – undo
251 251
 
252 252
                 return null;
253 253
             },
254
-            'disabled' => function ($value, AbstractLogEntry $context) {
254
+            'disabled' => function($value, AbstractLogEntry $context) {
255 255
                 return
256
-                    ! $this->security->isGranted('@tools.timetravel')
257
-                    || ! $this->security->isGranted('show_history', $context->getTargetClass());
256
+                    !$this->security->isGranted('@tools.timetravel')
257
+                    || !$this->security->isGranted('show_history', $context->getTargetClass());
258 258
             },
259 259
         ]);
260 260
 
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 
267 267
         $dataTable->createAdapter(ORMAdapter::class, [
268 268
             'entity' => AbstractLogEntry::class,
269
-            'query' => function (QueryBuilder $builder) use ($options): void {
269
+            'query' => function(QueryBuilder $builder) use ($options): void {
270 270
                 $this->getQuery($builder, $options);
271 271
             },
272 272
         ]);
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
             ]);
293 293
         }
294 294
 
295
-        if (! empty($options['filter_elements'])) {
295
+        if (!empty($options['filter_elements'])) {
296 296
             foreach ($options['filter_elements'] as $element) {
297 297
                 /** @var AbstractDBElement $element */
298 298
 
Please login to merge, or discard this patch.