Completed
Push — master ( 6b5891...0f134b )
by Fabian
02:02
created

AccountBalanceModel   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 37
ccs 8
cts 8
cp 1
rs 10
c 1
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getAssetName() 0 3 1
A getBalance() 0 3 1
1
<?php
2
/**
3
 * @author fabian.hanisch
4
 * @since  2017-07-18
5
 */
6
7
namespace HanischIt\KrakenApi\Model\AccountBalance;
8
9
/**
10
 * Class AccountBalanceModel
11
 *
12
 * @package HanischIt\KrakenApi\Model\AccountBalance
13
 */
14
class AccountBalanceModel
15
{
16
    /**
17
     * @var float
18
     */
19
    private $assetName;
20
    /**
21
     * @var float
22
     */
23
    private $balance;
24
25
    /**
26
     * AccountBalanceModel constructor.
27
     *
28
     * @param string $assetName
29
     * @param float $balance
30
     */
31 2
    public function __construct($assetName, $balance)
32
    {
33 2
        $this->assetName = $assetName;
0 ignored issues
show
Documentation Bug introduced by
The property $assetName was declared of type double, but $assetName is of type string. Maybe add a type cast?

This check looks for assignments to scalar types that may be of the wrong type.

To ensure the code behaves as expected, it may be a good idea to add an explicit type cast.

$answer = 42;

$correct = false;

$correct = (bool) $answer;
Loading history...
34 2
        $this->balance = $balance;
35 2
    }
36
37
    /**
38
     * @return string
39
     */
40 2
    public function getAssetName()
41
    {
42 2
        return $this->assetName;
43
    }
44
45
    /**
46
     * @return float
47
     */
48 2
    public function getBalance()
49
    {
50 2
        return $this->balance;
51
    }
52
}
53