Passed
Pull Request — feature/build-and-publish-test... (#416)
by Michiel
12:44 queued 06:31
created
StepupMiddleware/ApiBundle/Identity/Repository/AuthorizationRepository.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             ->where("r.identityId = :identityId AND r.role IN(:roles)")
74 74
             ->groupBy("a.institution");
75 75
 
76
-        $qb->setParameter('identityId', (string)$actorId);
76
+        $qb->setParameter('identityId', (string) $actorId);
77 77
         $qb->setParameter(
78 78
             'authorizationRoles',
79 79
             $this->getAllowedInstitutionRoles($role)
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
             $this->logger->notice(
89 89
                 sprintf('Adding %s to authorized institutions', $institution['institution'])
90 90
             );
91
-            $result->add(new Institution((string)$institution['institution']));
91
+            $result->add(new Institution((string) $institution['institution']));
92 92
         }
93 93
 
94 94
         // Also get the institutions that are linked to the user via the 'institution_relation' field.
@@ -102,12 +102,12 @@  discard block
 block discarded – undo
102 102
             ->andWhere("ia.institutionRole = :role") // Only filter on use_ra and use_raa roles here.
103 103
             ->groupBy('ia.institution');
104 104
 
105
-        $qb->setParameter('identityId', (string)$actorId);
105
+        $qb->setParameter('identityId', (string) $actorId);
106 106
         $qb->setParameter('role', $role->getType());
107 107
 
108 108
         $institutions = $qb->getQuery()->getArrayResult();
109 109
         foreach ($institutions as $institution) {
110
-            $institutionVo = new Institution((string)$institution['institution']);
110
+            $institutionVo = new Institution((string) $institution['institution']);
111 111
             if (!$result->contains($institutionVo)) {
112 112
                 $result->add($institutionVo);
113 113
                 $this->logger->notice(
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
             ->where('ia.institutionRole = :institutionRole AND ra.role = :authorizationRole')
135 135
             ->groupBy("ci.institution");
136 136
 
137
-        $qb->setParameter('identityId', (string)$actorId);
137
+        $qb->setParameter('identityId', (string) $actorId);
138 138
         // The identity requires RAA role to perform this search
139 139
         $qb->setParameter(
140 140
             'authorizationRole',
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 
151 151
         $result = new InstitutionCollection();
152 152
         foreach ($institutions as $institution) {
153
-            $result->add(new Institution((string)$institution['institution']));
153
+            $result->add(new Institution((string) $institution['institution']));
154 154
         }
155 155
 
156 156
         return $result;
Please login to merge, or discard this patch.
StepupMiddleware/ApiBundle/Identity/Repository/RaListingRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
             ->where('r.identityId = :identityId')
84 84
             ->andWhere('r.raInstitution = :raInstitution')
85 85
             ->setParameter('identityId', $identityId)
86
-            ->setParameter('raInstitution', (string)$raInstitution)
86
+            ->setParameter('raInstitution', (string) $raInstitution)
87 87
             ->orderBy('r.raInstitution');
88 88
 
89 89
         // Modify query to filter on authorization:
Please login to merge, or discard this patch.
ApiBundle/Identity/Repository/InstitutionListingRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
     {
45 45
         $existsQuery = $this->createQueryBuilder('i')
46 46
             ->where('i.institution = :institution')
47
-            ->setParameter('institution', (string)$institution)
47
+            ->setParameter('institution', (string) $institution)
48 48
             ->getQuery()
49 49
             ->getOneOrNullResult();
50 50
 
Please login to merge, or discard this patch.
src/Surfnet/StepupMiddleware/ApiBundle/Identity/Entity/AuditLogEntry.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -189,13 +189,13 @@
 block discarded – undo
189 189
     {
190 190
         return [
191 191
             'actor_id' => $this->actorId,
192
-            'actor_institution' => $this->actorInstitution ? (string)$this->actorInstitution : null,
192
+            'actor_institution' => $this->actorInstitution ? (string) $this->actorInstitution : null,
193 193
             'actor_common_name' => $this->actorCommonName,
194 194
             'identity_id' => $this->identityId,
195
-            'identity_institution' => (string)$this->identityInstitution,
196
-            'ra_institution' => (string)$this->raInstitution,
195
+            'identity_institution' => (string) $this->identityInstitution,
196
+            'ra_institution' => (string) $this->raInstitution,
197 197
             'second_factor_id' => $this->secondFactorId,
198
-            'second_factor_type' => $this->secondFactorType ? (string)$this->secondFactorType : null,
198
+            'second_factor_type' => $this->secondFactorType ? (string) $this->secondFactorType : null,
199 199
             'second_factor_identifier' => $this->secondFactorIdentifier,
200 200
             'recovery_token_type' => $this->recoveryTokenType,
201 201
             'recovery_token_identifier' => $this->recoveryTokenIdentifier,
Please login to merge, or discard this patch.
Surfnet/StepupMiddleware/ApiBundle/Identity/Service/RaListingService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
         $raListings = $this->raListingRepository->listRasFor($institution);
84 84
 
85 85
         return $raListings
86
-            ->map(function (RaListing $raListing) {
86
+            ->map(function(RaListing $raListing) {
87 87
                 return RegistrationAuthorityCredentials::fromRaListing($raListing);
88 88
             })
89 89
             ->toArray();
Please login to merge, or discard this patch.
StepupMiddleware/ApiBundle/Identity/Service/AbstractSearchService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -67,8 +67,8 @@
 block discarded – undo
67 67
         $results = $doctrineQuery->getArrayResult();
68 68
         foreach ($results as $options) {
69 69
             foreach ($options as $key => $value) {
70
-                $val = (string)$value;
71
-                $filters[$key][$val] = (string)$val;
70
+                $val = (string) $value;
71
+                $filters[$key][$val] = (string) $val;
72 72
             }
73 73
         }
74 74
 
Please login to merge, or discard this patch.
StepupMiddleware/ApiBundle/Identity/Projector/RecoveryTokenProjector.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,14 +77,14 @@
 block discarded – undo
77 77
 
78 78
     public function applyCompliedWithRecoveryCodeRevocationEvent(CompliedWithRecoveryCodeRevocationEvent $event): void
79 79
     {
80
-        $token = $this->recoveryTokenRepository->find((string)$event->recoveryTokenId);
80
+        $token = $this->recoveryTokenRepository->find((string) $event->recoveryTokenId);
81 81
         $token->status = RecoveryTokenStatus::revoked();
82 82
         $this->recoveryTokenRepository->save($token);
83 83
     }
84 84
 
85 85
     public function applyRecoveryTokenRevokedEvent(RecoveryTokenRevokedEvent $event): void
86 86
     {
87
-        $token = $this->recoveryTokenRepository->find((string)$event->recoveryTokenId);
87
+        $token = $this->recoveryTokenRepository->find((string) $event->recoveryTokenId);
88 88
         $token->status = RecoveryTokenStatus::revoked();
89 89
         $this->recoveryTokenRepository->save($token);
90 90
     }
Please login to merge, or discard this patch.
src/Surfnet/StepupMiddleware/ApiBundle/Controller/IdentityController.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
         $query->nameId = $request->get('NameID');
75 75
         $query->commonName = $request->get('commonName');
76 76
         $query->email = $request->get('email');
77
-        $query->pageNumber = (int)$request->get('p', 1);
77
+        $query->pageNumber = (int) $request->get('p', 1);
78 78
 
79 79
         $paginator = $this->identityService->search($query);
80 80
 
Please login to merge, or discard this patch.
Surfnet/StepupMiddleware/ApiBundle/Controller/RaSecondFactorController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
         $actorId = new IdentityId($request->get('actorId'));
82 82
 
83 83
         $query = new RaSecondFactorQuery();
84
-        $query->pageNumber = (int)$request->get('p', 1);
84
+        $query->pageNumber = (int) $request->get('p', 1);
85 85
         $query->name = $request->get('name');
86 86
         $query->type = $request->get('type');
87 87
         $query->secondFactorId = $request->get('secondFactorId');
Please login to merge, or discard this patch.