Passed
Push — master ( 71fa82...7cf500 )
by Jan
04:35
created
src/Services/StructuralElementRecursionHelper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
         $children = $element->getChildren();
59 59
 
60 60
         //If we should call from top we execute the func here.
61
-        if (! $call_from_bottom) {
61
+        if (!$call_from_bottom) {
62 62
             $func($element);
63 63
         }
64 64
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
     {
84 84
         $em = $this->em;
85 85
 
86
-        $this->execute($element, static function (AbstractStructuralDBElement $element) use ($em): void {
86
+        $this->execute($element, static function(AbstractStructuralDBElement $element) use ($em): void {
87 87
             $em->remove($element);
88 88
         });
89 89
 
Please login to merge, or discard this patch.
src/DataFixtures/DataStructureFixtures.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
      */
72 72
     public function createNodesForClass(string $class, ObjectManager $manager): void
73 73
     {
74
-        if (! new $class() instanceof AbstractStructuralDBElement) {
74
+        if (!new $class() instanceof AbstractStructuralDBElement) {
75 75
             throw new InvalidArgumentException('$class must be a StructuralDBElement!');
76 76
         }
77 77
 
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
@@ -63,12 +63,12 @@
 block discarded – undo
63 63
 
64 64
         $resolver->setRequired('property');
65 65
 
66
-        $resolver->setDefault('field', function (Options $option) {
66
+        $resolver->setDefault('field', function(Options $option) {
67 67
             return $option['property'].'.name';
68 68
         });
69 69
 
70
-        $resolver->setDefault('render', function (Options $options) {
71
-            return function ($value, Part $context) use ($options) {
70
+        $resolver->setDefault('render', function(Options $options) {
71
+            return function($value, Part $context) use ($options) {
72 72
                 /** @var AbstractDBElement|null $entity */
73 73
                 $entity = $this->accessor->getValue($context, $options['property']);
74 74
 
Please login to merge, or discard this patch.
src/Controller/RedirectController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
         //Check if a user has set a preferred language setting:
64 64
         $user = $this->getUser();
65
-        if (($user instanceof User) && ! empty($user->getLanguage())) {
65
+        if (($user instanceof User) && !empty($user->getLanguage())) {
66 66
             $locale = $user->getLanguage();
67 67
         }
68 68
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $new_url = $request->getUriForPath('/'.$locale.$request->getPathInfo());
71 71
 
72 72
         //If either mod_rewrite is not enabled or the index.php version is enforced, add index.php to the string
73
-        if (($this->enforce_index_php || ! $this->checkIfModRewriteAvailable())
73
+        if (($this->enforce_index_php || !$this->checkIfModRewriteAvailable())
74 74
             && false === strpos($new_url, 'index.php')) {
75 75
             //Like Request::getUriForPath only with index.php
76 76
             $new_url = $request->getSchemeAndHttpHost().$request->getBaseUrl().'/index.php/'.$locale.$request->getPathInfo();
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      */
89 89
     public function checkIfModRewriteAvailable(): bool
90 90
     {
91
-        if (! function_exists('apache_get_modules')) {
91
+        if (!function_exists('apache_get_modules')) {
92 92
             //If we can not check for apache modules, we just hope for the best and assume url rewriting is available
93 93
             //If you want to enforce index.php versions of the url, you can override this via ENV vars.
94 94
             return true;
Please login to merge, or discard this patch.
src/Form/UserAdminForm.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                 'attr' => [
95 95
                     'placeholder' => 'user.username.placeholder',
96 96
                 ],
97
-                'disabled' => ! $this->security->isGranted('edit_username', $entity),
97
+                'disabled' => !$this->security->isGranted('edit_username', $entity),
98 98
             ])
99 99
 
100 100
             ->add('group', StructuralEntityType::class, [
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
                 'required' => false,
103 103
                 'label' => 'group.label',
104 104
                 'disable_not_selectable' => true,
105
-                'disabled' => ! $this->security->isGranted('change_group', $entity),
105
+                'disabled' => !$this->security->isGranted('change_group', $entity),
106 106
             ])
107 107
 
108 108
             ->add('first_name', TextType::class, [
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
                     'placeholder' => 'user.firstName.placeholder',
113 113
                 ],
114 114
                 'required' => false,
115
-                'disabled' => ! $this->security->isGranted('edit_infos', $entity),
115
+                'disabled' => !$this->security->isGranted('edit_infos', $entity),
116 116
             ])
117 117
 
118 118
             ->add('last_name', TextType::class, [
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
                     'placeholder' => 'user.lastName.placeholder',
123 123
                 ],
124 124
                 'required' => false,
125
-                'disabled' => ! $this->security->isGranted('edit_infos', $entity),
125
+                'disabled' => !$this->security->isGranted('edit_infos', $entity),
126 126
             ])
127 127
 
128 128
             ->add('email', TextType::class, [
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
                     'placeholder' => 'user.email.placeholder',
133 133
                 ],
134 134
                 'required' => false,
135
-                'disabled' => ! $this->security->isGranted('edit_infos', $entity),
135
+                'disabled' => !$this->security->isGranted('edit_infos', $entity),
136 136
             ])
137 137
 
138 138
             ->add('department', TextType::class, [
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
                     'placeholder' => 'user.department.placeholder',
143 143
                 ],
144 144
                 'required' => false,
145
-                'disabled' => ! $this->security->isGranted('edit_infos', $entity),
145
+                'disabled' => !$this->security->isGranted('edit_infos', $entity),
146 146
             ])
147 147
 
148 148
             //Config section
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
                 'placeholder' => 'user_settings.language.placeholder',
156 156
                 'label' => 'user.language_select',
157 157
                 'preferred_choices' => ['en', 'de'],
158
-                'disabled' => ! $this->security->isGranted('change_user_settings', $entity),
158
+                'disabled' => !$this->security->isGranted('change_user_settings', $entity),
159 159
             ])
160 160
             ->add('timezone', TimezoneType::class, [
161 161
                 'required' => false,
@@ -166,12 +166,12 @@  discard block
 block discarded – undo
166 166
                 'placeholder' => 'user_settings.timezone.placeholder',
167 167
                 'label' => 'user.timezone.label',
168 168
                 'preferred_choices' => ['Europe/Berlin'],
169
-                'disabled' => ! $this->security->isGranted('change_user_settings', $entity),
169
+                'disabled' => !$this->security->isGranted('change_user_settings', $entity),
170 170
             ])
171 171
             ->add('theme', ChoiceType::class, [
172 172
                 'required' => false,
173 173
                 'choices' => User::AVAILABLE_THEMES,
174
-                'choice_label' => function ($entity, $key, $value) {
174
+                'choice_label' => function($entity, $key, $value) {
175 175
                     return $value;
176 176
                 },
177 177
                 'attr' => [
@@ -179,12 +179,12 @@  discard block
 block discarded – undo
179 179
                 ],
180 180
                 'placeholder' => 'user_settings.theme.placeholder',
181 181
                 'label' => 'user.theme.label',
182
-                'disabled' => ! $this->security->isGranted('change_user_settings', $entity),
182
+                'disabled' => !$this->security->isGranted('change_user_settings', $entity),
183 183
             ])
184 184
             ->add('currency', CurrencyEntityType::class, [
185 185
                 'required' => false,
186 186
                 'label' => 'user.currency.label',
187
-                'disabled' => ! $this->security->isGranted('change_user_settings', $entity),
187
+                'disabled' => !$this->security->isGranted('change_user_settings', $entity),
188 188
             ])
189 189
 
190 190
             ->add('new_password', RepeatedType::class, [
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
                 'invalid_message' => 'password_must_match',
199 199
                 'required' => false,
200 200
                 'mapped' => false,
201
-                'disabled' => ! $this->security->isGranted('set_password', $entity),
201
+                'disabled' => !$this->security->isGranted('set_password', $entity),
202 202
                 'constraints' => [new Length([
203 203
                     'min' => 6,
204 204
                     'max' => 128,
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
                     'class' => 'checkbox-custom',
212 212
                 ],
213 213
                 'label' => 'user.edit.needs_pw_change',
214
-                'disabled' => ! $this->security->isGranted('set_password', $entity),
214
+                'disabled' => !$this->security->isGranted('set_password', $entity),
215 215
             ])
216 216
 
217 217
             ->add('disabled', CheckboxType::class, [
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
                     'class' => 'checkbox-custom',
221 221
                 ],
222 222
                 'label' => 'user.edit.user_disabled',
223
-                'disabled' => ! $this->security->isGranted('set_password', $entity)
223
+                'disabled' => !$this->security->isGranted('set_password', $entity)
224 224
                     || $entity === $this->security->getUser(),
225 225
             ])
226 226
 
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
             ->add('permissions', PermissionsType::class, [
229 229
                 'mapped' => false,
230 230
                 'data' => $builder->getData(),
231
-                'disabled' => ! $this->security->isGranted('edit_permissions', $entity),
231
+                'disabled' => !$this->security->isGranted('edit_permissions', $entity),
232 232
             ])
233 233
         ;
234 234
         /*->add('comment', CKEditorType::class, ['required' => false,
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
                 'data_class' => $options['attachment_class'],
248 248
             ],
249 249
             'by_reference' => false,
250
-            'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
250
+            'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
251 251
         ]);
252 252
 
253 253
         $builder->add('log_comment', TextType::class, [
Please login to merge, or discard this patch.
src/EventSubscriber/U2FRegistrationSubscriber.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,9 +80,9 @@
 block discarded – undo
80 80
     public function onRegister(RegisterEvent $event): void
81 81
     {
82 82
         //Skip adding of U2F key on demo mode
83
-        if (! $this->demo_mode) {
83
+        if (!$this->demo_mode) {
84 84
             $user = $event->getUser();
85
-            if (! $user instanceof User) {
85
+            if (!$user instanceof User) {
86 86
                 throw new \InvalidArgumentException('Only User objects can be registered for U2F!');
87 87
             }
88 88
 
Please login to merge, or discard this patch.
src/EventSubscriber/EventLoggerSubscriber.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -269,11 +269,11 @@  discard block
 block discarded – undo
269 269
     {
270 270
         unset($fields['lastModified']);
271 271
 
272
-        if (! $this->hasFieldRestrictions($element)) {
272
+        if (!$this->hasFieldRestrictions($element)) {
273 273
             return $fields;
274 274
         }
275 275
 
276
-        return array_filter($fields, function ($value, $key) use ($element) {
276
+        return array_filter($fields, function($value, $key) use ($element) {
277 277
             //Associative array (save changed data) case
278 278
             if (is_string($key)) {
279 279
                 return $this->shouldFieldBeSaved($element, $key);
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
     {
288 288
         $uow = $em->getUnitOfWork();
289 289
 
290
-        if (! $logEntry instanceof ElementEditedLogEntry && ! $logEntry instanceof ElementDeletedLogEntry) {
290
+        if (!$logEntry instanceof ElementEditedLogEntry && !$logEntry instanceof ElementDeletedLogEntry) {
291 291
             throw new \InvalidArgumentException('$logEntry must be ElementEditedLogEntry or ElementDeletedLogEntry!');
292 292
         }
293 293
 
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
         $old_data = $this->filterFieldRestrictions($entity, $old_data);
301 301
 
302 302
         //Restrict length of string fields, to save memory...
303
-        $old_data = array_map(function ($value) {
303
+        $old_data = array_map(function($value) {
304 304
             if (is_string($value)) {
305 305
                 return mb_strimwidth($value, 0, self::MAX_STRING_LENGTH, '...');
306 306
             }
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
     protected function validEntity(object $entity): bool
320 320
     {
321 321
         //Dont log logentries itself!
322
-        if ($entity instanceof AbstractDBElement && ! $entity instanceof AbstractLogEntry) {
322
+        if ($entity instanceof AbstractDBElement && !$entity instanceof AbstractLogEntry) {
323 323
             return true;
324 324
         }
325 325
 
Please login to merge, or discard this patch.
src/Security/Voter/StructureVoter.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
      */
86 86
     protected function instanceToPermissionName($subject): ?string
87 87
     {
88
-        if (! is_string($subject)) {
88
+        if (!is_string($subject)) {
89 89
             $class_name = get_class($subject);
90 90
         } else {
91 91
             $class_name = $subject;
Please login to merge, or discard this patch.
src/Migrations/Version20200311204104.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,11 +27,11 @@
 block discarded – undo
27 27
         $this->addSql('ALTER TABLE `users` ADD perms_parts_parameters SMALLINT NOT NULL');
28 28
         $this->addSql('ALTER TABLE log CHANGE level level TINYINT');
29 29
 
30
-        $sql = 'UPDATE `groups`' .
30
+        $sql = 'UPDATE `groups`'.
31 31
             'SET perms_parts_parameters = 341 WHERE (id = 1 AND name = "admins") OR (id = 3 AND name = "users");';
32 32
         $this->addSql($sql);
33 33
 
34
-        $sql = 'UPDATE `groups`' .
34
+        $sql = 'UPDATE `groups`'.
35 35
             'SET perms_parts_parameters = 681 WHERE (id = 2 AND name = "readonly");';
36 36
         $this->addSql($sql);
37 37
 
Please login to merge, or discard this patch.