Passed
Push — master ( fe0f69...67a0dc )
by Jan
04:33
created
src/Validator/Constraints/AllowedFileExtensionValidator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      */
50 50
     public function validate($value, Constraint $constraint): void
51 51
     {
52
-        if (! $constraint instanceof AllowedFileExtension) {
52
+        if (!$constraint instanceof AllowedFileExtension) {
53 53
             throw new UnexpectedTypeException($constraint, AllowedFileExtension::class);
54 54
         }
55 55
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
                 return;
71 71
             }
72 72
 
73
-            if (! $this->filterTools->isExtensionAllowed(
73
+            if (!$this->filterTools->isExtensionAllowed(
74 74
                 $attachment_type->getFiletypeFilter(),
75 75
                 $value->getClientOriginalExtension()
76 76
             )) {
Please login to merge, or discard this patch.
src/Validator/Constraints/SelectableValidator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
54 54
         }
55 55
 
56 56
         //Check type of value. Validating only works for StructuralDBElements
57
-        if (! $value instanceof StructuralDBElement) {
57
+        if (!$value instanceof StructuralDBElement) {
58 58
             throw new UnexpectedValueException($value, 'StructuralDBElement');
59 59
         }
60 60
 
Please login to merge, or discard this patch.
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/Column/PartAttachmentsColumn.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,11 +59,11 @@
 block discarded – undo
59 59
 
60 60
     public function render($value, $context)
61 61
     {
62
-        if (! $context instanceof Part) {
62
+        if (!$context instanceof Part) {
63 63
             throw new \RuntimeException('$context must be a Part object!');
64 64
         }
65 65
         $tmp = '';
66
-        $attachments = $context->getAttachments()->filter(function (Attachment $attachment) {
66
+        $attachments = $context->getAttachments()->filter(function(Attachment $attachment) {
67 67
             return $attachment->getShowInTable() && $this->attachmentManager->isFileExisting($attachment);
68 68
         });
69 69
 
Please login to merge, or discard this patch.
src/DataTables/Column/LocaleDateTimeColumn.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     {
39 39
         if (null === $value) {
40 40
             return $this->options['nullValue'];
41
-        } elseif (! $value instanceof \DateTimeInterface) {
41
+        } elseif (!$value instanceof \DateTimeInterface) {
42 42
             $value = new \DateTime((string) $value);
43 43
         }
44 44
 
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.