| Total Complexity | 5 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | class RFC822Name extends GeneralName |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * Email. |
||
| 21 | * |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | protected $_email; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Constructor. |
||
| 28 | * |
||
| 29 | * @param string $email |
||
| 30 | */ |
||
| 31 | 11 | public function __construct(string $email) |
|
| 32 | { |
||
| 33 | 11 | $this->_tag = self::TAG_RFC822_NAME; |
|
| 34 | 11 | $this->_email = $email; |
|
| 35 | 11 | } |
|
| 36 | |||
| 37 | /** |
||
| 38 | * {@inheritdoc} |
||
| 39 | * |
||
| 40 | * @return self |
||
| 41 | */ |
||
| 42 | 9 | public static function fromChosenASN1(UnspecifiedType $el): GeneralName |
|
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * {@inheritdoc} |
||
| 49 | */ |
||
| 50 | public function string(): string |
||
| 51 | 1 | { |
|
| 52 | return $this->_email; |
||
| 53 | 1 | } |
|
| 54 | |||
| 55 | /** |
||
| 56 | * Get email. |
||
| 57 | * |
||
| 58 | * @return string |
||
| 59 | */ |
||
| 60 | public function email(): string |
||
| 61 | 2 | { |
|
| 62 | return $this->_email; |
||
| 63 | 2 | } |
|
| 64 | |||
| 65 | /** |
||
| 66 | * {@inheritdoc} |
||
| 67 | */ |
||
| 68 | protected function _choiceASN1(): TaggedType |
||
| 71 | } |
||
| 72 | } |
||
| 73 |