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

HasColor   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 31
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getColor() 0 3 1
A setColor() 0 3 1
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