@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $qualifiers = array(); |
64 | 64 | if (count($seq) > 1) { |
65 | 65 | $qualifiers = array_map( |
66 | - function (UnspecifiedType $el) { |
|
66 | + function(UnspecifiedType $el) { |
|
67 | 67 | return PolicyQualifierInfo::fromASN1($el->asSequence()); |
68 | 68 | }, $seq->at(1) |
69 | 69 | ->asSequence() |
@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | $elements = array(new ObjectIdentifier($this->_oid)); |
159 | 159 | if (count($this->_qualifiers)) { |
160 | 160 | $qualifiers = array_map( |
161 | - function (PolicyQualifierInfo $pqi) { |
|
161 | + function(PolicyQualifierInfo $pqi) { |
|
162 | 162 | return $pqi->toASN1(); |
163 | 163 | }, array_values($this->_qualifiers)); |
164 | 164 | $elements[] = new Sequence(...$qualifiers); |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | ->asImplicit(Element::TYPE_SEQUENCE) |
86 | 86 | ->asSequence(); |
87 | 87 | $permitted = array_map( |
88 | - function (UnspecifiedType $el) { |
|
88 | + function(UnspecifiedType $el) { |
|
89 | 89 | return $el->asObjectIdentifier()->oid(); |
90 | 90 | }, $attr_seq->elements()); |
91 | 91 | $idx++; |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | ->asImplicit(Element::TYPE_SEQUENCE) |
96 | 96 | ->asSequence(); |
97 | 97 | $excluded = array_map( |
98 | - function (UnspecifiedType $el) { |
|
98 | + function(UnspecifiedType $el) { |
|
99 | 99 | return $el->asObjectIdentifier()->oid(); |
100 | 100 | }, $attr_seq->elements()); |
101 | 101 | $idx++; |
@@ -192,14 +192,14 @@ discard block |
||
192 | 192 | } |
193 | 193 | if (isset($this->_permittedAttrs)) { |
194 | 194 | $oids = array_map( |
195 | - function ($oid) { |
|
195 | + function($oid) { |
|
196 | 196 | return new ObjectIdentifier($oid); |
197 | 197 | }, $this->_permittedAttrs); |
198 | 198 | $elements[] = new ImplicitlyTaggedType(0, new Sequence(...$oids)); |
199 | 199 | } |
200 | 200 | if (isset($this->_excludedAttrs)) { |
201 | 201 | $oids = array_map( |
202 | - function ($oid) { |
|
202 | + function($oid) { |
|
203 | 203 | return new ObjectIdentifier($oid); |
204 | 204 | }, $this->_excludedAttrs); |
205 | 205 | $elements[] = new ImplicitlyTaggedType(1, new Sequence(...$oids)); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | */ |
39 | 39 | public static function fromASN1(Sequence $seq) { |
40 | 40 | $subtrees = array_map( |
41 | - function (UnspecifiedType $el) { |
|
41 | + function(UnspecifiedType $el) { |
|
42 | 42 | return GeneralSubtree::fromASN1($el->asSequence()); |
43 | 43 | }, $seq->elements()); |
44 | 44 | if (!count($subtrees)) { |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | throw new \LogicException("No subtrees."); |
68 | 68 | } |
69 | 69 | $elements = array_map( |
70 | - function (GeneralSubtree $gs) { |
|
70 | + function(GeneralSubtree $gs) { |
|
71 | 71 | return $gs->toASN1(); |
72 | 72 | }, $this->_subtrees); |
73 | 73 | return new Sequence(...$elements); |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | protected static function _fromDER($data, $critical) { |
67 | 67 | $purposes = array_map( |
68 | - function (UnspecifiedType $el) { |
|
68 | + function(UnspecifiedType $el) { |
|
69 | 69 | return $el->asObjectIdentifier()->oid(); |
70 | 70 | }, Sequence::fromDER($data)->elements()); |
71 | 71 | return new self($critical, ...$purposes); |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | |
100 | 100 | protected function _valueASN1() { |
101 | 101 | $elements = array_map( |
102 | - function ($oid) { |
|
102 | + function($oid) { |
|
103 | 103 | return new ObjectIdentifier($oid); |
104 | 104 | }, $this->_purposes); |
105 | 105 | return new Sequence(...$elements); |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public static function fromASN1(Sequence $seq) { |
39 | 39 | $targets = array_map( |
40 | - function (UnspecifiedType $el) { |
|
40 | + function(UnspecifiedType $el) { |
|
41 | 41 | return Target::fromASN1($el->asTagged()); |
42 | 42 | }, $seq->elements()); |
43 | 43 | return new self(...$targets); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | */ |
60 | 60 | public function toASN1() { |
61 | 61 | $elements = array_map( |
62 | - function (Target $target) { |
|
62 | + function(Target $target) { |
|
63 | 63 | return $target->toASN1(); |
64 | 64 | }, $this->_targets); |
65 | 65 | return new Sequence(...$elements); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | |
37 | 37 | protected static function _fromDER($data, $critical) { |
38 | 38 | $mappings = array_map( |
39 | - function (UnspecifiedType $el) { |
|
39 | + function(UnspecifiedType $el) { |
|
40 | 40 | return PolicyMapping::fromASN1($el->asSequence()); |
41 | 41 | }, Sequence::fromDER($data)->elements()); |
42 | 42 | if (!count($mappings)) { |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | throw new \LogicException("No mappings."); |
52 | 52 | } |
53 | 53 | $elements = array_map( |
54 | - function (PolicyMapping $mapping) { |
|
54 | + function(PolicyMapping $mapping) { |
|
55 | 55 | return $mapping->toASN1(); |
56 | 56 | }, $this->_mappings); |
57 | 57 | return new Sequence(...$elements); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | */ |
57 | 57 | public static function fromASN1(Sequence $seq) { |
58 | 58 | $extensions = array_map( |
59 | - function (UnspecifiedType $el) { |
|
59 | + function(UnspecifiedType $el) { |
|
60 | 60 | return Extension::fromASN1($el->asSequence()); |
61 | 61 | }, $seq->elements()); |
62 | 62 | return new self(...$extensions); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | */ |
70 | 70 | public function toASN1() { |
71 | 71 | $elements = array_values( |
72 | - array_map(function ($ext) { |
|
72 | + array_map(function($ext) { |
|
73 | 73 | return $ext->toASN1(); |
74 | 74 | }, $this->_extensions)); |
75 | 75 | return new Sequence(...$elements); |
@@ -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); |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | */ |
101 | 101 | public function allOf($tag) { |
102 | 102 | $names = array_filter($this->_names, |
103 | - function (GeneralName $name) use ($tag) { |
|
103 | + function(GeneralName $name) use ($tag) { |
|
104 | 104 | return $name->tag() == $tag; |
105 | 105 | }); |
106 | 106 | return array_values($names); |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | "GeneralNames must have at least one GeneralName."); |
145 | 145 | } |
146 | 146 | $elements = array_map( |
147 | - function (GeneralName $name) { |
|
147 | + function(GeneralName $name) { |
|
148 | 148 | return $name->toASN1(); |
149 | 149 | }, $this->_names); |
150 | 150 | return new Sequence(...$elements); |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | ++$idx; |
57 | 57 | } |
58 | 58 | $values = array_map( |
59 | - function (UnspecifiedType $el) { |
|
59 | + function(UnspecifiedType $el) { |
|
60 | 60 | return IetfAttrValue::fromASN1($el); |
61 | 61 | }, $seq->at($idx) |
62 | 62 | ->asSequence() |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | $this->_policyAuthority->toASN1()); |
135 | 135 | } |
136 | 136 | $values = array_map( |
137 | - function (IetfAttrValue $val) { |
|
137 | + function(IetfAttrValue $val) { |
|
138 | 138 | return $val->toASN1(); |
139 | 139 | }, $this->_values); |
140 | 140 | $elements[] = new Sequence(...$values); |