@@ -273,6 +273,7 @@ |
||
| 273 | 273 | * Get self with extensions added. |
| 274 | 274 | * |
| 275 | 275 | * @param Extension ...$exts One or more Extension objects |
| 276 | + * @param Extension[] $exts |
|
| 276 | 277 | * @return self |
| 277 | 278 | */ |
| 278 | 279 | public function withAdditionalExtensions(Extension ...$exts): self |
@@ -383,6 +383,7 @@ |
||
| 383 | 383 | * Get self with extensions added. |
| 384 | 384 | * |
| 385 | 385 | * @param Extension ...$exts One or more Extension objects |
| 386 | + * @param Extension[] $exts |
|
| 386 | 387 | * @return self |
| 387 | 388 | */ |
| 388 | 389 | public function withAdditionalExtensions(Extension ...$exts): self |
@@ -52,6 +52,7 @@ |
||
| 52 | 52 | * @param PathValidationConfig $config Validation config |
| 53 | 53 | * @param Certificate ...$certificates Certificates from the trust anchor to |
| 54 | 54 | * the end-entity certificate |
| 55 | + * @param Certificate[] $certificates |
|
| 55 | 56 | */ |
| 56 | 57 | public function __construct(Crypto $crypto, PathValidationConfig $config, |
| 57 | 58 | Certificate ...$certificates) |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | public static function fromAttributeValues(AttributeValue ...$values): self |
| 55 | 55 | { |
| 56 | 56 | $attribs = array_map( |
| 57 | - function (AttributeValue $value) { |
|
| 57 | + function(AttributeValue $value) { |
|
| 58 | 58 | return $value->toAttribute(); |
| 59 | 59 | }, $values); |
| 60 | 60 | return new self(...$attribs); |
@@ -69,12 +69,12 @@ discard block |
||
| 69 | 69 | public static function fromASN1(Set $set): self |
| 70 | 70 | { |
| 71 | 71 | $attribs = array_map( |
| 72 | - function (UnspecifiedType $el) { |
|
| 72 | + function(UnspecifiedType $el) { |
|
| 73 | 73 | return Attribute::fromASN1($el->asSequence()); |
| 74 | 74 | }, $set->elements()); |
| 75 | 75 | // cast attributes |
| 76 | 76 | $attribs = array_map( |
| 77 | - function (Attribute $attr) { |
|
| 77 | + function(Attribute $attr) { |
|
| 78 | 78 | $oid = $attr->oid(); |
| 79 | 79 | if (array_key_exists($oid, self::MAP_OID_TO_CLASS)) { |
| 80 | 80 | $cls = self::MAP_OID_TO_CLASS[$oid]; |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | public function toASN1(): Set |
| 118 | 118 | { |
| 119 | 119 | $elements = array_map( |
| 120 | - function (Attribute $attr) { |
|
| 120 | + function(Attribute $attr) { |
|
| 121 | 121 | return $attr->toASN1(); |
| 122 | 122 | }, array_values($this->_attributes)); |
| 123 | 123 | $set = new Set(...$elements); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | "GeneralNames must have at least one GeneralName."); |
| 50 | 50 | } |
| 51 | 51 | $names = array_map( |
| 52 | - function (UnspecifiedType $el) { |
|
| 52 | + function(UnspecifiedType $el) { |
|
| 53 | 53 | return GeneralName::fromASN1($el->asTagged()); |
| 54 | 54 | }, $seq->elements()); |
| 55 | 55 | return new self(...$names); |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | public function allOf(int $tag): array |
| 108 | 108 | { |
| 109 | 109 | $names = array_filter($this->_names, |
| 110 | - function (GeneralName $name) use ($tag) { |
|
| 110 | + function(GeneralName $name) use ($tag) { |
|
| 111 | 111 | return $name->tag() == $tag; |
| 112 | 112 | }); |
| 113 | 113 | return array_values($names); |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | "GeneralNames must have at least one GeneralName."); |
| 172 | 172 | } |
| 173 | 173 | $elements = array_map( |
| 174 | - function (GeneralName $name) { |
|
| 174 | + function(GeneralName $name) { |
|
| 175 | 175 | return $name->toASN1(); |
| 176 | 176 | }, $this->_names); |
| 177 | 177 | return new Sequence(...$elements); |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | protected static function _wordsToIPv6String(array $words): string |
| 41 | 41 | { |
| 42 | 42 | $groups = array_map( |
| 43 | - function ($word) { |
|
| 43 | + function($word) { |
|
| 44 | 44 | return sprintf("%04x", $word); |
| 45 | 45 | }, $words); |
| 46 | 46 | return implode(":", $groups); |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | public static function fromPEMs(PEM ...$pems): self |
| 40 | 40 | { |
| 41 | 41 | $certs = array_map( |
| 42 | - function (PEM $pem) { |
|
| 42 | + function(PEM $pem) { |
|
| 43 | 43 | return Certificate::fromPEM($pem); |
| 44 | 44 | }, $pems); |
| 45 | 45 | return new self(...$certs); |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | { |
| 116 | 116 | return implode("\n", |
| 117 | 117 | array_map( |
| 118 | - function (Certificate $cert) { |
|
| 118 | + function(Certificate $cert) { |
|
| 119 | 119 | return $cert->toPEM()->string(); |
| 120 | 120 | }, $this->_certs)); |
| 121 | 121 | } |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | public static function fromPEMs(PEM ...$pems): self |
| 54 | 54 | { |
| 55 | 55 | $certs = array_map( |
| 56 | - function ($pem) { |
|
| 56 | + function($pem) { |
|
| 57 | 57 | return Certificate::fromPEM($pem); |
| 58 | 58 | }, $pems); |
| 59 | 59 | return new self(...$certs); |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | public static function fromASN1(Sequence $seq): self |
| 48 | 48 | { |
| 49 | 49 | $extensions = array_map( |
| 50 | - function (UnspecifiedType $el) { |
|
| 50 | + function(UnspecifiedType $el) { |
|
| 51 | 51 | return Ext\Extension::fromASN1($el->asSequence()); |
| 52 | 52 | }, $seq->elements()); |
| 53 | 53 | return new self(...$extensions); |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | { |
| 63 | 63 | $elements = array_values( |
| 64 | 64 | array_map( |
| 65 | - function ($ext) { |
|
| 65 | + function($ext) { |
|
| 66 | 66 | return $ext->toASN1(); |
| 67 | 67 | }, $this->_extensions)); |
| 68 | 68 | return new Sequence(...$elements); |