Total Complexity | 4 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
16 | class InhibitAnyPolicyExtension extends Extension |
||
17 | { |
||
18 | /** |
||
19 | * @var int |
||
20 | */ |
||
21 | protected $_skipCerts; |
||
22 | |||
23 | /** |
||
24 | * Constructor. |
||
25 | * |
||
26 | * @param bool $critical |
||
27 | * @param int $skip_certs |
||
28 | */ |
||
29 | 10 | public function __construct(bool $critical, int $skip_certs) |
|
30 | { |
||
31 | 10 | parent::__construct(self::OID_INHIBIT_ANY_POLICY, $critical); |
|
32 | 10 | $this->_skipCerts = $skip_certs; |
|
33 | 10 | } |
|
34 | |||
35 | /** |
||
36 | * Get value. |
||
37 | * |
||
38 | * @return int |
||
39 | */ |
||
40 | 4 | public function skipCerts(): int |
|
41 | { |
||
42 | 4 | return $this->_skipCerts; |
|
43 | } |
||
44 | |||
45 | /** |
||
46 | * {@inheritdoc} |
||
47 | */ |
||
48 | 9 | protected static function _fromDER(string $data, bool $critical): Extension |
|
52 | } |
||
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | 17 | protected function _valueASN1(): Element |
|
60 | } |
||
61 | } |
||
62 |