Total Complexity | 6 |
Total Lines | 61 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php |
||
15 | class Nfc implements NfcInterface |
||
16 | { |
||
17 | /** |
||
18 | * NFC message |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $message = ''; |
||
22 | |||
23 | /** |
||
24 | * Encryption Public Key |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $encryptionPublicKey = ''; |
||
28 | |||
29 | public function __construct($message, $encryptionPublicKey) |
||
30 | { |
||
31 | $this->setMessage($message); |
||
32 | $this->setEncryptionPublicKey($encryptionPublicKey); |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | public function setMessage($message) |
||
39 | { |
||
40 | $this->message = $message; |
||
41 | return $this; |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | public function setEncryptionPublicKey($encryptionPublicKey) |
||
51 | } |
||
52 | |||
53 | public function toArray() |
||
54 | { |
||
55 | $array = [ |
||
56 | 'message' => $this->getMessage(), |
||
57 | 'encryptionPublicKey' => $this->getEncryptionPublicKey() |
||
58 | ]; |
||
59 | return $array; |
||
60 | } |
||
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | public function getMessage() |
||
66 | { |
||
67 | return $this->message; |
||
68 | } |
||
69 | |||
70 | /** |
||
71 | * {@inheritdoc} |
||
72 | */ |
||
73 | public function getEncryptionPublicKey() |
||
76 | } |
||
77 | } |
||
78 |