@@ -14,16 +14,16 @@ |
||
14 | 14 | */ |
15 | 15 | class CommonNameValue extends DirectoryString |
16 | 16 | { |
17 | - /** |
|
18 | - * Constructor. |
|
19 | - * |
|
20 | - * @param string $value String value |
|
21 | - * @param int $string_tag Syntax choice |
|
22 | - */ |
|
23 | - public function __construct(string $value, |
|
24 | - int $string_tag = DirectoryString::UTF8) |
|
25 | - { |
|
26 | - $this->_oid = AttributeType::OID_COMMON_NAME; |
|
27 | - parent::__construct($value, $string_tag); |
|
28 | - } |
|
17 | + /** |
|
18 | + * Constructor. |
|
19 | + * |
|
20 | + * @param string $value String value |
|
21 | + * @param int $string_tag Syntax choice |
|
22 | + */ |
|
23 | + public function __construct(string $value, |
|
24 | + int $string_tag = DirectoryString::UTF8) |
|
25 | + { |
|
26 | + $this->_oid = AttributeType::OID_COMMON_NAME; |
|
27 | + parent::__construct($value, $string_tag); |
|
28 | + } |
|
29 | 29 | } |
@@ -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\X501\ASN1\AttributeValue; |
6 | 6 |
@@ -14,16 +14,16 @@ |
||
14 | 14 | */ |
15 | 15 | class TitleValue extends DirectoryString |
16 | 16 | { |
17 | - /** |
|
18 | - * Constructor. |
|
19 | - * |
|
20 | - * @param string $value String value |
|
21 | - * @param int $string_tag Syntax choice |
|
22 | - */ |
|
23 | - public function __construct(string $value, |
|
24 | - int $string_tag = DirectoryString::UTF8) |
|
25 | - { |
|
26 | - $this->_oid = AttributeType::OID_TITLE; |
|
27 | - parent::__construct($value, $string_tag); |
|
28 | - } |
|
17 | + /** |
|
18 | + * Constructor. |
|
19 | + * |
|
20 | + * @param string $value String value |
|
21 | + * @param int $string_tag Syntax choice |
|
22 | + */ |
|
23 | + public function __construct(string $value, |
|
24 | + int $string_tag = DirectoryString::UTF8) |
|
25 | + { |
|
26 | + $this->_oid = AttributeType::OID_TITLE; |
|
27 | + parent::__construct($value, $string_tag); |
|
28 | + } |
|
29 | 29 | } |
@@ -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\X501\ASN1\AttributeValue; |
6 | 6 |
@@ -25,156 +25,156 @@ |
||
25 | 25 | */ |
26 | 26 | abstract class DirectoryString extends AttributeValue |
27 | 27 | { |
28 | - /** |
|
29 | - * Teletex string syntax. |
|
30 | - * |
|
31 | - * @var int |
|
32 | - */ |
|
33 | - const TELETEX = Element::TYPE_T61_STRING; |
|
34 | - |
|
35 | - /** |
|
36 | - * Printable string syntax. |
|
37 | - * |
|
38 | - * @var int |
|
39 | - */ |
|
40 | - const PRINTABLE = Element::TYPE_PRINTABLE_STRING; |
|
41 | - |
|
42 | - /** |
|
43 | - * BMP string syntax. |
|
44 | - * |
|
45 | - * @var int |
|
46 | - */ |
|
47 | - const BMP = Element::TYPE_BMP_STRING; |
|
48 | - |
|
49 | - /** |
|
50 | - * Universal string syntax. |
|
51 | - * |
|
52 | - * @var int |
|
53 | - */ |
|
54 | - const UNIVERSAL = Element::TYPE_UNIVERSAL_STRING; |
|
55 | - |
|
56 | - /** |
|
57 | - * UTF-8 string syntax. |
|
58 | - * |
|
59 | - * @var int |
|
60 | - */ |
|
61 | - const UTF8 = Element::TYPE_UTF8_STRING; |
|
62 | - |
|
63 | - /** |
|
64 | - * Mapping from syntax enumeration to ASN.1 class name. |
|
65 | - * |
|
66 | - * @internal |
|
67 | - * |
|
68 | - * @var array |
|
69 | - */ |
|
70 | - const MAP_TAG_TO_CLASS = [ |
|
71 | - self::TELETEX => T61String::class, |
|
72 | - self::PRINTABLE => PrintableString::class, |
|
73 | - self::UNIVERSAL => UniversalString::class, |
|
74 | - self::UTF8 => UTF8String::class, |
|
75 | - self::BMP => BMPString::class, |
|
76 | - ]; |
|
77 | - |
|
78 | - /** |
|
79 | - * ASN.1 type tag for the chosen syntax. |
|
80 | - * |
|
81 | - * @var int |
|
82 | - */ |
|
83 | - protected $_stringTag; |
|
84 | - |
|
85 | - /** |
|
86 | - * String value. |
|
87 | - * |
|
88 | - * @var string |
|
89 | - */ |
|
90 | - protected $_string; |
|
91 | - |
|
92 | - /** |
|
93 | - * Constructor. |
|
94 | - * |
|
95 | - * @param string $value String value |
|
96 | - * @param int $string_tag Syntax choice |
|
97 | - */ |
|
98 | - public function __construct(string $value, int $string_tag) |
|
99 | - { |
|
100 | - $this->_string = $value; |
|
101 | - $this->_stringTag = $string_tag; |
|
102 | - } |
|
103 | - |
|
104 | - /** |
|
105 | - * {@inheritdoc} |
|
106 | - * |
|
107 | - * @return self |
|
108 | - */ |
|
109 | - public static function fromASN1(UnspecifiedType $el): AttributeValue |
|
110 | - { |
|
111 | - $tag = $el->tag(); |
|
112 | - self::_tagToASN1Class($tag); |
|
113 | - return new static($el->asString()->string(), $tag); |
|
114 | - } |
|
115 | - |
|
116 | - /** |
|
117 | - * {@inheritdoc} |
|
118 | - */ |
|
119 | - public function toASN1(): Element |
|
120 | - { |
|
121 | - $cls = self::_tagToASN1Class($this->_stringTag); |
|
122 | - return new $cls($this->_string); |
|
123 | - } |
|
124 | - |
|
125 | - /** |
|
126 | - * {@inheritdoc} |
|
127 | - */ |
|
128 | - public function stringValue(): string |
|
129 | - { |
|
130 | - return $this->_string; |
|
131 | - } |
|
132 | - |
|
133 | - /** |
|
134 | - * {@inheritdoc} |
|
135 | - */ |
|
136 | - public function equalityMatchingRule(): MatchingRule |
|
137 | - { |
|
138 | - return new CaseIgnoreMatch($this->_stringTag); |
|
139 | - } |
|
140 | - |
|
141 | - /** |
|
142 | - * {@inheritdoc} |
|
143 | - */ |
|
144 | - public function rfc2253String(): string |
|
145 | - { |
|
146 | - // TeletexString is encoded as binary |
|
147 | - if (self::TELETEX == $this->_stringTag) { |
|
148 | - return $this->_transcodedString(); |
|
149 | - } |
|
150 | - return DNParser::escapeString($this->_transcodedString()); |
|
151 | - } |
|
152 | - |
|
153 | - /** |
|
154 | - * {@inheritdoc} |
|
155 | - */ |
|
156 | - protected function _transcodedString(): string |
|
157 | - { |
|
158 | - $step = new TranscodeStep($this->_stringTag); |
|
159 | - return $step->apply($this->_string); |
|
160 | - } |
|
161 | - |
|
162 | - /** |
|
163 | - * Get ASN.1 class name for given DirectoryString type tag. |
|
164 | - * |
|
165 | - * @param int $tag |
|
166 | - * |
|
167 | - * @throws \UnexpectedValueException |
|
168 | - * |
|
169 | - * @return string |
|
170 | - */ |
|
171 | - private static function _tagToASN1Class(int $tag): string |
|
172 | - { |
|
173 | - if (!array_key_exists($tag, self::MAP_TAG_TO_CLASS)) { |
|
174 | - throw new \UnexpectedValueException( |
|
175 | - 'Type ' . Element::tagToName($tag) . |
|
176 | - ' is not valid DirectoryString.'); |
|
177 | - } |
|
178 | - return self::MAP_TAG_TO_CLASS[$tag]; |
|
179 | - } |
|
28 | + /** |
|
29 | + * Teletex string syntax. |
|
30 | + * |
|
31 | + * @var int |
|
32 | + */ |
|
33 | + const TELETEX = Element::TYPE_T61_STRING; |
|
34 | + |
|
35 | + /** |
|
36 | + * Printable string syntax. |
|
37 | + * |
|
38 | + * @var int |
|
39 | + */ |
|
40 | + const PRINTABLE = Element::TYPE_PRINTABLE_STRING; |
|
41 | + |
|
42 | + /** |
|
43 | + * BMP string syntax. |
|
44 | + * |
|
45 | + * @var int |
|
46 | + */ |
|
47 | + const BMP = Element::TYPE_BMP_STRING; |
|
48 | + |
|
49 | + /** |
|
50 | + * Universal string syntax. |
|
51 | + * |
|
52 | + * @var int |
|
53 | + */ |
|
54 | + const UNIVERSAL = Element::TYPE_UNIVERSAL_STRING; |
|
55 | + |
|
56 | + /** |
|
57 | + * UTF-8 string syntax. |
|
58 | + * |
|
59 | + * @var int |
|
60 | + */ |
|
61 | + const UTF8 = Element::TYPE_UTF8_STRING; |
|
62 | + |
|
63 | + /** |
|
64 | + * Mapping from syntax enumeration to ASN.1 class name. |
|
65 | + * |
|
66 | + * @internal |
|
67 | + * |
|
68 | + * @var array |
|
69 | + */ |
|
70 | + const MAP_TAG_TO_CLASS = [ |
|
71 | + self::TELETEX => T61String::class, |
|
72 | + self::PRINTABLE => PrintableString::class, |
|
73 | + self::UNIVERSAL => UniversalString::class, |
|
74 | + self::UTF8 => UTF8String::class, |
|
75 | + self::BMP => BMPString::class, |
|
76 | + ]; |
|
77 | + |
|
78 | + /** |
|
79 | + * ASN.1 type tag for the chosen syntax. |
|
80 | + * |
|
81 | + * @var int |
|
82 | + */ |
|
83 | + protected $_stringTag; |
|
84 | + |
|
85 | + /** |
|
86 | + * String value. |
|
87 | + * |
|
88 | + * @var string |
|
89 | + */ |
|
90 | + protected $_string; |
|
91 | + |
|
92 | + /** |
|
93 | + * Constructor. |
|
94 | + * |
|
95 | + * @param string $value String value |
|
96 | + * @param int $string_tag Syntax choice |
|
97 | + */ |
|
98 | + public function __construct(string $value, int $string_tag) |
|
99 | + { |
|
100 | + $this->_string = $value; |
|
101 | + $this->_stringTag = $string_tag; |
|
102 | + } |
|
103 | + |
|
104 | + /** |
|
105 | + * {@inheritdoc} |
|
106 | + * |
|
107 | + * @return self |
|
108 | + */ |
|
109 | + public static function fromASN1(UnspecifiedType $el): AttributeValue |
|
110 | + { |
|
111 | + $tag = $el->tag(); |
|
112 | + self::_tagToASN1Class($tag); |
|
113 | + return new static($el->asString()->string(), $tag); |
|
114 | + } |
|
115 | + |
|
116 | + /** |
|
117 | + * {@inheritdoc} |
|
118 | + */ |
|
119 | + public function toASN1(): Element |
|
120 | + { |
|
121 | + $cls = self::_tagToASN1Class($this->_stringTag); |
|
122 | + return new $cls($this->_string); |
|
123 | + } |
|
124 | + |
|
125 | + /** |
|
126 | + * {@inheritdoc} |
|
127 | + */ |
|
128 | + public function stringValue(): string |
|
129 | + { |
|
130 | + return $this->_string; |
|
131 | + } |
|
132 | + |
|
133 | + /** |
|
134 | + * {@inheritdoc} |
|
135 | + */ |
|
136 | + public function equalityMatchingRule(): MatchingRule |
|
137 | + { |
|
138 | + return new CaseIgnoreMatch($this->_stringTag); |
|
139 | + } |
|
140 | + |
|
141 | + /** |
|
142 | + * {@inheritdoc} |
|
143 | + */ |
|
144 | + public function rfc2253String(): string |
|
145 | + { |
|
146 | + // TeletexString is encoded as binary |
|
147 | + if (self::TELETEX == $this->_stringTag) { |
|
148 | + return $this->_transcodedString(); |
|
149 | + } |
|
150 | + return DNParser::escapeString($this->_transcodedString()); |
|
151 | + } |
|
152 | + |
|
153 | + /** |
|
154 | + * {@inheritdoc} |
|
155 | + */ |
|
156 | + protected function _transcodedString(): string |
|
157 | + { |
|
158 | + $step = new TranscodeStep($this->_stringTag); |
|
159 | + return $step->apply($this->_string); |
|
160 | + } |
|
161 | + |
|
162 | + /** |
|
163 | + * Get ASN.1 class name for given DirectoryString type tag. |
|
164 | + * |
|
165 | + * @param int $tag |
|
166 | + * |
|
167 | + * @throws \UnexpectedValueException |
|
168 | + * |
|
169 | + * @return string |
|
170 | + */ |
|
171 | + private static function _tagToASN1Class(int $tag): string |
|
172 | + { |
|
173 | + if (!array_key_exists($tag, self::MAP_TAG_TO_CLASS)) { |
|
174 | + throw new \UnexpectedValueException( |
|
175 | + 'Type ' . Element::tagToName($tag) . |
|
176 | + ' is not valid DirectoryString.'); |
|
177 | + } |
|
178 | + return self::MAP_TAG_TO_CLASS[$tag]; |
|
179 | + } |
|
180 | 180 | } |
@@ -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\X501\ASN1\AttributeValue\Feature; |
6 | 6 |
@@ -17,72 +17,72 @@ |
||
17 | 17 | */ |
18 | 18 | abstract class PrintableStringValue extends AttributeValue |
19 | 19 | { |
20 | - /** |
|
21 | - * String value. |
|
22 | - * |
|
23 | - * @var string |
|
24 | - */ |
|
25 | - protected $_string; |
|
20 | + /** |
|
21 | + * String value. |
|
22 | + * |
|
23 | + * @var string |
|
24 | + */ |
|
25 | + protected $_string; |
|
26 | 26 | |
27 | - /** |
|
28 | - * Constructor. |
|
29 | - * |
|
30 | - * @param string $value String value |
|
31 | - */ |
|
32 | - public function __construct(string $value) |
|
33 | - { |
|
34 | - $this->_string = $value; |
|
35 | - } |
|
27 | + /** |
|
28 | + * Constructor. |
|
29 | + * |
|
30 | + * @param string $value String value |
|
31 | + */ |
|
32 | + public function __construct(string $value) |
|
33 | + { |
|
34 | + $this->_string = $value; |
|
35 | + } |
|
36 | 36 | |
37 | - /** |
|
38 | - * {@inheritdoc} |
|
39 | - * |
|
40 | - * @return self |
|
41 | - */ |
|
42 | - public static function fromASN1(UnspecifiedType $el): AttributeValue |
|
43 | - { |
|
44 | - return new static($el->asPrintableString()->string()); |
|
45 | - } |
|
37 | + /** |
|
38 | + * {@inheritdoc} |
|
39 | + * |
|
40 | + * @return self |
|
41 | + */ |
|
42 | + public static function fromASN1(UnspecifiedType $el): AttributeValue |
|
43 | + { |
|
44 | + return new static($el->asPrintableString()->string()); |
|
45 | + } |
|
46 | 46 | |
47 | - /** |
|
48 | - * {@inheritdoc} |
|
49 | - */ |
|
50 | - public function toASN1(): Element |
|
51 | - { |
|
52 | - return new PrintableString($this->_string); |
|
53 | - } |
|
47 | + /** |
|
48 | + * {@inheritdoc} |
|
49 | + */ |
|
50 | + public function toASN1(): Element |
|
51 | + { |
|
52 | + return new PrintableString($this->_string); |
|
53 | + } |
|
54 | 54 | |
55 | - /** |
|
56 | - * {@inheritdoc} |
|
57 | - */ |
|
58 | - public function stringValue(): string |
|
59 | - { |
|
60 | - return $this->_string; |
|
61 | - } |
|
55 | + /** |
|
56 | + * {@inheritdoc} |
|
57 | + */ |
|
58 | + public function stringValue(): string |
|
59 | + { |
|
60 | + return $this->_string; |
|
61 | + } |
|
62 | 62 | |
63 | - /** |
|
64 | - * {@inheritdoc} |
|
65 | - */ |
|
66 | - public function equalityMatchingRule(): MatchingRule |
|
67 | - { |
|
68 | - // default to caseIgnoreMatch |
|
69 | - return new CaseIgnoreMatch(Element::TYPE_PRINTABLE_STRING); |
|
70 | - } |
|
63 | + /** |
|
64 | + * {@inheritdoc} |
|
65 | + */ |
|
66 | + public function equalityMatchingRule(): MatchingRule |
|
67 | + { |
|
68 | + // default to caseIgnoreMatch |
|
69 | + return new CaseIgnoreMatch(Element::TYPE_PRINTABLE_STRING); |
|
70 | + } |
|
71 | 71 | |
72 | - /** |
|
73 | - * {@inheritdoc} |
|
74 | - */ |
|
75 | - public function rfc2253String(): string |
|
76 | - { |
|
77 | - return DNParser::escapeString($this->_transcodedString()); |
|
78 | - } |
|
72 | + /** |
|
73 | + * {@inheritdoc} |
|
74 | + */ |
|
75 | + public function rfc2253String(): string |
|
76 | + { |
|
77 | + return DNParser::escapeString($this->_transcodedString()); |
|
78 | + } |
|
79 | 79 | |
80 | - /** |
|
81 | - * {@inheritdoc} |
|
82 | - */ |
|
83 | - protected function _transcodedString(): string |
|
84 | - { |
|
85 | - // PrintableString maps directly to UTF-8 |
|
86 | - return $this->_string; |
|
87 | - } |
|
80 | + /** |
|
81 | + * {@inheritdoc} |
|
82 | + */ |
|
83 | + protected function _transcodedString(): string |
|
84 | + { |
|
85 | + // PrintableString maps directly to UTF-8 |
|
86 | + return $this->_string; |
|
87 | + } |
|
88 | 88 | } |
@@ -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\X501\ASN1\AttributeValue\Feature; |
6 | 6 |
@@ -14,16 +14,16 @@ |
||
14 | 14 | */ |
15 | 15 | class SurnameValue extends DirectoryString |
16 | 16 | { |
17 | - /** |
|
18 | - * Constructor. |
|
19 | - * |
|
20 | - * @param string $value String value |
|
21 | - * @param int $string_tag Syntax choice |
|
22 | - */ |
|
23 | - public function __construct(string $value, |
|
24 | - int $string_tag = DirectoryString::UTF8) |
|
25 | - { |
|
26 | - $this->_oid = AttributeType::OID_SURNAME; |
|
27 | - parent::__construct($value, $string_tag); |
|
28 | - } |
|
17 | + /** |
|
18 | + * Constructor. |
|
19 | + * |
|
20 | + * @param string $value String value |
|
21 | + * @param int $string_tag Syntax choice |
|
22 | + */ |
|
23 | + public function __construct(string $value, |
|
24 | + int $string_tag = DirectoryString::UTF8) |
|
25 | + { |
|
26 | + $this->_oid = AttributeType::OID_SURNAME; |
|
27 | + parent::__construct($value, $string_tag); |
|
28 | + } |
|
29 | 29 | } |
@@ -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\X501\ASN1\AttributeValue; |
6 | 6 |
@@ -13,63 +13,63 @@ |
||
13 | 13 | */ |
14 | 14 | class UnknownAttributeValue extends AttributeValue |
15 | 15 | { |
16 | - /** |
|
17 | - * ASN.1 element. |
|
18 | - * |
|
19 | - * @var Element |
|
20 | - */ |
|
21 | - protected $_element; |
|
16 | + /** |
|
17 | + * ASN.1 element. |
|
18 | + * |
|
19 | + * @var Element |
|
20 | + */ |
|
21 | + protected $_element; |
|
22 | 22 | |
23 | - /** |
|
24 | - * Constructor. |
|
25 | - * |
|
26 | - * @param string $oid |
|
27 | - * @param Element $el |
|
28 | - */ |
|
29 | - public function __construct(string $oid, Element $el) |
|
30 | - { |
|
31 | - $this->_oid = $oid; |
|
32 | - $this->_element = $el; |
|
33 | - } |
|
23 | + /** |
|
24 | + * Constructor. |
|
25 | + * |
|
26 | + * @param string $oid |
|
27 | + * @param Element $el |
|
28 | + */ |
|
29 | + public function __construct(string $oid, Element $el) |
|
30 | + { |
|
31 | + $this->_oid = $oid; |
|
32 | + $this->_element = $el; |
|
33 | + } |
|
34 | 34 | |
35 | - /** |
|
36 | - * {@inheritdoc} |
|
37 | - */ |
|
38 | - public function toASN1(): Element |
|
39 | - { |
|
40 | - return $this->_element; |
|
41 | - } |
|
35 | + /** |
|
36 | + * {@inheritdoc} |
|
37 | + */ |
|
38 | + public function toASN1(): Element |
|
39 | + { |
|
40 | + return $this->_element; |
|
41 | + } |
|
42 | 42 | |
43 | - /** |
|
44 | - * {@inheritdoc} |
|
45 | - */ |
|
46 | - public function stringValue(): string |
|
47 | - { |
|
48 | - // return DER encoding as a hexstring |
|
49 | - return '#' . bin2hex($this->_element->toDER()); |
|
50 | - } |
|
43 | + /** |
|
44 | + * {@inheritdoc} |
|
45 | + */ |
|
46 | + public function stringValue(): string |
|
47 | + { |
|
48 | + // return DER encoding as a hexstring |
|
49 | + return '#' . bin2hex($this->_element->toDER()); |
|
50 | + } |
|
51 | 51 | |
52 | - /** |
|
53 | - * {@inheritdoc} |
|
54 | - */ |
|
55 | - public function equalityMatchingRule(): MatchingRule |
|
56 | - { |
|
57 | - return new BinaryMatch(); |
|
58 | - } |
|
52 | + /** |
|
53 | + * {@inheritdoc} |
|
54 | + */ |
|
55 | + public function equalityMatchingRule(): MatchingRule |
|
56 | + { |
|
57 | + return new BinaryMatch(); |
|
58 | + } |
|
59 | 59 | |
60 | - /** |
|
61 | - * {@inheritdoc} |
|
62 | - */ |
|
63 | - public function rfc2253String(): string |
|
64 | - { |
|
65 | - return $this->stringValue(); |
|
66 | - } |
|
60 | + /** |
|
61 | + * {@inheritdoc} |
|
62 | + */ |
|
63 | + public function rfc2253String(): string |
|
64 | + { |
|
65 | + return $this->stringValue(); |
|
66 | + } |
|
67 | 67 | |
68 | - /** |
|
69 | - * {@inheritdoc} |
|
70 | - */ |
|
71 | - protected function _transcodedString(): string |
|
72 | - { |
|
73 | - return $this->stringValue(); |
|
74 | - } |
|
68 | + /** |
|
69 | + * {@inheritdoc} |
|
70 | + */ |
|
71 | + protected function _transcodedString(): string |
|
72 | + { |
|
73 | + return $this->stringValue(); |
|
74 | + } |
|
75 | 75 | } |
@@ -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\X501\ASN1\AttributeValue; |
6 | 6 |
@@ -14,16 +14,16 @@ |
||
14 | 14 | */ |
15 | 15 | class PseudonymValue extends DirectoryString |
16 | 16 | { |
17 | - /** |
|
18 | - * Constructor. |
|
19 | - * |
|
20 | - * @param string $value String value |
|
21 | - * @param int $string_tag Syntax choice |
|
22 | - */ |
|
23 | - public function __construct(string $value, |
|
24 | - int $string_tag = DirectoryString::UTF8) |
|
25 | - { |
|
26 | - $this->_oid = AttributeType::OID_PSEUDONYM; |
|
27 | - parent::__construct($value, $string_tag); |
|
28 | - } |
|
17 | + /** |
|
18 | + * Constructor. |
|
19 | + * |
|
20 | + * @param string $value String value |
|
21 | + * @param int $string_tag Syntax choice |
|
22 | + */ |
|
23 | + public function __construct(string $value, |
|
24 | + int $string_tag = DirectoryString::UTF8) |
|
25 | + { |
|
26 | + $this->_oid = AttributeType::OID_PSEUDONYM; |
|
27 | + parent::__construct($value, $string_tag); |
|
28 | + } |
|
29 | 29 | } |
@@ -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\X501\ASN1\AttributeValue; |
6 | 6 |
@@ -14,16 +14,16 @@ |
||
14 | 14 | */ |
15 | 15 | class StateOrProvinceNameValue extends DirectoryString |
16 | 16 | { |
17 | - /** |
|
18 | - * Constructor. |
|
19 | - * |
|
20 | - * @param string $value String value |
|
21 | - * @param int $string_tag Syntax choice |
|
22 | - */ |
|
23 | - public function __construct(string $value, |
|
24 | - int $string_tag = DirectoryString::UTF8) |
|
25 | - { |
|
26 | - $this->_oid = AttributeType::OID_STATE_OR_PROVINCE_NAME; |
|
27 | - parent::__construct($value, $string_tag); |
|
28 | - } |
|
17 | + /** |
|
18 | + * Constructor. |
|
19 | + * |
|
20 | + * @param string $value String value |
|
21 | + * @param int $string_tag Syntax choice |
|
22 | + */ |
|
23 | + public function __construct(string $value, |
|
24 | + int $string_tag = DirectoryString::UTF8) |
|
25 | + { |
|
26 | + $this->_oid = AttributeType::OID_STATE_OR_PROVINCE_NAME; |
|
27 | + parent::__construct($value, $string_tag); |
|
28 | + } |
|
29 | 29 | } |
@@ -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\X501\ASN1\AttributeValue; |
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\X501\ASN1\AttributeValue; |
6 | 6 |