Completed
Push — master ( bd4ff0...d83768 )
by Fabian
03:55
created

OpenOrderOrderTypeModel   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 107
Duplicated Lines 100 %

Test Coverage

Coverage 0%

Importance

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

8 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 9 9 1
A getType() 3 3 1
A getPrice() 3 3 1
A getPair() 3 3 1
A getPrice2() 3 3 1
A getOrdertype() 3 3 1
A getLeverage() 3 3 1
A getOrder() 3 3 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
/**
3
 * @author fabian.hanisch
4
 * @since  2017-07-19
5
 */
6
7
namespace HanischIt\KrakenApi\Model\OpenOrders;
8
9 View Code Duplication
class OpenOrderOrderTypeModel
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
10
{
11
    /**
12
     * @var string
13
     */
14
    private $leverage;
15
    /**
16
     * @var string
17
     */
18
    private $order;
19
    /**
20
     * @var string
21
     */
22
    private $ordertype;
23
    /**
24
     * @var string
25
     */
26
    private $pair;
27
    /**
28
     * @var float
29
     */
30
    private $price;
31
    /**
32
     * @var float
33
     */
34
    private $price2;
35
    /**
36
     * @var string
37
     */
38
    private $type;
39
40
    /**
41
     * OpenOrderOrderTypeModel constructor.
42
     *
43
     * @param string $leverage
44
     * @param string $order
45
     * @param string $ordertype
46
     * @param string $pair
47
     * @param float  $price
48
     * @param float  $price2
49
     * @param string $type
50
     */
51
    public function __construct($leverage, $order, $ordertype, $pair, $price, $price2, $type)
52
    {
53
        $this->leverage = $leverage;
54
        $this->order = $order;
55
        $this->ordertype = $ordertype;
56
        $this->pair = $pair;
57
        $this->price = $price;
58
        $this->price2 = $price2;
59
        $this->type = $type;
60
    }
61
62
    /**
63
     * @return string
64
     */
65
    public function getLeverage()
66
    {
67
        return $this->leverage;
68
    }
69
70
    /**
71
     * @return string
72
     */
73
    public function getOrder()
74
    {
75
        return $this->order;
76
    }
77
78
    /**
79
     * @return string
80
     */
81
    public function getOrdertype()
82
    {
83
        return $this->ordertype;
84
    }
85
86
    /**
87
     * @return string
88
     */
89
    public function getPair()
90
    {
91
        return $this->pair;
92
    }
93
94
    /**
95
     * @return float
96
     */
97
    public function getPrice()
98
    {
99
        return $this->price;
100
    }
101
102
    /**
103
     * @return float
104
     */
105
    public function getPrice2()
106
    {
107
        return $this->price2;
108
    }
109
110
    /**
111
     * @return string
112
     */
113
    public function getType()
114
    {
115
        return $this->type;
116
    }
117
}
118