@@ 81-93 (lines=13) @@ | ||
78 | return $metadata; |
|
79 | } |
|
80 | ||
81 | final public static function deserialize(array $data) |
|
82 | { |
|
83 | $secondFactorType = new SecondFactorType($data['second_factor_type']); |
|
84 | ||
85 | return new static( |
|
86 | new IdentityId($data['identity_id']), |
|
87 | new Institution($data['identity_institution']), |
|
88 | new SecondFactorId($data['second_factor_id']), |
|
89 | $secondFactorType, |
|
90 | SecondFactorIdentifierFactory::unknownForType($secondFactorType), |
|
91 | new IdentityId($data['authority_id']) |
|
92 | ); |
|
93 | } |
|
94 | ||
95 | final public function serialize() |
|
96 | { |
@@ 74-85 (lines=12) @@ | ||
71 | return $metadata; |
|
72 | } |
|
73 | ||
74 | final public static function deserialize(array $data) |
|
75 | { |
|
76 | $secondFactorType = new SecondFactorType($data['second_factor_type']); |
|
77 | ||
78 | return new static( |
|
79 | new IdentityId($data['identity_id']), |
|
80 | new Institution($data['identity_institution']), |
|
81 | new SecondFactorId($data['second_factor_id']), |
|
82 | $secondFactorType, |
|
83 | SecondFactorIdentifierFactory::unknownForType($secondFactorType) |
|
84 | ); |
|
85 | } |
|
86 | ||
87 | final public function serialize() |
|
88 | { |
@@ 98-111 (lines=14) @@ | ||
95 | $this->registrationCode = $registrationCode; |
|
96 | } |
|
97 | ||
98 | public static function deserialize(array $data) |
|
99 | { |
|
100 | $secondFactorType = new SecondFactorType($data['second_factor_type']); |
|
101 | ||
102 | return new self( |
|
103 | new IdentityId($data['identity_id']), |
|
104 | new Institution($data['identity_institution']), |
|
105 | new SecondFactorId($data['second_factor_id']), |
|
106 | $secondFactorType, |
|
107 | SecondFactorIdentifierFactory::unknownForType($secondFactorType), |
|
108 | DateTime::fromString($data['registration_requested_at']), |
|
109 | $data['registration_code'] |
|
110 | ); |
|
111 | } |
|
112 | ||
113 | public function serialize() |
|
114 | { |