| Total Complexity | 7 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class Boolean extends Element |
||
| 19 | { |
||
| 20 | use UniversalClass; |
||
| 21 | use PrimitiveType; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Value. |
||
| 25 | * |
||
| 26 | * @var bool |
||
| 27 | */ |
||
| 28 | private $_bool; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Constructor. |
||
| 32 | */ |
||
| 33 | 33 | public function __construct(bool $bool) |
|
| 34 | { |
||
| 35 | 33 | $this->_typeTag = self::TYPE_BOOLEAN; |
|
| 36 | 33 | $this->_bool = $bool; |
|
| 37 | 33 | } |
|
| 38 | |||
| 39 | /** |
||
| 40 | * Get the value. |
||
| 41 | */ |
||
| 42 | 2 | public function value(): bool |
|
| 43 | { |
||
| 44 | 2 | return $this->_bool; |
|
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * {@inheritdoc} |
||
| 49 | */ |
||
| 50 | 6 | protected function _encodedContentDER(): string |
|
| 53 | } |
||
| 54 | |||
| 55 | /** |
||
| 56 | * {@inheritdoc} |
||
| 57 | */ |
||
| 58 | 8 | protected static function _decodeFromDER(Identifier $identifier, |
|
| 72 | } |
||
| 73 | } |
||
| 74 |