Total Complexity | 7 |
Total Lines | 69 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
18 | abstract class PrintableStringValue extends AttributeValue |
||
19 | { |
||
20 | /** |
||
21 | * String value. |
||
22 | * |
||
23 | * @var string |
||
24 | */ |
||
25 | protected $_string; |
||
26 | |||
27 | /** |
||
28 | * Constructor. |
||
29 | * |
||
30 | * @param string $value String value |
||
31 | */ |
||
32 | 6 | public function __construct(string $value) |
|
33 | { |
||
34 | 6 | $this->_string = $value; |
|
35 | 6 | } |
|
36 | |||
37 | /** |
||
38 | * {@inheritdoc} |
||
39 | * |
||
40 | * @return self |
||
41 | */ |
||
42 | 4 | public static function fromASN1(UnspecifiedType $el): AttributeValue |
|
43 | { |
||
44 | 4 | return new static($el->asPrintableString()->string()); |
|
45 | } |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | 2 | public function toASN1(): Element |
|
53 | } |
||
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | 1 | public function stringValue(): string |
|
59 | { |
||
60 | 1 | return $this->_string; |
|
61 | } |
||
62 | |||
63 | /** |
||
64 | * {@inheritdoc} |
||
65 | */ |
||
66 | 1 | public function equalityMatchingRule(): MatchingRule |
|
70 | } |
||
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | */ |
||
75 | 1 | public function rfc2253String(): string |
|
78 | } |
||
79 | |||
80 | /** |
||
81 | * {@inheritdoc} |
||
82 | */ |
||
83 | 1 | protected function _transcodedString(): string |
|
87 | } |
||
88 | } |
||
89 |