Total Complexity | 5 |
Total Lines | 48 |
Duplicated Lines | 0 % |
Coverage | 80% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | class KeyPair extends BasicDataStructure |
||
20 | { |
||
21 | /** |
||
22 | * The private key property storage. |
||
23 | * |
||
24 | * @var string The private key. |
||
25 | */ |
||
26 | protected $private = ''; |
||
27 | |||
28 | /** |
||
29 | * The public key property storage. |
||
30 | * |
||
31 | * @var string The public key. |
||
32 | */ |
||
33 | protected $public = ''; |
||
34 | |||
35 | /** |
||
36 | * Key-pair constructor. |
||
37 | * |
||
38 | * @param string $privateKey The private key string. |
||
39 | * @param string $publicKey The public key string. |
||
40 | */ |
||
41 | 562 | public function __construct($privateKey = '', $publicKey = '') |
|
42 | { |
||
43 | 562 | if (is_string($privateKey)) { |
|
1 ignored issue
–
show
|
|||
44 | 562 | $this->private = $privateKey; |
|
45 | } |
||
46 | |||
47 | 562 | if (is_string($publicKey)) { |
|
1 ignored issue
–
show
|
|||
48 | 562 | $this->public = $publicKey; |
|
49 | } |
||
50 | 562 | } |
|
51 | |||
52 | /** |
||
53 | * Key-pair destructor |
||
54 | */ |
||
55 | 562 | public function __destruct() |
|
56 | { |
||
57 | 562 | } |
|
58 | |||
59 | /** |
||
60 | * The key-pair string representation. |
||
61 | * |
||
62 | * @return string |
||
63 | */ |
||
64 | public function __toString() |
||
67 | } |
||
68 | } |
||
69 |