Passed
Push — master ( 892132...fe0f69 )
by Jan
04:10
created
src/Validator/Constraints/UrlOrBuiltinValidator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -38,14 +38,14 @@  discard block
 block discarded – undo
38 38
 {
39 39
     public function validate($value, Constraint $constraint): void
40 40
     {
41
-        if (! $constraint instanceof UrlOrBuiltin) {
41
+        if (!$constraint instanceof UrlOrBuiltin) {
42 42
             throw new UnexpectedTypeException($constraint, UrlOrBuiltin::class);
43 43
         }
44 44
 
45 45
         if (null === $value || '' === $value) {
46 46
             return;
47 47
         }
48
-        if (! is_scalar($value) && ! (\is_object($value) && method_exists($value, '__toString'))) {
48
+        if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) {
49 49
             throw new UnexpectedValueException($value, 'string');
50 50
         }
51 51
         $value = (string) $value;
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
         //After the %PLACEHOLDER% comes a slash, so we can check if we have a placholder via explode
57 57
         $tmp = explode('/', $value);
58 58
         //Builtins must have a %PLACEHOLDER% construction
59
-        if (! empty($tmp) && \in_array($tmp[0], $constraint->allowed_placeholders, false)) {
59
+        if (!empty($tmp) && \in_array($tmp[0], $constraint->allowed_placeholders, false)) {
60 60
             return;
61 61
         }
62 62
 
Please login to merge, or discard this patch.
src/Validator/Constraints/ValidGoogleAuthCodeValidator.php 1 patch
Spacing   +4 added lines, -4 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 ValidGoogleAuthCode) {
46
+        if (!$constraint instanceof ValidGoogleAuthCode) {
47 47
             throw new UnexpectedTypeException($constraint, ValidGoogleAuthCode::class);
48 48
         }
49 49
 
@@ -51,11 +51,11 @@  discard block
 block discarded – undo
51 51
             return;
52 52
         }
53 53
 
54
-        if (! \is_string($value)) {
54
+        if (!\is_string($value)) {
55 55
             throw new UnexpectedValueException($value, 'string');
56 56
         }
57 57
 
58
-        if (! ctype_digit($value)) {
58
+        if (!ctype_digit($value)) {
59 59
             $this->context->addViolation('validator.google_code.only_digits_allowed');
60 60
         }
61 61
 
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
             $user = $this->context->getObject()->getParent()->getData();
72 72
 
73 73
             //Check if the given code is valid
74
-            if (! $this->googleAuthenticator->checkCode($user, $value)) {
74
+            if (!$this->googleAuthenticator->checkCode($user, $value)) {
75 75
                 $this->context->addViolation('validator.google_code.wrong_code');
76 76
             }
77 77
         }
Please login to merge, or discard this patch.
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/NoneOfItsChildrenValidator.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 NoneOfItsChildren) {
46
+        if (!$constraint instanceof NoneOfItsChildren) {
47 47
             throw new UnexpectedTypeException($constraint, NoneOfItsChildren::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/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.