Completed
Push — master ( 334f6b...01d482 )
by Adrien
11:34
created

HasColor::getColor()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Application\Traits;
6
7
trait HasColor
8
{
9
    /**
10
     * @var string
11
     *
12
     * @ORM\Column(type="string", length=7, options={"default" = ""}))
13
     */
14
    private $color = '';
15
16
    /**
17
     * Set color
18
     *
19
     * @API\Input(type="Color")
20
     *
21
     * @param string $color
22
     */
23
    public function setColor(string $color): void
24
    {
25
        $this->color = $color;
26
    }
27
28
    /**
29
     * Get color
30
     *
31
     * @API\Field(type="Color")
32
     *
33
     * @return string
34
     */
35
    public function getColor(): string
36
    {
37
        return $this->color;
38
    }
39
}
40