Passed
Push — feature/updates-nov25 ( 25d33b...e99728 )
by Johan
05:23
created
src/Surfnet/Stepup/Identity/Event/AppointedAsRaEvent.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -67,9 +67,9 @@
 block discarded – undo
67 67
     public function serialize(): array
68 68
     {
69 69
         return [
70
-            'identity_id' => (string)$this->identityId,
71
-            'institution' => (string)$this->identityInstitution,
72
-            'name_id' => (string)$this->nameId,
70
+            'identity_id' => (string) $this->identityId,
71
+            'institution' => (string) $this->identityInstitution,
72
+            'name_id' => (string) $this->nameId,
73 73
         ];
74 74
     }
75 75
 
Please login to merge, or discard this patch.
src/Surfnet/Stepup/Identity/Event/AppointedAsRaForInstitutionEvent.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -73,10 +73,10 @@
 block discarded – undo
73 73
     public function serialize(): array
74 74
     {
75 75
         return [
76
-            'identity_id' => (string)$this->identityId,
77
-            'institution' => (string)$this->identityInstitution,
78
-            'name_id' => (string)$this->nameId,
79
-            'ra_institution' => (string)$this->raInstitution,
76
+            'identity_id' => (string) $this->identityId,
77
+            'institution' => (string) $this->identityInstitution,
78
+            'name_id' => (string) $this->nameId,
79
+            'ra_institution' => (string) $this->raInstitution,
80 80
         ];
81 81
     }
82 82
 
Please login to merge, or discard this patch.
Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenAndVerifiedEvent.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
             Email::unknown(),
106 106
             new Locale($data['preferred_locale']),
107 107
             DateTime::fromString($data['registration_requested_at']),
108
-            (string)$data['registration_code'],
108
+            (string) $data['registration_code'],
109 109
         );
110 110
     }
111 111
 
@@ -117,12 +117,12 @@  discard block
 block discarded – undo
117 117
     public function serialize(): array
118 118
     {
119 119
         return [
120
-            'identity_id' => (string)$this->identityId,
121
-            'identity_institution' => (string)$this->identityInstitution,
122
-            'second_factor_id' => (string)$this->secondFactorId,
123
-            'registration_requested_at' => (string)$this->registrationRequestedAt,
120
+            'identity_id' => (string) $this->identityId,
121
+            'identity_institution' => (string) $this->identityInstitution,
122
+            'second_factor_id' => (string) $this->secondFactorId,
123
+            'registration_requested_at' => (string) $this->registrationRequestedAt,
124 124
             'registration_code' => $this->registrationCode,
125
-            'preferred_locale' => (string)$this->preferredLocale,
125
+            'preferred_locale' => (string) $this->preferredLocale,
126 126
         ];
127 127
     }
128 128
 
Please login to merge, or discard this patch.
src/Surfnet/Stepup/Identity/Event/YubikeyPossessionProvenEvent.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -117,13 +117,13 @@
 block discarded – undo
117 117
     public function serialize(): array
118 118
     {
119 119
         return [
120
-            'identity_id' => (string)$this->identityId,
121
-            'identity_institution' => (string)$this->identityInstitution,
122
-            'second_factor_id' => (string)$this->secondFactorId,
120
+            'identity_id' => (string) $this->identityId,
121
+            'identity_institution' => (string) $this->identityInstitution,
122
+            'second_factor_id' => (string) $this->secondFactorId,
123 123
             'email_verification_required' => $this->emailVerificationRequired,
124 124
             'email_verification_window' => $this->emailVerificationWindow->serialize(),
125 125
             'email_verification_nonce' => $this->emailVerificationNonce,
126
-            'preferred_locale' => (string)$this->preferredLocale,
126
+            'preferred_locale' => (string) $this->preferredLocale,
127 127
         ];
128 128
     }
129 129
 
Please login to merge, or discard this patch.
src/Surfnet/Stepup/Identity/Event/IdentityEmailChangedEvent.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,8 +72,8 @@
 block discarded – undo
72 72
     public function serialize(): array
73 73
     {
74 74
         return [
75
-            'id' => (string)$this->identityId,
76
-            'institution' => (string)$this->identityInstitution,
75
+            'id' => (string) $this->identityId,
76
+            'institution' => (string) $this->identityInstitution,
77 77
         ];
78 78
     }
