@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | protected static function _fromDER(string $data, bool $critical): self |
| 75 | 75 | { |
| 76 | 76 | $purposes = array_map( |
| 77 | - function (UnspecifiedType $el) { |
|
| 77 | + function(UnspecifiedType $el) { |
|
| 78 | 78 | return $el->asObjectIdentifier()->oid(); |
| 79 | 79 | }, Sequence::fromDER($data)->elements()); |
| 80 | 80 | return new self($critical, ...$purposes); |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | protected function _valueASN1(): Sequence |
| 117 | 117 | { |
| 118 | 118 | $elements = array_map( |
| 119 | - function ($oid) { |
|
| 119 | + function($oid) { |
|
| 120 | 120 | return new ObjectIdentifier($oid); |
| 121 | 121 | }, $this->_purposes); |
| 122 | 122 | return new Sequence(...$elements); |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | protected static function _fromDER(string $data, bool $critical): self |
| 46 | 46 | { |
| 47 | 47 | $dps = array_map( |
| 48 | - function (UnspecifiedType $el) { |
|
| 48 | + function(UnspecifiedType $el) { |
|
| 49 | 49 | return DistributionPoint::fromASN1($el->asSequence()); |
| 50 | 50 | }, Sequence::fromDER($data)->elements()); |
| 51 | 51 | if (!count($dps)) { |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | throw new \LogicException("No distribution points."); |
| 69 | 69 | } |
| 70 | 70 | $elements = array_map( |
| 71 | - function (DistributionPoint $dp) { |
|
| 71 | + function(DistributionPoint $dp) { |
|
| 72 | 72 | return $dp->toASN1(); |
| 73 | 73 | }, $this->_distributionPoints); |
| 74 | 74 | return new Sequence(...$elements); |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | public static function fromASN1(Sequence $seq): self |
| 42 | 42 | { |
| 43 | 43 | $subtrees = array_map( |
| 44 | - function (UnspecifiedType $el) { |
|
| 44 | + function(UnspecifiedType $el) { |
|
| 45 | 45 | return GeneralSubtree::fromASN1($el->asSequence()); |
| 46 | 46 | }, $seq->elements()); |
| 47 | 47 | if (!count($subtrees)) { |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | throw new \LogicException("No subtrees."); |
| 73 | 73 | } |
| 74 | 74 | $elements = array_map( |
| 75 | - function (GeneralSubtree $gs) { |
|
| 75 | + function(GeneralSubtree $gs) { |
|
| 76 | 76 | return $gs->toASN1(); |
| 77 | 77 | }, $this->_subtrees); |
| 78 | 78 | return new Sequence(...$elements); |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | protected static function _fromDER(string $data, bool $critical): self |
| 41 | 41 | { |
| 42 | 42 | $attribs = array_map( |
| 43 | - function (UnspecifiedType $el) { |
|
| 43 | + function(UnspecifiedType $el) { |
|
| 44 | 44 | return Attribute::fromASN1($el->asSequence()); |
| 45 | 45 | }, Sequence::fromDER($data)->elements()); |
| 46 | 46 | if (!count($attribs)) { |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | throw new \LogicException("No attributes"); |
| 62 | 62 | } |
| 63 | 63 | $elements = array_map( |
| 64 | - function (Attribute $attr) { |
|
| 64 | + function(Attribute $attr) { |
|
| 65 | 65 | return $attr->toASN1(); |
| 66 | 66 | }, array_values($this->_attributes)); |
| 67 | 67 | return new Sequence(...$elements); |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | protected static function _fromDER(string $data, bool $critical): self |
| 78 | 78 | { |
| 79 | 79 | $targets = array_map( |
| 80 | - function (UnspecifiedType $el) { |
|
| 80 | + function(UnspecifiedType $el) { |
|
| 81 | 81 | return Targets::fromASN1($el->asSequence()); |
| 82 | 82 | }, Sequence::fromDER($data)->elements()); |
| 83 | 83 | return new self($critical, ...$targets); |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | protected function _valueASN1(): Sequence |
| 129 | 129 | { |
| 130 | 130 | $elements = array_map( |
| 131 | - function (Targets $targets) { |
|
| 131 | + function(Targets $targets) { |
|
| 132 | 132 | return $targets->toASN1(); |
| 133 | 133 | }, $this->_targets); |
| 134 | 134 | return new Sequence(...$elements); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | public static function fromAttributeValues(AttributeValue ...$values): self |
| 65 | 65 | { |
| 66 | 66 | $attribs = array_map( |
| 67 | - function (AttributeValue $value) { |
|
| 67 | + function(AttributeValue $value) { |
|
| 68 | 68 | return $value->toAttribute(); |
| 69 | 69 | }, $values); |
| 70 | 70 | return new self(...$attribs); |
@@ -79,12 +79,12 @@ discard block |
||
| 79 | 79 | public static function fromASN1(Sequence $seq): self |
| 80 | 80 | { |
| 81 | 81 | $attribs = array_map( |
| 82 | - function (UnspecifiedType $el) { |
|
| 82 | + function(UnspecifiedType $el) { |
|
| 83 | 83 | return Attribute::fromASN1($el->asSequence()); |
| 84 | 84 | }, $seq->elements()); |
| 85 | 85 | // cast attributes |
| 86 | 86 | $attribs = array_map( |
| 87 | - function (Attribute $attr) { |
|
| 87 | + function(Attribute $attr) { |
|
| 88 | 88 | $oid = $attr->oid(); |
| 89 | 89 | if (array_key_exists($oid, self::MAP_OID_TO_CLASS)) { |
| 90 | 90 | $cls = self::MAP_OID_TO_CLASS[$oid]; |
@@ -204,7 +204,7 @@ discard block |
||
| 204 | 204 | { |
| 205 | 205 | return array_merge(array(), |
| 206 | 206 | ...array_map( |
| 207 | - function (Attribute $attr) { |
|
| 207 | + function(Attribute $attr) { |
|
| 208 | 208 | return $attr->values(); |
| 209 | 209 | }, $this->allOf(AttributeType::OID_ROLE))); |
| 210 | 210 | } |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | public function toASN1(): Sequence |
| 218 | 218 | { |
| 219 | 219 | $elements = array_map( |
| 220 | - function (Attribute $attr) { |
|
| 220 | + function(Attribute $attr) { |
|
| 221 | 221 | return $attr->toASN1(); |
| 222 | 222 | }, array_values($this->_attributes)); |
| 223 | 223 | return new Sequence(...$elements); |