certificates = $certificates; } /** * @return string[] */ public function getCertificates(): array { return $this->certificates; } /** * {@inheritdoc} */ public static function createFromArray(array $data): TrustPath { Assertion::keyExists($data, 'x5c', 'The trust path type is invalid'); return new CertificateTrustPath($data['x5c']); } /** * @return mixed[] */ public function jsonSerialize(): array { return [ 'type' => self::class, 'x5c' => $this->certificates, ]; } }