@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | { |
57 | 57 | $dataTable->add('symbol', TextColumn::class, [ |
58 | 58 | 'label' => '', |
59 | - 'render' => function ($value, AbstractLogEntry $context) { |
|
59 | + 'render' => function($value, AbstractLogEntry $context) { |
|
60 | 60 | switch ($context->getLevelString()) { |
61 | 61 | case LogLevel::DEBUG: |
62 | 62 | $symbol = 'fa-bug'; |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $dataTable->add('type', TextColumn::class, [ |
114 | 114 | 'label' => $this->translator->trans('log.type'), |
115 | 115 | 'propertyPath' => 'type', |
116 | - 'render' => function (string $value, AbstractLogEntry $context) { |
|
116 | + 'render' => function(string $value, AbstractLogEntry $context) { |
|
117 | 117 | return $this->translator->trans('log.type.'.$value); |
118 | 118 | }, |
119 | 119 | ]); |
@@ -121,14 +121,14 @@ discard block |
||
121 | 121 | $dataTable->add('level', TextColumn::class, [ |
122 | 122 | 'label' => $this->translator->trans('log.level'), |
123 | 123 | 'propertyPath' => 'levelString', |
124 | - 'render' => function (string $value, AbstractLogEntry $context) { |
|
124 | + 'render' => function(string $value, AbstractLogEntry $context) { |
|
125 | 125 | return $value; |
126 | 126 | }, |
127 | 127 | ]); |
128 | 128 | |
129 | 129 | $dataTable->add('user', TextColumn::class, [ |
130 | 130 | 'label' => $this->translator->trans('log.user'), |
131 | - 'render' => function ($value, AbstractLogEntry $context) { |
|
131 | + 'render' => function($value, AbstractLogEntry $context) { |
|
132 | 132 | $user = $context->getUser(); |
133 | 133 | |
134 | 134 | return sprintf( |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | $dataTable->add('target_type', TextColumn::class, [ |
143 | 143 | 'label' => $this->translator->trans('log.target_type'), |
144 | 144 | 'visible' => false, |
145 | - 'render' => function ($value, AbstractLogEntry $context) { |
|
145 | + 'render' => function($value, AbstractLogEntry $context) { |
|
146 | 146 | $class = $context->getTargetClass(); |
147 | 147 | if (null !== $class) { |
148 | 148 | return $this->elementTypeNameGenerator->getLocalizedTypeLabel($class); |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | |
165 | 165 | $dataTable->createAdapter(ORMAdapter::class, [ |
166 | 166 | 'entity' => AbstractLogEntry::class, |
167 | - 'query' => function (QueryBuilder $builder): void { |
|
167 | + 'query' => function(QueryBuilder $builder): void { |
|
168 | 168 | $this->getQuery($builder); |
169 | 169 | }, |
170 | 170 | ]); |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | |
223 | 223 | $qb->resetDQLPart('orderBy'); |
224 | 224 | $gb = $qb->getDQLPart('groupBy'); |
225 | - if (empty($gb) || ! $this->hasGroupByPart($identifier, $gb)) { |
|
225 | + if (empty($gb) || !$this->hasGroupByPart($identifier, $gb)) { |
|
226 | 226 | $qb->select($qb->expr()->count($identifier)); |
227 | 227 | |
228 | 228 | return (int) $qb->getQuery()->getSingleScalarResult(); |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | |
282 | 282 | protected function configureOptions(OptionsResolver $resolver): void |
283 | 283 | { |
284 | - $providerNormalizer = function (Options $options, $value) { |
|
284 | + $providerNormalizer = function(Options $options, $value) { |
|
285 | 285 | return array_map([$this, 'normalizeProcessor'], (array) $value); |
286 | 286 | }; |
287 | 287 | |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | ->setDefaults([ |
290 | 290 | 'hydrate' => Query::HYDRATE_OBJECT, |
291 | 291 | 'query' => [], |
292 | - 'criteria' => function (Options $options) { |
|
292 | + 'criteria' => function(Options $options) { |
|
293 | 293 | return [new SearchCriteriaProvider()]; |
294 | 294 | }, |
295 | 295 | ]) |
@@ -62,7 +62,7 @@ |
||
62 | 62 | public function onRegister(RegisterEvent $event): void |
63 | 63 | { |
64 | 64 | //Skip adding of U2F key on demo mode |
65 | - if (! $this->demo_mode) { |
|
65 | + if (!$this->demo_mode) { |
|
66 | 66 | $user = $event->getUser(); |
67 | 67 | if (!$user instanceof User) { |
68 | 68 | throw new \InvalidArgumentException("Only User objects can be registered for U2F!"); |
@@ -41,7 +41,7 @@ |
||
41 | 41 | /** @var AbstractStructuralDBElement $element */ |
42 | 42 | $element = $this->current(); |
43 | 43 | |
44 | - return ! empty($element->getSubelements()); |
|
44 | + return !empty($element->getSubelements()); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | public function getChildren() |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public function validate($value, Constraint $constraint): void |
45 | 45 | { |
46 | - if (! $constraint instanceof Selectable) { |
|
46 | + if (!$constraint instanceof Selectable) { |
|
47 | 47 | throw new UnexpectedTypeException($constraint, Selectable::class); |
48 | 48 | } |
49 | 49 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | //Check type of value. Validating only works for StructuralDBElements |
57 | - if (! $value instanceof AbstractStructuralDBElement) { |
|
57 | + if (!$value instanceof AbstractStructuralDBElement) { |
|
58 | 58 | throw new UnexpectedValueException($value, 'StructuralDBElement'); |
59 | 59 | } |
60 | 60 |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public function validate($value, Constraint $constraint): void |
45 | 45 | { |
46 | - if (! $constraint instanceof NoneOfItsChildren) { |
|
46 | + if (!$constraint instanceof NoneOfItsChildren) { |
|
47 | 47 | throw new UnexpectedTypeException($constraint, NoneOfItsChildren::class); |
48 | 48 | } |
49 | 49 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | //Check type of value. Validating only works for StructuralDBElements |
57 | - if (! $value instanceof AbstractStructuralDBElement) { |
|
57 | + if (!$value instanceof AbstractStructuralDBElement) { |
|
58 | 58 | throw new UnexpectedValueException($value, 'StructuralDBElement'); |
59 | 59 | } |
60 | 60 |
@@ -524,7 +524,7 @@ |
||
524 | 524 | public function setName(string $new_name): AbstractNamedDBElement |
525 | 525 | { |
526 | 526 | // Anonymous user is not allowed to change its username |
527 | - if (! $this->isAnonymousUser()) { |
|
527 | + if (!$this->isAnonymousUser()) { |
|
528 | 528 | $this->name = $new_name; |
529 | 529 | } |
530 | 530 |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | |
125 | 125 | //Check if both elements compared, are from the same type |
126 | 126 | // (we have to check inheritance, or we get exceptions when using doctrine entities (they have a proxy type): |
127 | - if (! is_a($another_element, $class_name) && ! is_a($this, get_class($another_element))) { |
|
127 | + if (!is_a($another_element, $class_name) && !is_a($this, get_class($another_element))) { |
|
128 | 128 | throw new InvalidArgumentException('isChildOf() only works for objects of the same type!'); |
129 | 129 | } |
130 | 130 | |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | $tmp[] = $this; |
241 | 241 | |
242 | 242 | //We only allow 20 levels depth |
243 | - while (! end($tmp)->isRoot() && count($tmp) < 20) { |
|
243 | + while (!end($tmp)->isRoot() && count($tmp) < 20) { |
|
244 | 244 | $tmp[] = end($tmp)->parent; |
245 | 245 | } |
246 | 246 |
@@ -61,13 +61,13 @@ discard block |
||
61 | 61 | $format = $request->get('format') ?? 'json'; |
62 | 62 | |
63 | 63 | //Check if we have one of the supported formats |
64 | - if (! in_array($format, ['json', 'csv', 'yaml', 'xml'], true)) { |
|
64 | + if (!in_array($format, ['json', 'csv', 'yaml', 'xml'], true)) { |
|
65 | 65 | throw new InvalidArgumentException('Given format is not supported!'); |
66 | 66 | } |
67 | 67 | |
68 | 68 | //Check export verbosity level |
69 | 69 | $level = $request->get('level') ?? 'extended'; |
70 | - if (! in_array($level, ['simple', 'extended', 'full'], true)) { |
|
70 | + if (!in_array($level, ['simple', 'extended', 'full'], true)) { |
|
71 | 71 | throw new InvalidArgumentException('Given level is not supported!'); |
72 | 72 | } |
73 | 73 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $response->headers->set('Content-Type', $content_type); |
114 | 114 | |
115 | 115 | //If view option is not specified, then download the file. |
116 | - if (! $request->get('view')) { |
|
116 | + if (!$request->get('view')) { |
|
117 | 117 | if ($entity instanceof AbstractNamedDBElement) { |
118 | 118 | $entity_name = $entity->getName(); |
119 | 119 | } elseif (is_array($entity)) { |