Completed
Push — master ( 988510...51ff77 )
by Joni
02:47
created
lib/X501/ASN1/RDN.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	 */
44 44
 	public static function fromAttributeValues(AttributeValue ...$values) {
45 45
 		$attribs = array_map(
46
-			function (AttributeValue $value) {
46
+			function(AttributeValue $value) {
47 47
 				return new AttributeTypeAndValue(
48 48
 					new AttributeType($value->oid()), $value);
49 49
 			}, $values);
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 	 */
59 59
 	public static function fromASN1(Set $set) {
60 60
 		$attribs = array_map(
61
-			function (UnspecifiedType $el) {
61
+			function(UnspecifiedType $el) {
62 62
 				return AttributeTypeAndValue::fromASN1($el->asSequence());
63 63
 			}, $set->elements());
64 64
 		return new self(...$attribs);
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 	 */
72 72
 	public function toASN1() {
73 73
 		$elements = array_map(
74
-			function (AttributeTypeAndValue $tv) {
74
+			function(AttributeTypeAndValue $tv) {
75 75
 				return $tv->toASN1();
76 76
 			}, $this->_attribs);
77 77
 		$set = new Set(...$elements);
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	 */
87 87
 	public function toString() {
88 88
 		$parts = array_map(
89
-			function (AttributeTypeAndValue $tv) {
89
+			function(AttributeTypeAndValue $tv) {
90 90
 				return $tv->toString();
91 91
 			}, $this->_attribs);
92 92
 		return implode("+", $parts);
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 	public function allOf($name) {
139 139
 		$oid = AttributeType::attrNameToOID($name);
140 140
 		$attribs = array_filter($this->_attribs, 
141
-			function (AttributeTypeAndValue $tv) use ($oid) {
141
+			function(AttributeTypeAndValue $tv) use ($oid) {
142 142
 				return $tv->oid() == $oid;
143 143
 			});
144 144
 		return array_values($attribs);
Please login to merge, or discard this patch.
lib/X501/ASN1/Name.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	 */
45 45
 	public static function fromASN1(Sequence $seq) {
46 46
 		$rdns = array_map(
47
-			function (UnspecifiedType $el) {
47
+			function(UnspecifiedType $el) {
48 48
 				return RDN::fromASN1($el->asSet());
49 49
 			}, $seq->elements());
50 50
 		return new self(...$rdns);
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 	 */
86 86
 	public function toASN1() {
87 87
 		$elements = array_map(
88
-			function (RDN $rdn) {
88
+			function(RDN $rdn) {
89 89
 				return $rdn->toASN1();
90 90
 			}, $this->_rdns);
91 91
 		return new Sequence(...$elements);
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	 */
100 100
 	public function toString() {
101 101
 		$parts = array_map(
102
-			function (RDN $rdn) {
102
+			function(RDN $rdn) {
103 103
 				return $rdn->toString();
104 104
 			}, array_reverse($this->_rdns));
105 105
 		return implode(",", $parts);
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 		$oid = AttributeType::attrNameToOID($name);
183 183
 		return array_sum(
184 184
 			array_map(
185
-				function (RDN $rdn) use ($oid) {
185
+				function(RDN $rdn) use ($oid) {
186 186
 					return count($rdn->allOf($oid));
187 187
 				}, $this->_rdns));
188 188
 	}
Please login to merge, or discard this patch.