Passed
Push — dependabot/composer/php-prod-1... ( 46b4c0 )
by
unknown
06:49
created
StepupMiddleware/ApiBundle/Identity/Service/AbstractSearchService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 class AbstractSearchService
29 29
 {
30 30
     protected function createPaginatorFrom(
31
-        QueryBuilder|Query $doctrineQuery,
31
+        QueryBuilder | Query $doctrineQuery,
32 32
         AbstractQuery $query,
33 33
         bool $fetchCollection = true,
34 34
     ): Pagerfanta {
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         $results = $doctrineQuery->getArrayResult();
64 64
         foreach ($results as $options) {
65 65
             foreach ($options as $key => $value) {
66
-                $val = (string)$value;
66
+                $val = (string) $value;
67 67
                 $filters[$key][$val] = $val;
68 68
             }
69 69
         }
Please login to merge, or discard this patch.
ApiBundle/Identity/Value/AuthorizedInstitutionCollection.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -44,18 +44,18 @@
 block discarded – undo
44 44
 
45 45
         /** @var string $institution */
46 46
         foreach ($raInstitutions as $institution) {
47
-            $collection->authorizations[(string)$institution][] = AuthorityRole::ROLE_RA;
47
+            $collection->authorizations[(string) $institution][] = AuthorityRole::ROLE_RA;
48 48
         }
49 49
         if ($raaInstitutions instanceof InstitutionCollection) {
50 50
             /** @var string $institution */
51 51
             foreach ($raaInstitutions as $institution) {
52 52
                 // Override existing lower role
53
-                if (isset($collection->authorizations[(string)$institution])
54
-                    && in_array(AuthorityRole::ROLE_RA, $collection->authorizations[(string)$institution])
53
+                if (isset($collection->authorizations[(string) $institution])
54
+                    && in_array(AuthorityRole::ROLE_RA, $collection->authorizations[(string) $institution])
55 55
                 ) {
56
-                    $collection->authorizations[(string)$institution] = [];
56
+                    $collection->authorizations[(string) $institution] = [];
57 57
                 }
58
-                $collection->authorizations[(string)$institution][] = AuthorityRole::ROLE_RAA;
58
+                $collection->authorizations[(string) $institution][] = AuthorityRole::ROLE_RAA;
59 59
             }
60 60
         }
61 61
         return $collection;
Please login to merge, or discard this patch.
StepupMiddleware/ApiBundle/Identity/Value/VerifiedTokenInformation.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,12 +40,12 @@
 block discarded – undo
40 40
     public static function fromEntity(VerifiedSecondFactor $token, Identity $identity): self
41 41
     {
42 42
         return new self(
43
-            (string)$identity->email,
43
+            (string) $identity->email,
44 44
             $token->id,
45 45
             $token->type,
46
-            (string)$identity->commonName,
46
+            (string) $identity->commonName,
47 47
             $token->registrationRequestedAt,
48
-            (string)$identity->preferredLocale,
48
+            (string) $identity->preferredLocale,
49 49
             $identity->institution,
50 50
             $token->registrationCode,
51 51
         );
Please login to merge, or discard this patch.
ApiBundle/Authorization/Service/CommandAuthorizationService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@
 block discarded – undo
74 74
         if (!is_null($actorId) && $this->isSraa($actorId)) {
75 75
             return true;
76 76
         }
77
-        return (bool)$this->whitelistService->isWhitelisted($institution->getInstitution());
77
+        return (bool) $this->whitelistService->isWhitelisted($institution->getInstitution());
78 78
     }
79 79
 
80 80
     public function maySelfServiceCommandBeExecutedOnBehalfOf(Command $command, IdentityId $actorId = null): bool
Please login to merge, or discard this patch.
ApiBundle/Authorization/Service/AuthorizationContextService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
             $institutions = new InstitutionCollection();
71 71
             $configuredInstitutions = $this->institutionRepository->findAll();
72 72
             foreach ($configuredInstitutions as $institution) {
73
-                $institutions->add(new Institution((string)$institution->institution));
73
+                $institutions->add(new Institution((string) $institution->institution));
74 74
             }
75 75
         } else {
76 76
             // Get the institutions the identity is RA(A) for.
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
     private function isSraa(IdentityId $actorId): bool
83 83
     {
84
-        $identity = $this->identityService->find((string)$actorId);
84
+        $identity = $this->identityService->find((string) $actorId);
85 85
         if (!$identity instanceof Identity) {
86 86
             throw new InvalidArgumentException('The provided id is not associated with any known identity');
87 87
         }
Please login to merge, or discard this patch.
StepupMiddleware/ApiBundle/Authorization/Service/AuthorizationService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 
72 72
         if (!$institutionConfiguration->selfAssertedTokensOption->isEnabled()) {
73 73
             return $this->deny(
74
-                sprintf('Institution "%s", does not allow self-asserted tokens', (string)$identity->institution),
74
+                sprintf('Institution "%s", does not allow self-asserted tokens', (string) $identity->institution),
75 75
             );
76 76
         }
77 77
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 
127 127
         if (!$institutionConfiguration->selfAssertedTokensOption->isEnabled()) {
128 128
             return $this->deny(
129
-                sprintf('Institution "%s", does not allow self-asserted tokens', (string)$identity->institution),
129
+                sprintf('Institution "%s", does not allow self-asserted tokens', (string) $identity->institution),
130 130
             );
131 131
         }
132 132
 
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 
167 167
         if (!$institutionConfiguration->selfAssertedTokensOption->isEnabled()) {
168 168
             return $this->deny(
169
-                sprintf('Institution "%s", does not allow self-asserted tokens', (string)$identity->institution),
169
+                sprintf('Institution "%s", does not allow self-asserted tokens', (string) $identity->institution),
170 170
             );
171 171
         }
172 172
 
@@ -186,14 +186,14 @@  discard block
 block discarded – undo
186 186
 
187 187
     private function findInstitutionConfiguration(Identity $identity): ?InstitutionConfigurationOptions
188 188
     {
189
-        $institution = new Institution((string)$identity->institution);
189
+        $institution = new Institution((string) $identity->institution);
190 190
         return $this->institutionConfigurationService
191 191
             ->findInstitutionConfigurationOptionsFor($institution);
192 192
     }
193 193
 
194 194
     private function findIdentity(IdentityId $identityId): ?Identity
195 195
     {
196
-        return $this->identityService->find((string)$identityId);
196
+        return $this->identityService->find((string) $identityId);
197 197
     }
198 198
 
199 199
     private function deny(string $errorMessage): AuthorizationDecision
Please login to merge, or discard this patch.
src/Surfnet/StepupMiddleware/ApiBundle/Request/MetadataValueResolver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,8 +49,8 @@
 block discarded – undo
49 49
 
50 50
         $metadata = new Metadata();
51 51
 
52
-        foreach ((array)$data->meta as $property => $value) {
53
-            $properlyCasedProperty = lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', (string)$property))));
52
+        foreach ((array) $data->meta as $property => $value) {
53
+            $properlyCasedProperty = lcfirst(str_replace(' ', '', ucwords(str_replace('_', ' ', (string) $property))));
54 54
             $metadata->$properlyCasedProperty = $value;
55 55
         }
56 56
 
Please login to merge, or discard this patch.
StepupMiddleware/ApiBundle/Controller/VettedSecondFactorController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 
56 56
         $query = new VettedSecondFactorQuery();
57 57
         $query->identityId = new IdentityId($request->get('identityId'));
58
-        $query->pageNumber = (int)$request->get('p', 1);
58
+        $query->pageNumber = (int) $request->get('p', 1);
59 59
 
60 60
         $paginator = $this->secondFactorService->searchVettedSecondFactors($query);
61 61
 
Please login to merge, or discard this patch.
src/Surfnet/StepupMiddleware/ApiBundle/Controller/RaCandidateController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
         $query->email = $request->get('email');
54 54
         $query->secondFactorTypes = $request->get('secondFactorTypes');
55 55
         $query->raInstitution = $request->get('raInstitution');
56
-        $query->pageNumber = (int)$request->get('p', 1);
56
+        $query->pageNumber = (int) $request->get('p', 1);
57 57
 
58 58
         $query->authorizationContext = $this->authorizationService->buildSelectRaaInstitutionAuthorizationContext(
59 59
             $actorId,
Please login to merge, or discard this patch.