79 79
 
Please login to merge, or discard this patch.
StepupMiddleware/ApiBundle/Identity/Repository/RaListingRepository.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -45,14 +45,14 @@  discard block
 block discarded – undo
45 45
 
46 46
     public function findByIdentityId(IdentityId $identityId): ?array
47 47
     {
48
-        return parent::findBy(['identityId' => (string)$identityId]);
48
+        return parent::findBy(['identityId' => (string) $identityId]);
49 49
     }
50 50
 
51 51
     public function findByIdentityIdAndRaInstitution(IdentityId $identityId, Institution $raInstitution): ?RaListing
52 52
     {
53 53
         return parent::findOneBy([
54
-            'identityId' => (string)$identityId,
55
-            'raInstitution' => (string)$raInstitution,
54
+            'identityId' => (string) $identityId,
55
+            'raInstitution' => (string) $raInstitution,
56 56
         ]);
57 57
     }
58 58
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             ->where('r.identityId = :identityId')
66 66
             ->andWhere('r.raInstitution = :raInstitution')
67 67
             ->setParameter('identityId', $identityId)
68
-            ->setParameter('raInstitution', (string)$raInstitution)
68
+            ->setParameter('raInstitution', (string) $raInstitution)
69 69
             ->orderBy('r.raInstitution');
70 70
 
71 71
         // Modify query to filter on authorization:
@@ -88,8 +88,8 @@  discard block
 block discarded – undo
88 88
     public function findByIdentityIdAndInstitution(IdentityId $identityId, Institution $institution): array
89 89
     {
90 90
         return parent::findBy([
91
-            'identityId' => (string)$identityId,
92
-            'institution' => (string)$institution,
91
+            'identityId' => (string) $identityId,
92
+            'institution' => (string) $institution,
93 93
         ]);
94 94
     }
95 95
 
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         if ($query->identityId instanceof IdentityId) {
117 117
             $queryBuilder
118 118
                 ->andWhere('r.identityId = :identityId')
119
-                ->setParameter('identityId', (string)$query->identityId);
119
+                ->setParameter('identityId', (string) $query->identityId);
120 120
         }
121 121
 
122 122
         if ($query->name) {
@@ -134,13 +134,13 @@  discard block
 block discarded – undo
134 134
         if ($query->role) {
135 135
             $queryBuilder
136 136
                 ->andWhere('r.role = :role')
137
-                ->setParameter('role', (string)$query->role);
137
+                ->setParameter('role', (string) $query->role);
138 138
         }
139 139
 
140 140
         if ($query->raInstitution) {
141 141
             $queryBuilder
142 142
                 ->andWhere('r.raInstitution = :raInstitution')
143
-                ->setParameter('raInstitution', (string)$query->raInstitution);
143
+                ->setParameter('raInstitution', (string) $query->raInstitution);
144 144
         }
145 145
 
146 146
         // Modify query to filter on authorization:
@@ -240,6 +240,6 @@  discard block
 block discarded – undo
240 240
 
241 241
     public function contains(IdentityId $identityId): bool
242 242
     {
243
-        return count(parent::findBy(['identityId' => (string)$identityId])) > 0;
243
+        return count(parent::findBy(['identityId' => (string) $identityId])) > 0;
244 244
     }
245 245
 }
Please login to merge, or discard this patch.
src/Surfnet/StepupMiddleware/ApiBundle/Request/CommandValueResolver.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
         $this->assertIsValidCommandStructure($data);
45 45
 
46 46
         $commandNameParts = [];
