OrderedItem::getEan()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 4
Ratio 100 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 4
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
4
namespace Stockbase\Integration\Model;
5
6
use Magento\Framework\Model\AbstractModel;
7
8
/**
9
 * Class OrderedItem
10
 */
11 View Code Duplication
class OrderedItem extends AbstractModel
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...
12
{
13
    /**
14
     * @return mixed
15
     */
16 1
    public function getOrderId()
17
    {
18 1
        return $this->getData('order_id');
19
    }
20
21
    /**
22
     * @param string $orderId
23
     */
24 1
    public function setOrderId($orderId)
25
    {
26 1
        $this->setData('order_id', $orderId);
27 1
    }
28
29
    /**
30
     * @return mixed
31
     */
32 1
    public function getOrderItemId()
33
    {
34 1
        return $this->getData('order_item_id');
35
    }
36
37
    /**
38
     * @param string $orderItemId
39
     */
40 1
    public function setOrderItemId($orderItemId)
41
    {
42 1
        $this->setData('order_item_id', $orderItemId);
43 1
    }
44
45
    /**
46
     * @return mixed
47
     */
48 1
    public function getProductId()
49
    {
50 1
        return $this->getData('product_id');
51
    }
52
53
    /**
54
     * @param string $productId
55
     */
56 1
    public function setProductId($productId)
57
    {
58 1
        $this->setData('product_id', $productId);
59 1
    }
60
61
    /**
62
     * @return mixed
63
     */
64 1
    public function getEan()
65
    {
66 1
        return $this->getData('ean');
67
    }
68
69
    /**
70
     * @param string $ean
71
     */
72 1
    public function setEan($ean)
73
    {
74 1
        $this->setData('ean', $ean);
75 1
    }
76
77
    /**
78
     * @return mixed
79
     */
80 1
    public function getAmount()
81
    {
82 1
        return $this->getData('amount');
83
    }
84
85
    /**
86
     * @param string $amount
87
     */
88 1
    public function setAmount($amount)
89
    {
90 1
        $this->setData('amount', $amount);
91 1
    }
92
93
    /**
94
     * @return mixed
95
     */
96 1
    public function getStockbaseGuid()
97
    {
98 1
        return $this->getData('stockbase_guid');
99
    }
100
101
    /**
102
     * @param string $stockbaseGuid
103
     */
104 1
    public function setStockbaseGuid($stockbaseGuid)
105
    {
106 1
        $this->setData('stockbase_guid', $stockbaseGuid);
107 1
    }
108
109
    /**
110
     * @return mixed
111
     */
112 1
    public function getCreatedAt()
113
    {
114 1
        return $this->getData('created_at');
115
    }
116
117
    /**
118
     * @param string $createdAt
119
     */
120 1
    public function setCreatedAt($createdAt)
121
    {
122 1
        $this->setData('created_at', $createdAt);
123 1
    }
124
125 7
    protected function _construct()
126
    {
127 7
        $this->_init(ResourceModel\OrderedItem::class);
128 7
    }
129
}
130