Passed
Push — master ( 97f8af...d4e072 )
by Jan
04:34
created
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/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.