@@ -13,90 +13,90 @@ |
||
13 | 13 | */ |
14 | 14 | interface ElementBase extends Encodable |
15 | 15 | { |
16 | - /** |
|
17 | - * Get the class of the ASN.1 type. |
|
18 | - * |
|
19 | - * One of <code>Identifier::CLASS_*</code> constants. |
|
20 | - * |
|
21 | - * @return int |
|
22 | - */ |
|
23 | - public function typeClass(): int; |
|
16 | + /** |
|
17 | + * Get the class of the ASN.1 type. |
|
18 | + * |
|
19 | + * One of <code>Identifier::CLASS_*</code> constants. |
|
20 | + * |
|
21 | + * @return int |
|
22 | + */ |
|
23 | + public function typeClass(): int; |
|
24 | 24 | |
25 | - /** |
|
26 | - * Check whether the element is constructed. |
|
27 | - * |
|
28 | - * Otherwise it's primitive. |
|
29 | - * |
|
30 | - * @return bool |
|
31 | - */ |
|
32 | - public function isConstructed(): bool; |
|
25 | + /** |
|
26 | + * Check whether the element is constructed. |
|
27 | + * |
|
28 | + * Otherwise it's primitive. |
|
29 | + * |
|
30 | + * @return bool |
|
31 | + */ |
|
32 | + public function isConstructed(): bool; |
|
33 | 33 | |
34 | - /** |
|
35 | - * Get the tag of the element. |
|
36 | - * |
|
37 | - * Interpretation of the tag depends on the context. For example it may |
|
38 | - * represent a universal type tag or a tag of an implicitly or explicitly |
|
39 | - * tagged type. |
|
40 | - * |
|
41 | - * @return int |
|
42 | - */ |
|
43 | - public function tag(): int; |
|
34 | + /** |
|
35 | + * Get the tag of the element. |
|
36 | + * |
|
37 | + * Interpretation of the tag depends on the context. For example it may |
|
38 | + * represent a universal type tag or a tag of an implicitly or explicitly |
|
39 | + * tagged type. |
|
40 | + * |
|
41 | + * @return int |
|
42 | + */ |
|
43 | + public function tag(): int; |
|
44 | 44 | |
45 | - /** |
|
46 | - * Check whether the element is a type of a given tag. |
|
47 | - * |
|
48 | - * @param int $tag Type tag |
|
49 | - * |
|
50 | - * @return bool |
|
51 | - */ |
|
52 | - public function isType(int $tag): bool; |
|
45 | + /** |
|
46 | + * Check whether the element is a type of a given tag. |
|
47 | + * |
|
48 | + * @param int $tag Type tag |
|
49 | + * |
|
50 | + * @return bool |
|
51 | + */ |
|
52 | + public function isType(int $tag): bool; |
|
53 | 53 | |
54 | - /** |
|
55 | - * Check whether the element is a type of a given tag. |
|
56 | - * |
|
57 | - * Throws an exception if expectation fails. |
|
58 | - * |
|
59 | - * @param int $tag Type tag |
|
60 | - * |
|
61 | - * @throws \UnexpectedValueException If the element type differs from the expected |
|
62 | - * |
|
63 | - * @return ElementBase |
|
64 | - */ |
|
65 | - public function expectType(int $tag): ElementBase; |
|
54 | + /** |
|
55 | + * Check whether the element is a type of a given tag. |
|
56 | + * |
|
57 | + * Throws an exception if expectation fails. |
|
58 | + * |
|
59 | + * @param int $tag Type tag |
|
60 | + * |
|
61 | + * @throws \UnexpectedValueException If the element type differs from the expected |
|
62 | + * |
|
63 | + * @return ElementBase |
|
64 | + */ |
|
65 | + public function expectType(int $tag): ElementBase; |
|
66 | 66 | |
67 | - /** |
|
68 | - * Check whether the element is tagged (context specific). |
|
69 | - * |
|
70 | - * @return bool |
|
71 | - */ |
|
72 | - public function isTagged(): bool; |
|
67 | + /** |
|
68 | + * Check whether the element is tagged (context specific). |
|
69 | + * |
|
70 | + * @return bool |
|
71 | + */ |
|
72 | + public function isTagged(): bool; |
|
73 | 73 | |
74 | - /** |
|
75 | - * Check whether the element is tagged (context specific) and optionally has |
|
76 | - * a given tag. |
|
77 | - * |
|
78 | - * Throws an exception if the element is not tagged or tag differs from |
|
79 | - * the expected. |
|
80 | - * |
|
81 | - * @param null|int $tag Optional type tag |
|
82 | - * |
|
83 | - * @throws \UnexpectedValueException If expectation fails |
|
84 | - * |
|
85 | - * @return TaggedType |
|
86 | - */ |
|
87 | - public function expectTagged(?int $tag = null): TaggedType; |
|
74 | + /** |
|
75 | + * Check whether the element is tagged (context specific) and optionally has |
|
76 | + * a given tag. |
|
77 | + * |
|
78 | + * Throws an exception if the element is not tagged or tag differs from |
|
79 | + * the expected. |
|
80 | + * |
|
81 | + * @param null|int $tag Optional type tag |
|
82 | + * |
|
83 | + * @throws \UnexpectedValueException If expectation fails |
|
84 | + * |
|
85 | + * @return TaggedType |
|
86 | + */ |
|
87 | + public function expectTagged(?int $tag = null): TaggedType; |
|
88 | 88 | |
89 | - /** |
|
90 | - * Get the object as an abstract Element instance. |
|
91 | - * |
|
92 | - * @return Element |
|
93 | - */ |
|
94 | - public function asElement(): Element; |
|
89 | + /** |
|
90 | + * Get the object as an abstract Element instance. |
|
91 | + * |
|
92 | + * @return Element |
|
93 | + */ |
|
94 | + public function asElement(): Element; |
|
95 | 95 | |
96 | - /** |
|
97 | - * Get the object as an UnspecifiedType instance. |
|
98 | - * |
|
99 | - * @return UnspecifiedType |
|
100 | - */ |
|
101 | - public function asUnspecified(): UnspecifiedType; |
|
96 | + /** |
|
97 | + * Get the object as an UnspecifiedType instance. |
|
98 | + * |
|
99 | + * @return UnspecifiedType |
|
100 | + */ |
|
101 | + public function asUnspecified(): UnspecifiedType; |
|
102 | 102 | } |