Passed
Pull Request — master (#58)
by
unknown
01:26
created

HsbcTransaction::getVirtualAccount()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Kingsquare\Banking\Hsbc;
4
5
use Kingsquare\Banking\Transaction;
6
7
/**
8
 * HSBC's Transaction class with additional information such as virtual account.
9
 *
10
 * @author  jun ([email protected])
11
 * @license http://opensource.org/licenses/MIT MIT
12
 */
13
class HsbcTransaction extends Transaction
14
{
15
    private $virtualAccount = '';
16
17
    /**
18
     * Overloaded
19
     *
20
     * @return array
21
     */
22
    public function jsonSerialize()
23
    {
24
        $result = parent::jsonSerialize() + get_object_vars($this);
25
        return $result;
26
    }
27
28
    /**
29
     * @param string $var
30
     */
31
    public function setVirtualAccount($var)
32
    {
33
        $this->virtualAccount = (string)$var;
34
    }
35
36
    /**
37
     * @return string
38
     */
39
    public function getVirtualAccount()
40
    {
41
        return $this->virtualAccount;
42
    }
43
44
}
45