Total Complexity | 5 |
Total Lines | 54 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
17 | class TargetGroup extends Target |
||
18 | { |
||
19 | /** |
||
20 | * Group name. |
||
21 | * |
||
22 | * @var GeneralName |
||
23 | */ |
||
24 | protected $_name; |
||
25 | |||
26 | /** |
||
27 | * Constructor. |
||
28 | * |
||
29 | * @param GeneralName $name |
||
30 | */ |
||
31 | 6 | public function __construct(GeneralName $name) |
|
32 | { |
||
33 | 6 | $this->_name = $name; |
|
34 | 6 | $this->_type = self::TYPE_GROUP; |
|
35 | 6 | } |
|
36 | |||
37 | /** |
||
38 | * {@inheritdoc} |
||
39 | * |
||
40 | * @return self |
||
41 | */ |
||
42 | 3 | public static function fromChosenASN1(TaggedType $el): Target |
|
43 | { |
||
44 | 3 | return new self(GeneralName::fromASN1($el)); |
|
45 | } |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | 2 | public function string(): string |
|
53 | } |
||
54 | |||
55 | /** |
||
56 | * Get group name. |
||
57 | * |
||
58 | * @return GeneralName |
||
59 | */ |
||
60 | 1 | public function name(): GeneralName |
|
63 | } |
||
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | 3 | public function toASN1(): Element |
|
71 | } |
||
72 | } |
||
73 |