@@ -35,7 +35,7 @@ |
||
| 35 | 35 | */ |
| 36 | 36 | public static function fromPEMs(PEM ...$pems) { |
| 37 | 37 | $certs = array_map( |
| 38 | - function ($pem) { |
|
| 38 | + function($pem) { |
|
| 39 | 39 | return Certificate::fromPEM($pem); |
| 40 | 40 | }, $pems); |
| 41 | 41 | return new self(...$certs); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | public function allOf($name) { |
| 71 | 71 | $oid = AttributeType::attrNameToOID($name); |
| 72 | 72 | $attrs = array_filter($this->_attributes, |
| 73 | - function (Attribute $attr) use ($oid) { |
|
| 73 | + function(Attribute $attr) use ($oid) { |
|
| 74 | 74 | return $attr->oid() == $oid; |
| 75 | 75 | }); |
| 76 | 76 | return array_values($attrs); |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | public function withUnique(Attribute $attr) { |
| 111 | 111 | $obj = clone $this; |
| 112 | 112 | $obj->_attributes = array_filter($obj->_attributes, |
| 113 | - function (Attribute $a) use ($attr) { |
|
| 113 | + function(Attribute $a) use ($attr) { |
|
| 114 | 114 | return $a->oid() != $attr->oid(); |
| 115 | 115 | }); |
| 116 | 116 | $obj->_attributes[] = $attr; |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | $paths = $this->_resolvePathsToTarget($target, $intermediate); |
| 46 | 46 | // map paths to CertificationPath objects |
| 47 | 47 | return array_map( |
| 48 | - function ($certs) { |
|
| 48 | + function($certs) { |
|
| 49 | 49 | return new CertificationPath(...$certs); |
| 50 | 50 | }, $paths); |
| 51 | 51 | } |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | throw new PathBuildingException("No certification paths."); |
| 109 | 109 | } |
| 110 | 110 | usort($paths, |
| 111 | - function ($a, $b) { |
|
| 111 | + function($a, $b) { |
|
| 112 | 112 | return count($a) < count($b) ? -1 : 1; |
| 113 | 113 | }); |
| 114 | 114 | return reset($paths); |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | */ |
| 62 | 62 | public static function fromAttributeValues(AttributeValue ...$values) { |
| 63 | 63 | $attribs = array_map( |
| 64 | - function (AttributeValue $value) { |
|
| 64 | + function(AttributeValue $value) { |
|
| 65 | 65 | return $value->toAttribute(); |
| 66 | 66 | }, $values); |
| 67 | 67 | return new self(...$attribs); |
@@ -75,13 +75,13 @@ discard block |
||
| 75 | 75 | */ |
| 76 | 76 | public static function fromASN1(Sequence $seq) { |
| 77 | 77 | $attribs = array_map( |
| 78 | - function (Element $el) { |
|
| 78 | + function(Element $el) { |
|
| 79 | 79 | return Attribute::fromASN1( |
| 80 | 80 | $el->expectType(Element::TYPE_SEQUENCE)); |
| 81 | 81 | }, $seq->elements()); |
| 82 | 82 | // cast attributes |
| 83 | 83 | $attribs = array_map( |
| 84 | - function (Attribute $attr) { |
|
| 84 | + function(Attribute $attr) { |
|
| 85 | 85 | $oid = $attr->oid(); |
| 86 | 86 | if (array_key_exists($oid, self::MAP_OID_TO_CLASS)) { |
| 87 | 87 | $cls = self::MAP_OID_TO_CLASS[$oid]; |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | */ |
| 190 | 190 | public function toASN1() { |
| 191 | 191 | $elements = array_map( |
| 192 | - function (Attribute $attr) { |
|
| 192 | + function(Attribute $attr) { |
|
| 193 | 193 | return $attr->toASN1(); |
| 194 | 194 | }, array_values($this->_attributes)); |
| 195 | 195 | return new Sequence(...$elements); |
@@ -38,6 +38,7 @@ discard block |
||
| 38 | 38 | * Constructor |
| 39 | 39 | * |
| 40 | 40 | * @param Attribute ...$attribs Attribute objects |
| 41 | + * @param Attribute[] $attribs |
|
| 41 | 42 | */ |
| 42 | 43 | public function __construct(Attribute ...$attribs) { |
| 43 | 44 | $this->_attributes = $attribs; |
@@ -47,6 +48,7 @@ discard block |
||
| 47 | 48 | * Initialize from attribute values. |
| 48 | 49 | * |
| 49 | 50 | * @param AttributeValue ...$values |
| 51 | + * @param AttributeValue[] $values |
|
| 50 | 52 | * @return self |
| 51 | 53 | */ |
| 52 | 54 | public static function fromAttributeValues(AttributeValue ...$values) { |