47
-        $found = preg_match('~^(\w+):([\w\\.]+)$~', (string)$data['command']['name'], $commandNameParts);
47
+        $found = preg_match('~^(\w+):([\w\\.]+)$~', (string) $data['command']['name'], $commandNameParts);
48 48
         if ($found !== 1) {
49
-            $message = sprintf('Command does not have a valid command name %s', (string)$data['command']['name']);
49
+            $message = sprintf('Command does not have a valid command name %s', (string) $data['command']['name']);
50 50
             throw new BadCommandRequestException(
51 51
                 [$message],
52 52
                 $message,
@@ -60,10 +60,10 @@  discard block
 block discarded – undo
60 60
 
61 61
         /** @var AbstractCommand $command */
62 62
         $command = new $commandClassName;
63
-        $command->UUID = (string)$data['command']['uuid'];
63
+        $command->UUID = (string) $data['command']['uuid'];
64 64
 
65
-        foreach ((array)$data['command']['payload'] as $property => $value) {
66
-            $properlyCasedProperty = lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', (string)$property))));
65
+        foreach ((array) $data['command']['payload'] as $property => $value) {
66
+            $properlyCasedProperty = lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', (string) $property))));
67 67
             $command->$properlyCasedProperty = $value;
68 68
         }
69 69
 
Please login to merge, or discard this patch.
src/Surfnet/Stepup/Identity/Event/IdentityRestoredEvent.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,10 +51,10 @@
 block discarded – undo
51 51
     public function serialize(): array
52 52
     {
53 53
         return [
54
-            'id' => (string)$this->id,
55
-            'institution' => (string)$this->institution,
56
-            'common_name' => (string)$this->commonName,
57
-            'email' => (string)$this->email,
54
+            'id' => (string) $this->id,
55
+            'institution' => (string) $this->institution,
56
+            'common_name' => (string) $this->commonName,
57
+            'email' => (string) $this->email,
58 58
         ];
59 59
     }
60 60
 
Please login to merge, or discard this patch.
Surfnet/StepupMiddleware/ApiBundle/Identity/Projector/IdentityProjector.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     {
43 43
         $this->identityRepository->save(
44 44
             Identity::create(
45
-                (string)$event->identityId,
45
+                (string) $event->identityId,
46 46
                 $event->identityInstitution,
47 47
                 $event->nameId,
48 48
                 $event->email,
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
     public function applyIdentityRenamedEvent(IdentityRenamedEvent $event): void
56 56
     {
57
-        $identity = $this->identityRepository->find((string)$event->identityId);
57
+        $identity = $this->identityRepository->find((string) $event->identityId);
58 58
         $identity->commonName = $event->commonName;
59 59
 
60 60
         $this->identityRepository->save($identity);
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
 
63 63
     public function applyIdentityEmailChangedEvent(IdentityEmailChangedEvent $event): void
64 64
     {
65
-        $identity = $this->identityRepository->find((string)$event->identityId);
65
+        $identity = $this->identityRepository->find((string) $event->identityId);
66 66
         $identity->email = $event->email;
67 67
 
68 68
         $this->identityRepository->save($identity);
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
     public function applyLocalePreferenceExpressedEvent(LocalePreferenceExpressedEvent $event): void
72 72
     {
73
-        $identity = $this->identityRepository->find((string)$event->identityId);
73
+        $identity = $this->identityRepository->find((string) $event->identityId);
74 74
         $identity->preferredLocale = $event->preferredLocale;
75 75
 
76 76
         $this->identityRepository->save($identity);
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
     public function applyIdentityRestoredEvent(IdentityRestoredEvent $event): void
80 80
     {
81
-        $identity = $this->identityRepository->find((string)$event->identityId);
81
+        $identity = $this->identityRepository->find((string) $event->identityId);
82 82
         $identity->email = $event->email;
83 83
         $identity->commonName = $event->commonName;
84 84
 
@@ -88,13 +88,13 @@  discard block
 block discarded – undo
88 88
 
89 89
     public function applySecondFactorVettedEvent(SecondFactorVettedEvent $event): void
90 90
     {
91
-        $this->determinePossessionOfSelfAssertedToken($event->vettingType, (string)$event->identityId);
91
+        $this->determinePossessionOfSelfAssertedToken($event->vettingType, (string) $event->identityId);
92 92
     }
93 93
 
94 94
     public function applySecondFactorVettedWithoutTokenProofOfPossession(
95 95
         SecondFactorVettedWithoutTokenProofOfPossession $event,
96 96
     ): void {
97
-        $this->determinePossessionOfSelfAssertedToken($event->vettingType, (string)$event->identityId);
97
+        $this->determinePossessionOfSelfAssertedToken($event->vettingType, (string) $event->identityId);
98 98
     }
99 99
 
100 100
     private function determinePossessionOfSelfAssertedToken(VettingType $vettingType, string $identityId): void
Please login to merge, or discard this patch.