@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Sop\X509\Certificate\Extension; |
6 | 6 | |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | protected static function _fromDER(string $data, bool $critical): Extension |
125 | 125 | { |
126 | 126 | $purposes = array_map( |
127 | - function (UnspecifiedType $el) { |
|
127 | + function(UnspecifiedType $el) { |
|
128 | 128 | return $el->asObjectIdentifier()->oid(); |
129 | 129 | }, UnspecifiedType::fromDER($data)->asSequence()->elements()); |
130 | 130 | return new self($critical, ...$purposes); |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | protected function _valueASN1(): Element |
137 | 137 | { |
138 | 138 | $elements = array_map( |
139 | - function ($oid) { |
|
139 | + function($oid) { |
|
140 | 140 | return new ObjectIdentifier($oid); |
141 | 141 | }, $this->_purposes); |
142 | 142 | return new Sequence(...$elements); |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Sop\X509\Certificate\Extension\Target; |
6 | 6 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Sop\X509\Certificate\Extension; |
6 | 6 | |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | protected static function _fromDER(string $data, bool $critical): Extension |
135 | 135 | { |
136 | 136 | $targets = array_map( |
137 | - function (UnspecifiedType $el) { |
|
137 | + function(UnspecifiedType $el) { |
|
138 | 138 | return Targets::fromASN1($el->asSequence()); |
139 | 139 | }, UnspecifiedType::fromDER($data)->asSequence()->elements()); |
140 | 140 | return new self($critical, ...$targets); |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | protected function _valueASN1(): Element |
147 | 147 | { |
148 | 148 | $elements = array_map( |
149 | - function (Targets $targets) { |
|
149 | + function(Targets $targets) { |
|
150 | 150 | return $targets->toASN1(); |
151 | 151 | }, $this->_targets); |
152 | 152 | return new Sequence(...$elements); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Sop\X509\Certificate\Extension; |
6 | 6 | |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | $attr_seq = $seq->getTagged(0)->asImplicit(Element::TYPE_SEQUENCE) |
175 | 175 | ->asSequence(); |
176 | 176 | $permitted = array_map( |
177 | - function (UnspecifiedType $el) { |
|
177 | + function(UnspecifiedType $el) { |
|
178 | 178 | return $el->asObjectIdentifier()->oid(); |
179 | 179 | }, $attr_seq->elements()); |
180 | 180 | ++$idx; |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | $attr_seq = $seq->getTagged(1)->asImplicit(Element::TYPE_SEQUENCE) |
184 | 184 | ->asSequence(); |
185 | 185 | $excluded = array_map( |
186 | - function (UnspecifiedType $el) { |
|
186 | + function(UnspecifiedType $el) { |
|
187 | 187 | return $el->asObjectIdentifier()->oid(); |
188 | 188 | }, $attr_seq->elements()); |
189 | 189 | ++$idx; |
@@ -205,14 +205,14 @@ discard block |
||
205 | 205 | } |
206 | 206 | if (isset($this->_permittedAttrs)) { |
207 | 207 | $oids = array_map( |
208 | - function ($oid) { |
|
208 | + function($oid) { |
|
209 | 209 | return new ObjectIdentifier($oid); |
210 | 210 | }, $this->_permittedAttrs); |
211 | 211 | $elements[] = new ImplicitlyTaggedType(0, new Sequence(...$oids)); |
212 | 212 | } |
213 | 213 | if (isset($this->_excludedAttrs)) { |
214 | 214 | $oids = array_map( |
215 | - function ($oid) { |
|
215 | + function($oid) { |
|
216 | 216 | return new ObjectIdentifier($oid); |
217 | 217 | }, $this->_excludedAttrs); |
218 | 218 | $elements[] = new ImplicitlyTaggedType(1, new Sequence(...$oids)); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Sop\X509\Certificate; |
6 | 6 | |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | public static function fromPEMs(PEM ...$pems): self |
55 | 55 | { |
56 | 56 | $certs = array_map( |
57 | - function ($pem) { |
|
57 | + function($pem) { |
|
58 | 58 | return Certificate::fromPEM($pem); |
59 | 59 | }, $pems); |
60 | 60 | return new self(...$certs); |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Sop\X509\Certificate; |
6 | 6 | |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | public static function fromPEMs(PEM ...$pems): self |
41 | 41 | { |
42 | 42 | $certs = array_map( |
43 | - function (PEM $pem) { |
|
43 | + function(PEM $pem) { |
|
44 | 44 | return Certificate::fromPEM($pem); |
45 | 45 | }, $pems); |
46 | 46 | return new self(...$certs); |
@@ -119,7 +119,7 @@ discard block |
||
119 | 119 | { |
120 | 120 | return implode("\n", |
121 | 121 | array_map( |
122 | - function (Certificate $cert) { |
|
122 | + function(Certificate $cert) { |
|
123 | 123 | return $cert->toPEM()->string(); |
124 | 124 | }, $this->_certs)); |
125 | 125 | } |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Sop\X509\CertificationPath\PathBuilding; |
6 | 6 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $paths = $this->_resolvePathsToTarget($target, $intermediate); |
49 | 49 | // map paths to CertificationPath objects |
50 | 50 | return array_map( |
51 | - function ($certs) { |
|
51 | + function($certs) { |
|
52 | 52 | return new CertificationPath(...$certs); |
53 | 53 | }, $paths); |
54 | 54 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | throw new PathBuildingException('No certification paths.'); |
72 | 72 | } |
73 | 73 | usort($paths, |
74 | - function ($a, $b) { |
|
74 | + function($a, $b) { |
|
75 | 75 | return count($a) < count($b) ? -1 : 1; |
76 | 76 | }); |
77 | 77 | return reset($paths); |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Sop\X509\CertificationPath\PathValidation; |
6 | 6 |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types = 1); |
|
3 | +declare(strict_types=1); |
|
4 | 4 | |
5 | 5 | namespace Sop\X509\CertificationPath\Policy; |
6 | 6 | |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | // is not in the user-initial-policy-set and is not anyPolicy, |
99 | 99 | // delete this node and all its children. |
100 | 100 | $valid_policy_node_set = array_filter($valid_policy_node_set, |
101 | - function (PolicyNode $node) use ($policies) { |
|
101 | + function(PolicyNode $node) use ($policies) { |
|
102 | 102 | if ($node->isAnyPolicy()) { |
103 | 103 | return true; |
104 | 104 | } |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | }); |
111 | 111 | // array of valid policy OIDs |
112 | 112 | $valid_policy_set = array_map( |
113 | - function (PolicyNode $node) { |
|
113 | + function(PolicyNode $node) { |
|
114 | 114 | return $node->validPolicy(); |
115 | 115 | }, $valid_policy_node_set); |
116 | 116 | // 3. If the valid_policy_tree includes a node of depth n with |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | } |
386 | 386 | // for each node in a tree |
387 | 387 | $this->_root->walkNodes( |
388 | - function (PolicyNode $node) use (&$set) { |
|
388 | + function(PolicyNode $node) use (&$set) { |
|
389 | 389 | $parents = $node->parents(); |
390 | 390 | // node has parents |
391 | 391 | if (count($parents)) { |