GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

AbstractOrder   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 69
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 8
lcom 1
cbo 1
dl 0
loc 69
ccs 16
cts 16
cp 1
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A getPrice() 0 4 1
A getType() 0 7 2
A getCreatedTimestamp() 0 4 1
A getPrimaryCurrencyCode() 0 4 1
A getSecondaryCurrencyCode() 0 4 1
A getStatus() 0 4 1
A getGuid() 0 4 1
1
<?php
2
3
namespace IndependentReserve\Object;
4
5
use DateTime;
6
7
abstract class AbstractOrder extends AbstractObject
8
{
9
    /**
10
     * Order limit price in secondary currency.
11
     * @return double
12
     */
13 3
    public function getPrice()
14
    {
15 3
        return $this->object->Price;
16
    }
17
18
    /**
19
     * Type of order.
20
     * @see \IndependentReserve\OrderType
21
     * @return string
22
     */
23 4
    public function getType()
24
    {
25 4
        if (isset($this->object->Type)) {
26 2
            return $this->object->Type;
27
        }
28 2
        return $this->object->OrderType;
29
    }
30
31
    /**
32
     * UTC timestamp of when order was created.
33
     * @return DateTime
34
     */
35 7
    public function getCreatedTimestamp()
36
    {
37 7
        return new DateTime($this->object->CreatedTimestampUtc);
38
    }
39
40
    /**
41
     * Primary currency of order.
42
     * @return string
43
     */
44 4
    public function getPrimaryCurrencyCode()
45
    {
46 4
        return $this->object->PrimaryCurrencyCode;
47
    }
48
49
    /**
50
     * Secondary currency of order.
51
     * @return string
52
     */
53 4
    public function getSecondaryCurrencyCode()
54
    {
55 4
        return $this->object->SecondaryCurrencyCode;
56
    }
57
58
    /**
59
     * Order status.
60
     * @return string
61
     */
62 4
    public function getStatus()
63
    {
64 4
        return $this->object->Status;
65
    }
66
67
    /**
68
     * Unique identifier of the order.
69
     * @return string
70
     */
71 4
    public function getGuid()
72
    {
73 4
        return $this->object->OrderGuid;
74
    }
75
}
76