EmptyTrustPath::class, ] => EmptyTrustPath::create(), array_key_exists('x5c', $data) && is_array($data['x5c']) => CertificateTrustPath::create($data['x5c']), array_key_exists('ecdaaKeyId', $data) && is_string($data['ecdaaKeyId']) => new EcdaaKeyIdTrustPath( $data['ecdaaKeyId'] ), default => throw InvalidTrustPathException::create('Unsupported trust path'), }; } }