Passed
Pull Request — master (#28)
by Jan
04:26
created
src/Validator/Constraints/ValidFileFilterValidator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function validate($value, Constraint $constraint): void
49 49
     {
50
-        if (! $constraint instanceof ValidFileFilter) {
50
+        if (!$constraint instanceof ValidFileFilter) {
51 51
             throw new UnexpectedTypeException($constraint, ValidFileFilter::class);
52 52
         }
53 53
 
@@ -55,12 +55,12 @@  discard block
 block discarded – undo
55 55
             return;
56 56
         }
57 57
 
58
-        if (! \is_string($value)) {
58
+        if (!\is_string($value)) {
59 59
             // throw this exception if your validator cannot handle the passed type so that it can be marked as invalid
60 60
             throw new UnexpectedValueException($value, 'string');
61 61
         }
62 62
 
63
-        if (! $this->filterTools->validateFilterString($value)) {
63
+        if (!$this->filterTools->validateFilterString($value)) {
64 64
             $this->context->buildViolation('validator.file_type_filter.invalid')
65 65
                 ->addViolation();
66 66
         }
Please login to merge, or discard this patch.
src/Validator/Constraints/NoLockoutValidator.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@
 block discarded – undo
56 56
      */
57 57
     public function validate($value, Constraint $constraint): void
58 58
     {
59
-        if (! $constraint instanceof NoLockout) {
59
+        if (!$constraint instanceof NoLockout) {
60 60
             throw new UnexpectedTypeException($constraint, NoLockout::class);
61 61
         }
62 62
 
Please login to merge, or discard this patch.
src/Validator/Constraints/ValidPartLotValidator.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,11 +47,11 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function validate($value, Constraint $constraint): void
49 49
     {
50
-        if (! $constraint instanceof ValidPartLot) {
50
+        if (!$constraint instanceof ValidPartLot) {
51 51
             throw new UnexpectedTypeException($constraint, ValidPartLot::class);
52 52
         }
53 53
 
54
-        if (! $value instanceof PartLot) {
54
+        if (!$value instanceof PartLot) {
55 55
             throw new UnexpectedTypeException($value, PartLot::class);
56 56
         }
57 57
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
                         ->atPath('amount')->addViolation();
72 72
                 }
73 73
 
74
-                if (! $parts->contains($value->getPart())) {
74
+                if (!$parts->contains($value->getPart())) {
75 75
                     $this->context->buildViolation('validator.part_lot.location_full')
76 76
                         ->atPath('storage_location')->addViolation();
77 77
                 }
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
             //Check for onlyExisting
81 81
             if ($value->getStorageLocation()->isLimitToExistingParts()) {
82
-                if (! $parts->contains($value->getPart())) {
82
+                if (!$parts->contains($value->getPart())) {
83 83
                     $this->context->buildViolation('validator.part_lot.only_existing')
84 84
                         ->atPath('storage_location')->addViolation();
85 85
                 }
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 
88 88
             //Check for only single part
89 89
             if ($value->getStorageLocation()->isLimitToExistingParts()) {
90
-                if (($parts->count() > 0) && ! $parts->contains($value->getPart())) {
90
+                if (($parts->count() > 0) && !$parts->contains($value->getPart())) {
91 91
                     $this->context->buildViolation('validator.part_lot.single_part')
92 92
                         ->atPath('storage_location')->addViolation();
93 93
                 }
Please login to merge, or discard this patch.
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/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/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/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.