1 | <?php |
||
20 | class AAControlsExtension extends Extension |
||
21 | { |
||
22 | /** |
||
23 | * Path length contraint. |
||
24 | * |
||
25 | * @var int|null $_pathLenConstraint |
||
26 | */ |
||
27 | protected $_pathLenConstraint; |
||
28 | |||
29 | /** |
||
30 | * Permitted attributes. |
||
31 | * |
||
32 | * Array of OID's. |
||
33 | * |
||
34 | * @var string[]|null $_permittedAttrs |
||
35 | */ |
||
36 | protected $_permittedAttrs; |
||
37 | |||
38 | /** |
||
39 | * Excluded attributes. |
||
40 | * |
||
41 | * Array of OID's. |
||
42 | * |
||
43 | * @var string[]|null $_excludedAttrs |
||
44 | */ |
||
45 | protected $_excludedAttrs; |
||
46 | |||
47 | /** |
||
48 | * Whether to permit unspecified attributes. |
||
49 | * |
||
50 | * @var bool $_permitUnSpecified |
||
51 | */ |
||
52 | protected $_permitUnSpecified; |
||
53 | |||
54 | /** |
||
55 | * Constructor. |
||
56 | * |
||
57 | * @param bool $critical |
||
58 | * @param int|null $path_len |
||
59 | * @param string[]|null $permitted |
||
60 | * @param string[]|null $excluded |
||
61 | * @param bool $permit_unspecified |
||
62 | */ |
||
63 | 4 | public function __construct(bool $critical, $path_len = null, |
|
72 | |||
73 | /** |
||
74 | * |
||
75 | * {@inheritdoc} |
||
76 | * @return self |
||
77 | */ |
||
78 | 2 | protected static function _fromDER(string $data, bool $critical): self |
|
119 | |||
120 | /** |
||
121 | * Check whether path length constraint is present. |
||
122 | * |
||
123 | * @return bool |
||
124 | */ |
||
125 | 2 | public function hasPathLen(): bool |
|
129 | |||
130 | /** |
||
131 | * Get path length constraint. |
||
132 | * |
||
133 | * @throws \LogicException |
||
134 | * @return int |
||
135 | */ |
||
136 | 2 | public function pathLen(): int |
|
143 | |||
144 | /** |
||
145 | * Check whether permitted attributes are present. |
||
146 | * |
||
147 | * @return bool |
||
148 | */ |
||
149 | 2 | public function hasPermittedAttrs(): bool |
|
153 | |||
154 | /** |
||
155 | * Get OID's of permitted attributes. |
||
156 | * |
||
157 | * @throws \LogicException |
||
158 | * @return string[] |
||
159 | */ |
||
160 | 2 | public function permittedAttrs(): array |
|
167 | |||
168 | /** |
||
169 | * Check whether excluded attributes are present. |
||
170 | * |
||
171 | * @return bool |
||
172 | */ |
||
173 | 2 | public function hasExcludedAttrs(): bool |
|
177 | |||
178 | /** |
||
179 | * Get OID's of excluded attributes. |
||
180 | * |
||
181 | * @throws \LogicException |
||
182 | * @return string[] |
||
183 | */ |
||
184 | 2 | public function excludedAttrs(): array |
|
191 | |||
192 | /** |
||
193 | * Whether to permit attributes that are not explicitly specified in |
||
194 | * neither permitted nor excluded list. |
||
195 | * |
||
196 | * @return bool |
||
197 | */ |
||
198 | 1 | public function permitUnspecified(): bool |
|
202 | |||
203 | /** |
||
204 | * |
||
205 | * {@inheritdoc} |
||
206 | * @return Sequence |
||
207 | */ |
||
208 | 2 | protected function _valueASN1(): Sequence |
|
233 | } |
||
234 |
If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:
If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.