Passed
Push — main ( ac53a4...aee26d )
by Pouya
06:40 queued 03:43
created

Rate::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 8
c 1
b 0
f 0
nc 2
nop 2
dl 0
loc 9
rs 10
1
<?php
2
3
4
namespace Appino\Blockchain\Objects;
5
6
7
class Rate{
8
9
    public $currency;
10
    public $m15;
11
    public $last;
12
    public $buy;
13
    public $sell;
14
15
    public function __construct($currency, $params){
16
        if(is_null($params))
17
            return;
18
        $this->currency = $currency;
19
        $this->m15 = data_get($params,'15m');
20
        $this->last = data_get($params,'last');
21
        $this->buy = data_get($params,'buy');
22
        $this->sell = data_get($params,'sell');
23
        $this->symbol = data_get($params,'symbol');
0 ignored issues
show
Bug Best Practice introduced by
The property symbol does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
24
    }
25
26
}
27