CafebazaarPurchase::getTime()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
namespace Nikandlv\LaravelCafebazaar;
3
4
class CafebazaarPurchase {
5
6
    public $data;
7
    
8
    public function __construct($data) {
9
        $this->data = $data;
10
    }
11
12
    public function getConsumptionState() {
13
        return $this->data->consumptionState;
14
    }
15
16
    public function getPurchaseState() {
17
        return $this->data->purchaseState;
18
    }
19
20
    public function getKind() {
21
        return $this->data->kind;
22
    }
23
24
    public function getPayload() {
25
        return $this->data->developerPayload;
26
    }
27
28
    public function getTime() {
29
        return $this->data->purchaseTime;
30
    }
31
32
    public function isValid() {
33
        return $this->getPurchaseState() === 0;
34
    }
35
36
}