@@ -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); |