@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | "GeneralNames must have at least one GeneralName."); |
47 | 47 | } |
48 | 48 | $names = array_map( |
49 | - function (UnspecifiedType $el) { |
|
49 | + function(UnspecifiedType $el) { |
|
50 | 50 | return GeneralName::fromASN1($el->asTagged()); |
51 | 51 | }, $seq->elements()); |
52 | 52 | return new self(...$names); |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | public function allOf($tag) |
105 | 105 | { |
106 | 106 | $names = array_filter($this->_names, |
107 | - function (GeneralName $name) use ($tag) { |
|
107 | + function(GeneralName $name) use ($tag) { |
|
108 | 108 | return $name->tag() == $tag; |
109 | 109 | }); |
110 | 110 | return array_values($names); |
@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | "GeneralNames must have at least one GeneralName."); |
169 | 169 | } |
170 | 170 | $elements = array_map( |
171 | - function (GeneralName $name) { |
|
171 | + function(GeneralName $name) { |
|
172 | 172 | return $name->toASN1(); |
173 | 173 | }, $this->_names); |
174 | 174 | return new Sequence(...$elements); |
@@ -38,7 +38,7 @@ |
||
38 | 38 | protected static function _wordsToIPv6String(array $words) |
39 | 39 | { |
40 | 40 | $groups = array_map( |
41 | - function ($word) { |
|
41 | + function($word) { |
|
42 | 42 | return sprintf("%04x", $word); |
43 | 43 | }, $words); |
44 | 44 | return implode(":", $groups); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | public static function fromPEMs(PEM ...$pems) |
38 | 38 | { |
39 | 39 | $certs = array_map( |
40 | - function (PEM $pem) { |
|
40 | + function(PEM $pem) { |
|
41 | 41 | return Certificate::fromPEM($pem); |
42 | 42 | }, $pems); |
43 | 43 | return new self(...$certs); |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | { |
114 | 114 | return implode("\n", |
115 | 115 | array_map( |
116 | - function (Certificate $cert) { |
|
116 | + function(Certificate $cert) { |
|
117 | 117 | return $cert->toPEM()->string(); |
118 | 118 | }, $this->_certs)); |
119 | 119 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | public static function fromASN1(Sequence $seq) |
46 | 46 | { |
47 | 47 | $extensions = array_map( |
48 | - function (UnspecifiedType $el) { |
|
48 | + function(UnspecifiedType $el) { |
|
49 | 49 | return Extension::fromASN1($el->asSequence()); |
50 | 50 | }, $seq->elements()); |
51 | 51 | return new self(...$extensions); |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | { |
61 | 61 | $elements = array_values( |
62 | 62 | array_map( |
63 | - function ($ext) { |
|
63 | + function($ext) { |
|
64 | 64 | return $ext->toASN1(); |
65 | 65 | }, $this->_extensions)); |
66 | 66 | return new Sequence(...$elements); |
@@ -51,7 +51,7 @@ |
||
51 | 51 | public static function fromPEMs(PEM ...$pems) |
52 | 52 | { |
53 | 53 | $certs = array_map( |
54 | - function ($pem) { |
|
54 | + function($pem) { |
|
55 | 55 | return Certificate::fromPEM($pem); |
56 | 56 | }, $pems); |
57 | 57 | return new self(...$certs); |
@@ -39,7 +39,7 @@ discard block |
||
39 | 39 | public static function fromASN1(Sequence $seq) |
40 | 40 | { |
41 | 41 | $subtrees = array_map( |
42 | - function (UnspecifiedType $el) { |
|
42 | + function(UnspecifiedType $el) { |
|
43 | 43 | return GeneralSubtree::fromASN1($el->asSequence()); |
44 | 44 | }, $seq->elements()); |
45 | 45 | if (!count($subtrees)) { |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | throw new \LogicException("No subtrees."); |
71 | 71 | } |
72 | 72 | $elements = array_map( |
73 | - function (GeneralSubtree $gs) { |
|
73 | + function(GeneralSubtree $gs) { |
|
74 | 74 | return $gs->toASN1(); |
75 | 75 | }, $this->_subtrees); |
76 | 76 | return new Sequence(...$elements); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | protected static function _fromDER($data, $critical) |
39 | 39 | { |
40 | 40 | $attribs = array_map( |
41 | - function (UnspecifiedType $el) { |
|
41 | + function(UnspecifiedType $el) { |
|
42 | 42 | return Attribute::fromASN1($el->asSequence()); |
43 | 43 | }, Sequence::fromDER($data)->elements()); |
44 | 44 | if (!count($attribs)) { |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | throw new \LogicException("No attributes"); |
60 | 60 | } |
61 | 61 | $elements = array_map( |
62 | - function (Attribute $attr) { |
|
62 | + function(Attribute $attr) { |
|
63 | 63 | return $attr->toASN1(); |
64 | 64 | }, array_values($this->_attributes)); |
65 | 65 | return new Sequence(...$elements); |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | ->asImplicit(Element::TYPE_SEQUENCE) |
92 | 92 | ->asSequence(); |
93 | 93 | $permitted = array_map( |
94 | - function (UnspecifiedType $el) { |
|
94 | + function(UnspecifiedType $el) { |
|
95 | 95 | return $el->asObjectIdentifier()->oid(); |
96 | 96 | }, $attr_seq->elements()); |
97 | 97 | $idx++; |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | ->asImplicit(Element::TYPE_SEQUENCE) |
102 | 102 | ->asSequence(); |
103 | 103 | $excluded = array_map( |
104 | - function (UnspecifiedType $el) { |
|
104 | + function(UnspecifiedType $el) { |
|
105 | 105 | return $el->asObjectIdentifier()->oid(); |
106 | 106 | }, $attr_seq->elements()); |
107 | 107 | $idx++; |
@@ -211,14 +211,14 @@ discard block |
||
211 | 211 | } |
212 | 212 | if (isset($this->_permittedAttrs)) { |
213 | 213 | $oids = array_map( |
214 | - function ($oid) { |
|
214 | + function($oid) { |
|
215 | 215 | return new ObjectIdentifier($oid); |
216 | 216 | }, $this->_permittedAttrs); |
217 | 217 | $elements[] = new ImplicitlyTaggedType(0, new Sequence(...$oids)); |
218 | 218 | } |
219 | 219 | if (isset($this->_excludedAttrs)) { |
220 | 220 | $oids = array_map( |
221 | - function ($oid) { |
|
221 | + function($oid) { |
|
222 | 222 | return new ObjectIdentifier($oid); |
223 | 223 | }, $this->_excludedAttrs); |
224 | 224 | $elements[] = new ImplicitlyTaggedType(1, new Sequence(...$oids)); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | protected static function _fromDER($data, $critical) |
76 | 76 | { |
77 | 77 | $targets = array_map( |
78 | - function (UnspecifiedType $el) { |
|
78 | + function(UnspecifiedType $el) { |
|
79 | 79 | return Targets::fromASN1($el->asSequence()); |
80 | 80 | }, Sequence::fromDER($data)->elements()); |
81 | 81 | return new self($critical, ...$targets); |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | protected function _valueASN1() |
127 | 127 | { |
128 | 128 | $elements = array_map( |
129 | - function (Targets $targets) { |
|
129 | + function(Targets $targets) { |
|
130 | 130 | return $targets->toASN1(); |
131 | 131 | }, $this->_targets); |
132 | 132 | return new Sequence(...$elements); |