AvatarModel   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 62
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 62
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getLetters() 0 4 1
A setLetters() 0 6 1
A getColor() 0 4 1
A setColor() 0 6 1
1
<?php
2
3
/*
4
 * This file is part of the zibios/wrike-php-jmsserializer package.
5
 *
6
 * (c) Zbigniew Ślązak
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Zibios\WrikePhpJmsserializer\Model\Common;
13
14
use JMS\Serializer\Annotation as SA;
15
use Zibios\WrikePhpJmsserializer\Model\AbstractModel;
16
use Zibios\WrikePhpJmsserializer\Model\ResourceModelInterface;
17
18
/**
19
 * Avatar Model.
20
 */
21
class AvatarModel extends AbstractModel implements ResourceModelInterface
22
{
23
    /**
24
     * Group letters (2 symbols max), ex. ZS.
25
     *
26
     * @SA\Type("string")
27
     * @SA\SerializedName("letters")
28
     *
29
     * @var string|null
30
     */
31
    protected $letters;
32
33
    /**
34
     * Hex color code, ex. #fe73a1.
35
     *
36
     * @SA\Type("string")
37
     * @SA\SerializedName("color")
38
     *
39
     * @var string|null
40
     */
41
    protected $color;
42
43
    /**
44
     * @return null|string
45
     */
46 1
    public function getLetters()
47
    {
48 1
        return $this->letters;
49
    }
50
51
    /**
52
     * @param null|string $letters
53
     *
54
     * @return $this
55
     */
56 1
    public function setLetters($letters)
57
    {
58 1
        $this->letters = $letters;
59
60 1
        return $this;
61
    }
62
63
    /**
64
     * @return null|string
65
     */
66 1
    public function getColor()
67
    {
68 1
        return $this->color;
69
    }
70
71
    /**
72
     * @param null|string $color
73
     *
74
     * @return $this
75
     */
76 1
    public function setColor($color)
77
    {
78 1
        $this->color = $color;
79
80 1
        return $this;
81
    }
82
}
83