Passed
Push — master ( 24c33a...fcd929 )
by Jan
04:52
created
src/EventSubscriber/U2FRegistrationSubscriber.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@
 block discarded – undo
60 60
     public function onRegister(RegisterEvent $event): void
61 61
     {
62 62
         //Skip adding of U2F key on demo mode
63
-        if (! $this->demo_mode) {
63
+        if (!$this->demo_mode) {
64 64
             $user = $event->getUser();
65 65
             $registration = $event->getRegistration();
66 66
             $newKey = new U2FKey();
Please login to merge, or discard this patch.
src/EventSubscriber/SymfonyDebugToolbarSubscriber.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 
63 63
     public function onKernelResponse(FilterResponseEvent $event): void
64 64
     {
65
-        if (! $this->kernel->getParameter('kernel.debug')) {
65
+        if (!$this->kernel->getParameter('kernel.debug')) {
66 66
             return;
67 67
         }
68 68
 
Please login to merge, or discard this patch.
src/EventSubscriber/TimezoneListener.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,12 +50,12 @@
 block discarded – undo
50 50
 
51 51
         //Check if the user has set a timezone
52 52
         $user = $this->security->getUser();
53
-        if ($user instanceof User && ! empty($user->getTimezone())) {
53
+        if ($user instanceof User && !empty($user->getTimezone())) {
54 54
             $timezone = $user->getTimezone();
55 55
         }
56 56
 
57 57
         //Fill with default value if needed
58
-        if (null === $timezone && ! empty($this->default_timezone)) {
58
+        if (null === $timezone && !empty($this->default_timezone)) {
59 59
             $timezone = $this->default_timezone;
60 60
         }
61 61
 
Please login to merge, or discard this patch.
src/EventSubscriber/PasswordChangeNeededSubscriber.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -74,15 +74,15 @@  discard block
 block discarded – undo
74 74
         $user = $this->security->getUser();
75 75
         $request = $event->getRequest();
76 76
 
77
-        if (! $event->isMasterRequest()) {
77
+        if (!$event->isMasterRequest()) {
78 78
             return;
79 79
         }
80
-        if (! $user instanceof User) {
80
+        if (!$user instanceof User) {
81 81
             return;
82 82
         }
83 83
 
84 84
         //Abort if we dont need to redirect the user.
85
-        if (! $user->isNeedPwChange() && ! static::TFARedirectNeeded($user)) {
85
+        if (!$user->isNeedPwChange() && !static::TFARedirectNeeded($user)) {
86 86
             return;
87 87
         }
88 88
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
     {
126 126
         $tfa_enabled = $user->isU2FAuthEnabled() || $user->isGoogleAuthenticatorEnabled();
127 127
 
128
-        if (null !== $user->getGroup() && $user->getGroup()->isEnforce2FA() && ! $tfa_enabled) {
128
+        if (null !== $user->getGroup() && $user->getGroup()->isEnforce2FA() && !$tfa_enabled) {
129 129
             return true;
130 130
         }
131 131
 
Please login to merge, or discard this patch.
src/DataTables/PartsDataTable.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         $dataTable
80 80
             ->add('picture', TextColumn::class, [
81 81
                 'label' => '',
82
-                'render' => function ($value, Part $context) {
82
+                'render' => function($value, Part $context) {
83 83
                     $preview_attachment = $this->previewGenerator->getTablePreviewAttachment($context);
84 84
                     if (null === $preview_attachment) {
85 85
                         return '';
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             ])
97 97
             ->add('name', TextColumn::class, [
98 98
                 'label' => $this->translator->trans('part.table.name'),
99
-                'render' => function ($value, Part $context) {
99
+                'render' => function($value, Part $context) {
100 100
                     return sprintf(
101 101
                         '<a href="%s">%s</a>',
102 102
                         $this->urlGenerator->infoURL($context),
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
             ])
126 126
             ->add('storelocation', TextColumn::class, [
127 127
                 'label' => $this->translator->trans('part.table.storeLocations'),
128
-                'render' => function ($value, Part $context) {
128
+                'render' => function($value, Part $context) {
129 129
                     $tmp = [];
130 130
                     foreach ($context->getPartLots() as $lot) {
131 131
                         //Ignore lots without storelocation
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
             ])
145 145
             ->add('amount', TextColumn::class, [
146 146
                 'label' => $this->translator->trans('part.table.amount'),
147
-                'render' => function ($value, Part $context) {
147
+                'render' => function($value, Part $context) {
148 148
                     $amount = $context->getAmountSum();
149 149
 
150 150
                     return $this->amountFormatter->format($amount, $context->getPartUnit());
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
             ->add('minamount', TextColumn::class, [
154 154
                 'label' => $this->translator->trans('part.table.minamount'),
155 155
                 'visible' => false,
156
-                'render' => function ($value, Part $context) {
156
+                'render' => function($value, Part $context) {
157 157
                     return $this->amountFormatter->format($value, $context->getPartUnit());
158 158
                 },
159 159
             ])
@@ -216,12 +216,12 @@  discard block
 block discarded – undo
216 216
 
217 217
             ->addOrderBy('name')
218 218
             ->createAdapter(CustomORMAdapter::class, [
219
-                'query' => function (QueryBuilder $builder): void {
219
+                'query' => function(QueryBuilder $builder): void {
220 220
                     $this->getQuery($builder);
221 221
                 },
222 222
                 'entity' => Part::class,
223 223
                 'criteria' => [
224
-                    function (QueryBuilder $builder) use ($options): void {
224
+                    function(QueryBuilder $builder) use ($options): void {
225 225
                         $this->buildCriteria($builder, $options);
226 226
                     },
227 227
                     new SearchCriteriaProvider(),
Please login to merge, or discard this patch.
src/DataTables/AttachmentDataTable.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -61,9 +61,9 @@  discard block
 block discarded – undo
61 61
     {
62 62
         $dataTable->add('picture', TextColumn::class, [
63 63
             'label' => '',
64
-            'render' => function ($value, Attachment $context) {
64
+            'render' => function($value, Attachment $context) {
65 65
                 if ($context->isPicture()
66
-                    && ! $context->isExternal()
66
+                    && !$context->isExternal()
67 67
                     && $this->attachmentHelper->isFileExisting($context)) {
68 68
                     return sprintf(
69 69
                         '<img alt="%s" src="%s" data-thumbnail="%s" class="%s">',
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
 
81 81
         $dataTable->add('name', TextColumn::class, [
82 82
             'label' => 'attachment.edit.name',
83
-            'render' => function ($value, Attachment $context) {
83
+            'render' => function($value, Attachment $context) {
84 84
                 //Link to external source
85 85
                 if ($context->isExternal()) {
86 86
                     return sprintf(
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         $dataTable->add('attachment_type', TextColumn::class, [
106 106
             'label' => 'attachment.table.type',
107 107
             'field' => 'attachment_type.name',
108
-            'render' => function ($value, Attachment $context) {
108
+            'render' => function($value, Attachment $context) {
109 109
                 return sprintf(
110 110
                     '<a href="%s">%s</a>',
111 111
                     $this->entityURLGenerator->editURL($context->getAttachmentType()),
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         $dataTable->add('element', TextColumn::class, [
118 118
             'label' => 'attachment.table.element',
119 119
             //'propertyPath' => 'element.name',
120
-            'render' => function ($value, Attachment $context) {
120
+            'render' => function($value, Attachment $context) {
121 121
                 return sprintf(
122 122
                     '<a href="%s">%s</a>',
123 123
                     $this->entityURLGenerator->infoURL($context->getElement()),
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 
134 134
         $dataTable->add('filesize', TextColumn::class, [
135 135
             'label' => $this->translator->trans('attachment.table.filesize'),
136
-            'render' => function ($value, Attachment $context) {
136
+            'render' => function($value, Attachment $context) {
137 137
                 if ($this->attachmentHelper->isFileExisting($context)) {
138 138
                     return $this->attachmentHelper->getHumanFileSize($context);
139 139
                 }
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 
198 198
         $dataTable->createAdapter(ORMAdapter::class, [
199 199
             'entity' => Attachment::class,
200
-            'query' => function (QueryBuilder $builder): void {
200
+            'query' => function(QueryBuilder $builder): void {
201 201
                 $this->getQuery($builder);
202 202
             },
203 203
         ]);
Please login to merge, or discard this patch.
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 (StructuralDBElement $element) use ($em): void {
86
+        $this->execute($element, static function(StructuralDBElement $element) use ($em): void {
87 87
             $em->remove($element);
88 88
         });
89 89
 
Please login to merge, or discard this patch.
src/Services/TranslationExtractor/PermissionExtractor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
      */
51 51
     public function extract($resource, MessageCatalogue $catalogue): void
52 52
     {
53
-        if (! $this->finished) {
53
+        if (!$this->finished) {
54 54
             //Extract for every group...
55 55
             foreach ($this->permission_structure['groups'] as $group) {
56 56
                 if (isset($group['label'])) {
Please login to merge, or discard this patch.
src/Services/PermissionResolver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
      */
156 156
     public function listOperationsForPermission(string $permission): array
157 157
     {
158
-        if (! $this->isValidPermission($permission)) {
158
+        if (!$this->isValidPermission($permission)) {
159 159
             throw new \InvalidArgumentException(sprintf('A permission with that name is not existing! Got %s.', $permission));
160 160
         }
161 161
         $operations = $this->permission_structure['perms'][$permission]['operations'];
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         $cache = new ConfigCache($this->cache_file, $this->is_debug);
195 195
 
196 196
         //Check if the cache is fresh, else regenerate it.
197
-        if (! $cache->isFresh()) {
197
+        if (!$cache->isFresh()) {
198 198
             $permission_file = __DIR__.'/../../config/permissions.yaml';
199 199
 
200 200
             //Read the permission config file...
Please login to merge, or discard this patch.