| Total Complexity | 5 |
| Total Lines | 48 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | class Certificate |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * The pattern that the contents of a certificate should adhere to |
||
| 14 | */ |
||
| 15 | public const CERTIFICATE_PATTERN = '/^-----BEGIN CERTIFICATE-----([^-]*)^-----END CERTIFICATE-----/m'; |
||
| 16 | |||
| 17 | |||
| 18 | /** |
||
| 19 | * @param string $certificate |
||
| 20 | * |
||
| 21 | * @return bool |
||
| 22 | */ |
||
| 23 | public static function hasValidStructure(string $certificate): bool |
||
| 26 | } |
||
| 27 | |||
| 28 | |||
| 29 | /** |
||
| 30 | * @param string $X509CertificateContents |
||
| 31 | * |
||
| 32 | * @return string |
||
| 33 | */ |
||
| 34 | public static function convertToCertificate(string $X509CertificateContents): string |
||
| 39 | } |
||
| 40 | |||
| 41 | |||
| 42 | /** |
||
| 43 | * @param array|string $issuer |
||
| 44 | * |
||
| 45 | * @return string |
||
| 46 | */ |
||
| 47 | public static function parseIssuer($issuer): string |
||
| 60 |