@@ -97,7 +97,7 @@ public function getVcAtContext(): VcAtContextClaimValue
9797 throw new VcDataModelException ('Invalid @context claim. ' );
9898 }
9999
100- return $ this ->vcAtContextClaimValue = $ this ->claimFactory ->forVcDataModel ()->buildVcAtContextClaimValue (
100+ return $ this ->vcAtContextClaimValue = $ this ->claimFactory ->forVcDataModel2 ()->buildVcAtContextClaimValue (
101101 $ baseContext ,
102102 $ vcContext ,
103103 );
@@ -140,7 +140,7 @@ public function getVcType(): TypeClaimValue
140140 throw new VcDataModelException ('Invalid Type claim. ' );
141141 }
142142
143- return $ this ->vcTypeClaimValue = $ this ->claimFactory ->forVcDataModel ()->buildTypeClaimValue ($ vcType );
143+ return $ this ->vcTypeClaimValue = $ this ->claimFactory ->forVcDataModel2 ()->buildTypeClaimValue ($ vcType );
144144 }
145145
146146
@@ -161,7 +161,7 @@ public function getVcCredentialSubject(): VcCredentialSubjectClaimBag
161161 throw new VcDataModelException ('Invalid Credential Subject claim. ' );
162162 }
163163
164- return $ this ->vcCredentialSubjectClaimBag = $ this ->claimFactory ->forVcDataModel ()
164+ return $ this ->vcCredentialSubjectClaimBag = $ this ->claimFactory ->forVcDataModel2 ()
165165 ->buildVcCredentialSubjectClaimBag (
166166 $ vcCredentialSubject ,
167167 $ this ->getSubject (),
@@ -192,13 +192,13 @@ public function getVcIssuer(): VcIssuerClaimValue
192192 }
193193
194194 if (is_string ($ vcIssuer )) {
195- return $ this ->vcIssuerClaimValue = $ this ->claimFactory ->forVcDataModel ()->buildVcIssuerClaimValue (
195+ return $ this ->vcIssuerClaimValue = $ this ->claimFactory ->forVcDataModel2 ()->buildVcIssuerClaimValue (
196196 [ClaimsEnum::Id->value => $ vcIssuer ],
197197 );
198198 }
199199
200200 if (is_array ($ vcIssuer )) {
201- return $ this ->vcIssuerClaimValue = $ this ->claimFactory ->forVcDataModel ()->buildVcIssuerClaimValue (
201+ return $ this ->vcIssuerClaimValue = $ this ->claimFactory ->forVcDataModel2 ()->buildVcIssuerClaimValue (
202202 $ vcIssuer ,
203203 );
204204 }
@@ -233,14 +233,15 @@ public function getValidFrom(): DateTimeImmutable
233233 throw new VcDataModelException ('Invalid Not Before or Issued At claim. ' , $ e ->getCode (), $ e );
234234 }
235235 }
236+
236237 throw new VcDataModelException ('Valid From claim is missing. ' );
237238 }
238239
239240 try {
240241 $ validFromStr = $ this ->helpers ->type ()->ensureNonEmptyString ($ validFrom , ClaimsEnum::ValidFrom->value );
241242 return $ this ->validFrom = $ this ->helpers ->dateTime ()->fromXsDateTime ($ validFromStr );
242- } catch (Exception $ e ) {
243- throw new VcDataModelException ('Invalid Valid From claim. ' , (int ) $ e ->getCode (), $ e );
243+ } catch (Exception $ exception ) {
244+ throw new VcDataModelException ('Invalid Valid From claim. ' , (int ) $ exception ->getCode (), $ exception );
244245 }
245246 }
246247
@@ -287,15 +288,16 @@ public function getValidUntil(): ?DateTimeImmutable
287288 throw new VcDataModelException ('Invalid Expiration Time claim. ' , $ e ->getCode (), $ e );
288289 }
289290 }
291+
290292 $ this ->validUntil = false ;
291293 return null ;
292294 }
293295
294296 try {
295297 $ validUntilStr = $ this ->helpers ->type ()->ensureNonEmptyString ($ validUntil , ClaimsEnum::ValidUntil->value );
296298 return $ this ->validUntil = $ this ->helpers ->dateTime ()->fromXsDateTime ($ validUntilStr );
297- } catch (Exception $ e ) {
298- throw new VcDataModelException ('Invalid Valid Until claim. ' , (int ) $ e ->getCode (), $ e );
299+ } catch (Exception $ exception ) {
300+ throw new VcDataModelException ('Invalid Valid Until claim. ' , (int ) $ exception ->getCode (), $ exception );
299301 }
300302 }
301303
@@ -336,7 +338,7 @@ public function getVcProof(): ?VcProofClaimValue
336338 throw new VcDataModelException ('Invalid Proof claim. ' );
337339 }
338340
339- return $ this ->vcProofClaimValue = $ this ->claimFactory ->forVcDataModel ()->buildVcProofClaimValue ($ vcProof );
341+ return $ this ->vcProofClaimValue = $ this ->claimFactory ->forVcDataModel2 ()->buildVcProofClaimValue ($ vcProof );
340342 }
341343
342344
@@ -364,7 +366,7 @@ public function getVcCredentialStatus(): ?VcCredentialStatusClaimValue
364366 throw new VcDataModelException ('Invalid Credential Status claim. ' );
365367 }
366368
367- return $ this ->vcCredentialStatusClaimValue = $ this ->claimFactory ->forVcDataModel ()
369+ return $ this ->vcCredentialStatusClaimValue = $ this ->claimFactory ->forVcDataModel2 ()
368370 ->buildVcCredentialStatusClaimValue ($ vcCredentialStatus );
369371 }
370372
@@ -393,7 +395,7 @@ public function getVcCredentialSchema(): ?VcCredentialSchemaClaimBag
393395 throw new VcDataModelException ('Invalid Credential Schema claim. ' );
394396 }
395397
396- return $ this ->vcCredentialSchemaClaimBag = $ this ->claimFactory ->forVcDataModel ()
398+ return $ this ->vcCredentialSchemaClaimBag = $ this ->claimFactory ->forVcDataModel2 ()
397399 ->buildVcCredentialSchemaClaimBag ($ vcCredentialSchema );
398400 }
399401
@@ -422,7 +424,7 @@ public function getVcRefreshService(): ?VcRefreshServiceClaimBag
422424 throw new VcDataModelException ('Invalid Refresh Service claim. ' );
423425 }
424426
425- return $ this ->vcRefreshServiceClaimBag = $ this ->claimFactory ->forVcDataModel ()
427+ return $ this ->vcRefreshServiceClaimBag = $ this ->claimFactory ->forVcDataModel2 ()
426428 ->buildVcRefreshServiceClaimBag ($ vcRefreshService );
427429 }
428430
@@ -451,7 +453,7 @@ public function getVcTermsOfUse(): ?VcTermsOfUseClaimBag
451453 throw new VcDataModelException ('Invalid Terms Of Use claim. ' );
452454 }
453455
454- return $ this ->vcTermsOfUseClaimBag = $ this ->claimFactory ->forVcDataModel ()
456+ return $ this ->vcTermsOfUseClaimBag = $ this ->claimFactory ->forVcDataModel2 ()
455457 ->buildVcTermsOfUseClaimBag ($ vcTermsOfUse );
456458 }
457459
@@ -480,7 +482,7 @@ public function getVcEvidence(): ?VcEvidenceClaimBag
480482 throw new VcDataModelException ('Invalid Evidence claim. ' );
481483 }
482484
483- return $ this ->vcEvidenceClaimBag = $ this ->claimFactory ->forVcDataModel ()
485+ return $ this ->vcEvidenceClaimBag = $ this ->claimFactory ->forVcDataModel2 ()
484486 ->buildVcEvidenceClaimBag ($ vcEvidence );
485487 }
486488}
0 commit comments