Featuretoggle   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 64
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 64
wmc 7
lcom 0
cbo 0
rs 10

7 Methods

Rating   Name   Duplication   Size   Complexity  
A _construct() 0 4 1
A setName() 0 5 1
A getName() 0 4 1
A getFeaturetoggleId() 0 4 1
A setFeaturetoggleId() 0 5 1
A setStatus() 0 5 1
A getStatus() 0 4 1
1
<?php
2
3
namespace Jcowie\FeatureToggle\Model\Data;
4
5
use Magento\Framework\Model\AbstractModel;
6
use Magento\Framework\Api\ExtensibleDataInterface;
7
8
use Jcowie\FeatureToggle\Api\Data\FeaturetoggleInterface;
9
use Jcowie\FeatureToggle\Model\Resource\Featuretoggle as FeaturetoggleResource;
10
11
class Featuretoggle extends AbstractModel implements FeaturetoggleInterface, ExtensibleDataInterface
12
{
13
    protected function _construct()
14
    {
15
        $this->_init(FeaturetoggleResource::class);
16
    }
17
    /**
18
     * Set with the name value
19
     *
20
     * @param $name string
21
     *
22
     * @return $this
23
     */
24
    public function setName($name)
25
    {
26
        $this->setData('name', $name);
27
        return $this;
28
    }
29
    /**
30
     * Returns with the name value
31
     *
32
     * @return string
33
     */
34
    public function getName()
35
    {
36
        return $this->getData('name');
37
    }
38
    /**
39
     * Return with the id of the warehouse
40
     *
41
     * @api
42
     *
43
     * @return int
44
     */
45
    public function getFeaturetoggleId()
46
    {
47
        return $this->getData('featuretoggle_id');
48
    }
49
    /**
50
     * Set the id of the warehouse
51
     *
52
     * @api
53
     *
54
     * @param $warehouseId int
55
     *
56
     * @return $this
57
     */
58
    public function setFeaturetoggleId($featuretoggleId)
59
    {
60
        $this->setData('featuretoggle_id', $featuretoggleId);
61
        return $this;
62
    }
63
64
    public function setStatus($status)
65
    {
66
        $this->setData('setatus', $status);
67
        return $this;
68
    }
69
70
    public function getStatus()
71
    {
72
        return $this->getData('status');
73
    }
74
}
75