Passed
Push — master ( 942b41...f022ef )
by Charles
03:22
created

Keypair::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace ncryptf;
4
5
final class Keypair
6
{
7
    /**
8
     * Secret key
9
     *
10
     * @var string
11
     */
12
    private $secret;
13
14
    /**
15
     * Public Key
16
     *
17
     * @var string
18
     */
19
    private $public;
20
21
    /**
22
     * Constructor
23
     *
24
     * @param string $secret
25
     * @param string $public
26
     */
27
    public function __construct(string $secret, string $public)
28
    {
29
        $this->secret = $secret;
30
        $this->public = $public;
31
    }
32
33
    /**
34
     * Returns the public key
35
     *
36
     * @return string|null
37
     */
38
    public function getPublicKey() :? string
39
    {
40
        return $this->public;
41
    }
42
43
    /**
44
     * Returns the secret key
45
     *
46
     * @return string|null
47
     */
48
    public function getSecretKey() :? string
49
    {
50
        return $this->secret;
51
    }
52
}
53