@@ -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\GeneralName; |
| 6 | 6 | |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | protected static function _wordsToIPv6String(array $words): string |
| 44 | 44 | { |
| 45 | 45 | $groups = array_map( |
| 46 | - function ($word) { |
|
| 46 | + function($word) { |
|
| 47 | 47 | return sprintf('%04x', $word); |
| 48 | 48 | }, $words); |
| 49 | 49 | return implode(':', $groups); |
@@ -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\GeneralName; |
| 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\GeneralName; |
| 6 | 6 | |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | 'GeneralNames must have at least one GeneralName.'); |
| 52 | 52 | } |
| 53 | 53 | $names = array_map( |
| 54 | - function (UnspecifiedType $el) { |
|
| 54 | + function(UnspecifiedType $el) { |
|
| 55 | 55 | return GeneralName::fromASN1($el->asTagged()); |
| 56 | 56 | }, $seq->elements()); |
| 57 | 57 | return new self(...$names); |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | public function allOf(int $tag): array |
| 98 | 98 | { |
| 99 | 99 | $names = array_filter($this->_names, |
| 100 | - function (GeneralName $name) use ($tag) { |
|
| 100 | + function(GeneralName $name) use ($tag) { |
|
| 101 | 101 | return $name->tag() === $tag; |
| 102 | 102 | }); |
| 103 | 103 | return array_values($names); |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | 'GeneralNames must have at least one GeneralName.'); |
| 161 | 161 | } |
| 162 | 162 | $elements = array_map( |
| 163 | - function (GeneralName $name) { |
|
| 163 | + function(GeneralName $name) { |
|
| 164 | 164 | return $name->toASN1(); |
| 165 | 165 | }, $this->_names); |
| 166 | 166 | 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; |
| 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; |
| 6 | 6 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | public static function fromASN1(Sequence $seq): Extensions |
| 62 | 62 | { |
| 63 | 63 | $extensions = array_map( |
| 64 | - function (UnspecifiedType $el) { |
|
| 64 | + function(UnspecifiedType $el) { |
|
| 65 | 65 | return Extension::fromASN1($el->asSequence()); |
| 66 | 66 | }, $seq->elements()); |
| 67 | 67 | return new self(...$extensions); |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | { |
| 77 | 77 | $elements = array_values( |
| 78 | 78 | array_map( |
| 79 | - function ($ext) { |
|
| 79 | + function($ext) { |
|
| 80 | 80 | return $ext->toASN1(); |
| 81 | 81 | }, $this->_extensions)); |
| 82 | 82 | 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; |
| 6 | 6 | |
@@ -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\DistributionPoint; |
| 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 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | protected static function _fromDER(string $data, bool $critical): Extension |
| 77 | 77 | { |
| 78 | 78 | $access = array_map( |
| 79 | - function (UnspecifiedType $el) { |
|
| 79 | + function(UnspecifiedType $el) { |
|
| 80 | 80 | return SubjectAccessDescription::fromASN1($el->asSequence()); |
| 81 | 81 | }, UnspecifiedType::fromDER($data)->asSequence()->elements()); |
| 82 | 82 | return new self($critical, ...$access); |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | protected function _valueASN1(): Element |
| 89 | 89 | { |
| 90 | 90 | $elements = array_map( |
| 91 | - function (AccessDescription $access) { |
|
| 91 | + function(AccessDescription $access) { |
|
| 92 | 92 | return $access->toASN1(); |
| 93 | 93 | }, $this->_accessDescriptions); |
| 94 | 94 | 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 | |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | protected static function _fromDER(string $data, bool $critical): Extension |
| 77 | 77 | { |
| 78 | 78 | $dps = array_map( |
| 79 | - function (UnspecifiedType $el) { |
|
| 79 | + function(UnspecifiedType $el) { |
|
| 80 | 80 | return DistributionPoint::fromASN1($el->asSequence()); |
| 81 | 81 | }, UnspecifiedType::fromDER($data)->asSequence()->elements()); |
| 82 | 82 | if (!count($dps)) { |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | throw new \LogicException('No distribution points.'); |
| 97 | 97 | } |
| 98 | 98 | $elements = array_map( |
| 99 | - function (DistributionPoint $dp) { |
|
| 99 | + function(DistributionPoint $dp) { |
|
| 100 | 100 | return $dp->toASN1(); |
| 101 | 101 | }, $this->_distributionPoints); |
| 102 | 102 | return new Sequence(...$elements); |