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

Rate   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 14
c 1
b 0
f 0
dl 0
loc 17
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 2
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