Feature::getType()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Entity\Project;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * @ORM\Entity(repositoryClass="App\Repository\Project\FeatureRepository")
9
 * @ORM\Table(name="project__features")
10
 * @ORM\HasLifecycleCallbacks()
11
 */
12
class Feature extends Job
13
{
14
    /**
15
     * @ORM\Column(type="string", length=15)
16
     */
17
    protected $featureType;
18
    /**
19
     * @ORM\Column(type="integer", nullable=true)
20
     */
21
    protected $productOwnerValue;
22
    /**
23
     * @ORM\Column(type="integer", nullable=true)
24
     */
25
    protected $userValue;
26
27
    const FEATURE_TYPE_PRODUCT_OWNER = 'product-owner';
28
    const FEATURE_TYPE_USER = 'user';
29
30
    const STATUS_TO_SPECIFY = 0;
31
    const STATUS_TO_VALORIZE = 1;
32
    const STATUS_READY = 2;
33
    const STATUS_TO_DO = 3;
34
    const STATUS_IN_PROGRESS = 4;
35
    const STATUS_TO_VALIDATE = 5;
36
    const STATUS_TO_DEPLOY = 6;
37
38
    public function getType(): string
39
    {
40
        return self::TYPE_FEATURE;
41
    }
42
43
    public function setFeatureType(string $featureType): Feature
44
    {
45
        $this->featureType = $featureType;
46
47
        return $this;
48
    }
49
50
    public function getFeatureType(): string
51
    {
52
        return $this->featureType;
53
    }
54
55
    public function setProductOwnerValue(int $productOwnerValue): Feature
56
    {
57
        $this->productOwnerValue = $productOwnerValue;
58
59
        return $this;
60
    }
61
62
    public function getProductOwnerValue(): int
63
    {
64
        return $this->productOwnerValue;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->productOwnerValue could return the type null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
65
    }
66
67
    public function setUserValue(int $userValue): Feature
68
    {
69
        $this->userValue = $userValue;
70
71
        return $this;
72
    }
73
74
    public function getUserValue(): int
75
    {
76
        return $this->userValue;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->userValue could return the type null which is incompatible with the type-hinted return integer. Consider adding an additional type-check to rule them out.
Loading history...
77
    }
78
}
79