@@ -30,9 +30,7 @@ class PrincipalBuilder
3030 /**
3131 * @param string|null $defaultClaimsIssuer The default claims issuer to use if no issuer is specified for a claim in any of the identities
3232 */
33- public function __construct (private readonly ?string $ defaultClaimsIssuer = null )
34- {
35- }
33+ public function __construct (private readonly ?string $ defaultClaimsIssuer = null ) {}
3634
3735 /**
3836 * Builds the principal
@@ -57,7 +55,8 @@ public function build(): IPrincipal
5755 */
5856 public function withActor (string $ value , ?string $ issuer = null ): static
5957 {
60- $ this ->createPrimaryIdentityBuilder ()
58+ $ this
59+ ->createPrimaryIdentityBuilder ()
6160 ->withActor ($ value , $ issuer );
6261
6362 return $ this ;
@@ -71,7 +70,8 @@ public function withActor(string $value, ?string $issuer = null): static
7170 */
7271 public function withAuthenticationSchemeName (string $ authenticationSchemeName ): static
7372 {
74- $ this ->createPrimaryIdentityBuilder ()
73+ $ this
74+ ->createPrimaryIdentityBuilder ()
7575 ->withAuthenticationSchemeName ($ authenticationSchemeName );
7676
7777 return $ this ;
@@ -85,7 +85,8 @@ public function withAuthenticationSchemeName(string $authenticationSchemeName):
8585 */
8686 public function withClaims (Claim |array $ claims ): static
8787 {
88- $ this ->createPrimaryIdentityBuilder ()
88+ $ this
89+ ->createPrimaryIdentityBuilder ()
8990 ->withClaims ($ claims );
9091
9192 return $ this ;
@@ -100,7 +101,8 @@ public function withClaims(Claim|array $claims): static
100101 */
101102 public function withCountry (string $ value , ?string $ issuer = null ): static
102103 {
103- $ this ->createPrimaryIdentityBuilder ()
104+ $ this
105+ ->createPrimaryIdentityBuilder ()
104106 ->withCountry ($ value , $ issuer );
105107
106108 return $ this ;
@@ -115,7 +117,8 @@ public function withCountry(string $value, ?string $issuer = null): static
115117 */
116118 public function withDateOfBirth (DateTimeInterface $ value , ?string $ issuer = null ): static
117119 {
118- $ this ->createPrimaryIdentityBuilder ()
120+ $ this
121+ ->createPrimaryIdentityBuilder ()
119122 ->withDateOfBirth ($ value , $ issuer );
120123
121124 return $ this ;
@@ -130,7 +133,8 @@ public function withDateOfBirth(DateTimeInterface $value, ?string $issuer = null
130133 */
131134 public function withDns (string $ value , ?string $ issuer = null ): static
132135 {
133- $ this ->createPrimaryIdentityBuilder ()
136+ $ this
137+ ->createPrimaryIdentityBuilder ()
134138 ->withDns ($ value , $ issuer );
135139
136140 return $ this ;
@@ -145,7 +149,8 @@ public function withDns(string $value, ?string $issuer = null): static
145149 */
146150 public function withEmail (string $ value , ?string $ issuer = null ): static
147151 {
148- $ this ->createPrimaryIdentityBuilder ()
152+ $ this
153+ ->createPrimaryIdentityBuilder ()
149154 ->withEmail ($ value , $ issuer );
150155
151156 return $ this ;
@@ -160,7 +165,8 @@ public function withEmail(string $value, ?string $issuer = null): static
160165 */
161166 public function withGender (mixed $ value , ?string $ issuer = null ): static
162167 {
163- $ this ->createPrimaryIdentityBuilder ()
168+ $ this
169+ ->createPrimaryIdentityBuilder ()
164170 ->withGender ($ value , $ issuer );
165171
166172 return $ this ;
@@ -175,7 +181,8 @@ public function withGender(mixed $value, ?string $issuer = null): static
175181 */
176182 public function withGivenName (string $ value , ?string $ issuer = null ): static
177183 {
178- $ this ->createPrimaryIdentityBuilder ()
184+ $ this
185+ ->createPrimaryIdentityBuilder ()
179186 ->withGivenName ($ value , $ issuer );
180187
181188 return $ this ;
@@ -190,7 +197,8 @@ public function withGivenName(string $value, ?string $issuer = null): static
190197 */
191198 public function withHomePhone (string $ value , ?string $ issuer = null ): static
192199 {
193- $ this ->createPrimaryIdentityBuilder ()
200+ $ this
201+ ->createPrimaryIdentityBuilder ()
194202 ->withHomePhone ($ value , $ issuer );
195203
196204 return $ this ;
@@ -224,7 +232,8 @@ public function withIdentity(IIdentity|Closure $identity): static
224232 */
225233 public function withLocality (string $ value , ?string $ issuer = null ): static
226234 {
227- $ this ->createPrimaryIdentityBuilder ()
235+ $ this
236+ ->createPrimaryIdentityBuilder ()
228237 ->withLocality ($ value , $ issuer );
229238
230239 return $ this ;
@@ -239,7 +248,8 @@ public function withLocality(string $value, ?string $issuer = null): static
239248 */
240249 public function withMobilePhone (string $ value , ?string $ issuer = null ): static
241250 {
242- $ this ->createPrimaryIdentityBuilder ()
251+ $ this
252+ ->createPrimaryIdentityBuilder ()
243253 ->withMobilePhone ($ value , $ issuer );
244254
245255 return $ this ;
@@ -254,7 +264,8 @@ public function withMobilePhone(string $value, ?string $issuer = null): static
254264 */
255265 public function withName (string $ value , ?string $ issuer = null ): static
256266 {
257- $ this ->createPrimaryIdentityBuilder ()
267+ $ this
268+ ->createPrimaryIdentityBuilder ()
258269 ->withName ($ value , $ issuer );
259270
260271 return $ this ;
@@ -269,7 +280,8 @@ public function withName(string $value, ?string $issuer = null): static
269280 */
270281 public function withNameIdentifier (mixed $ value , ?string $ issuer = null ): static
271282 {
272- $ this ->createPrimaryIdentityBuilder ()
283+ $ this
284+ ->createPrimaryIdentityBuilder ()
273285 ->withNameIdentifier ($ value , $ issuer );
274286
275287 return $ this ;
@@ -284,7 +296,8 @@ public function withNameIdentifier(mixed $value, ?string $issuer = null): static
284296 */
285297 public function withOtherPhone (string $ value , ?string $ issuer = null ): static
286298 {
287- $ this ->createPrimaryIdentityBuilder ()
299+ $ this
300+ ->createPrimaryIdentityBuilder ()
288301 ->withOtherPhone ($ value , $ issuer );
289302
290303 return $ this ;
@@ -299,7 +312,8 @@ public function withOtherPhone(string $value, ?string $issuer = null): static
299312 */
300313 public function withPostalCode (string |int $ value , ?string $ issuer = null ): static
301314 {
302- $ this ->createPrimaryIdentityBuilder ()
315+ $ this
316+ ->createPrimaryIdentityBuilder ()
303317 ->withPostalCode ($ value , $ issuer );
304318
305319 return $ this ;
@@ -327,7 +341,8 @@ public function withPrimaryIdentitySelector(Closure $primaryIdentitySelector): s
327341 */
328342 public function withRoles (string |array $ value , ?string $ issuer = null ): static
329343 {
330- $ this ->createPrimaryIdentityBuilder ()
344+ $ this
345+ ->createPrimaryIdentityBuilder ()
331346 ->withRoles ($ value , $ issuer );
332347
333348 return $ this ;
@@ -342,7 +357,8 @@ public function withRoles(string|array $value, ?string $issuer = null): static
342357 */
343358 public function withRsa (string $ value , ?string $ issuer = null ): static
344359 {
345- $ this ->createPrimaryIdentityBuilder ()
360+ $ this
361+ ->createPrimaryIdentityBuilder ()
346362 ->withRsa ($ value , $ issuer );
347363
348364 return $ this ;
@@ -357,7 +373,8 @@ public function withRsa(string $value, ?string $issuer = null): static
357373 */
358374 public function withSid (string $ value , ?string $ issuer = null ): static
359375 {
360- $ this ->createPrimaryIdentityBuilder ()
376+ $ this
377+ ->createPrimaryIdentityBuilder ()
361378 ->withSid ($ value , $ issuer );
362379
363380 return $ this ;
@@ -372,7 +389,8 @@ public function withSid(string $value, ?string $issuer = null): static
372389 */
373390 public function withStateOrProvince (string $ value , ?string $ issuer = null ): static
374391 {
375- $ this ->createPrimaryIdentityBuilder ()
392+ $ this
393+ ->createPrimaryIdentityBuilder ()
376394 ->withStateOrProvince ($ value , $ issuer );
377395
378396 return $ this ;
@@ -387,7 +405,8 @@ public function withStateOrProvince(string $value, ?string $issuer = null): stat
387405 */
388406 public function withStreetAddress (string $ value , ?string $ issuer = null ): static
389407 {
390- $ this ->createPrimaryIdentityBuilder ()
408+ $ this
409+ ->createPrimaryIdentityBuilder ()
391410 ->withStreetAddress ($ value , $ issuer );
392411
393412 return $ this ;
@@ -402,7 +421,8 @@ public function withStreetAddress(string $value, ?string $issuer = null): static
402421 */
403422 public function withSurname (string $ value , ?string $ issuer = null ): static
404423 {
405- $ this ->createPrimaryIdentityBuilder ()
424+ $ this
425+ ->createPrimaryIdentityBuilder ()
406426 ->withSurname ($ value , $ issuer );
407427
408428 return $ this ;
@@ -417,7 +437,8 @@ public function withSurname(string $value, ?string $issuer = null): static
417437 */
418438 public function withThumbprint (string $ value , ?string $ issuer = null ): static
419439 {
420- $ this ->createPrimaryIdentityBuilder ()
440+ $ this
441+ ->createPrimaryIdentityBuilder ()
421442 ->withThumbprint ($ value , $ issuer );
422443
423444 return $ this ;
@@ -432,7 +453,8 @@ public function withThumbprint(string $value, ?string $issuer = null): static
432453 */
433454 public function withUpn (string $ value , ?string $ issuer = null ): static
434455 {
435- $ this ->createPrimaryIdentityBuilder ()
456+ $ this
457+ ->createPrimaryIdentityBuilder ()
436458 ->withUpn ($ value , $ issuer );
437459
438460 return $ this ;
@@ -447,7 +469,8 @@ public function withUpn(string $value, ?string $issuer = null): static
447469 */
448470 public function withUri (string $ value , ?string $ issuer = null ): static
449471 {
450- $ this ->createPrimaryIdentityBuilder ()
472+ $ this
473+ ->createPrimaryIdentityBuilder ()
451474 ->withUri ($ value , $ issuer );
452475
453476 return $ this ;
@@ -462,7 +485,8 @@ public function withUri(string $value, ?string $issuer = null): static
462485 */
463486 public function withX500DistinguishedName (string $ value , ?string $ issuer = null ): static
464487 {
465- $ this ->createPrimaryIdentityBuilder ()
488+ $ this
489+ ->createPrimaryIdentityBuilder ()
466490 ->withX500DistinguishedName ($ value , $ issuer );
467491
468492 return $ this ;
0 commit comments