Album   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 102
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 77.78%

Importance

Changes 0
Metric Value
wmc 6
lcom 0
cbo 1
dl 0
loc 102
ccs 7
cts 9
cp 0.7778
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getId() 0 4 1
A setName() 0 6 1
A getName() 0 4 1
A setCover() 0 7 1
A getCover() 0 6 1
A getSlug() 0 4 1
1
<?php
2
/**
3
 * @author: Pyrex-Fwi
4
 */
5
namespace AudioCoreEntity\Entity;
6
7
use Doctrine\ORM\Mapping as ORM;
8
use Gedmo\Mapping\Annotation as Gedmo;
9
use Gedmo\Timestampable\Traits\TimestampableEntity;
10
11
/**
12
 * Album
13
 *
14
 * @ORM\Table()
15
 * @ORM\Entity
16
 */
17
class Album
18
{
19
    use TimestampableEntity;
20
21
    /**
22
     * @var integer
23
     *
24
     * @ORM\Column(name="id", type="integer")
25
     * @ORM\Id
26
     * @ORM\GeneratedValue(strategy="AUTO")
27
     */
28
    private $id;
29
30
    /**
31
     * @var string
32
     *
33
     * @ORM\Column(name="name", type="string", length=255)
34
     */
35
    private $name;
36
37
    /**
38
     * @todo set url instead blob data
39
     * @var string
40
     *
41
     * @ORM\Column(name="cover", type="blob")
42
     */
43
    private $cover;
44
45
    /**
46
     * @var string
47
     * @Gedmo\Slug(fields={"name"}, unique=true)
48
     * @ORM\Column(type="string", length=128, unique=true)
49
     */
50
    protected $slug;
51
52
    /**
53
     * Get id
54
     *
55
     * @return integer 
56
     */
57 1
    public function getId()
58
    {
59 1
        return $this->id;
60
    }
61
62
    /**
63
     * Set name
64
     *
65
     * @param string $name
66
     * @return Album
67
     */
68 1
    public function setName($name)
69
    {
70 1
        $this->name = $name;
71
72 1
        return $this;
73
    }
74
75
    /**
76
     * Get name
77
     *
78
     * @return string 
79
     */
80 1
    public function getName()
81
    {
82 1
        return $this->name;
83
    }
84
85
    /**
86
     * Set cover
87
     *
88
     * @param string $cover
89
     * @return Album
90
     */
91
    public function setCover($cover)
92
    {
93
        // @codeCoverageIgnoreStart
94
        $this->cover = $cover;
95
        return $this;
96
        // @codeCoverageIgnoreEnd
97
    }
98
99
    /**
100
     * Get cover
101
     *
102
     * @return string 
103
     */
104
    public function getCover()
105
    {
106
        // @codeCoverageIgnoreStart
107
        return $this->cover;
108
        // @codeCoverageIgnoreEnd
109
    }
110
111
    /**
112
     * @return string
113
     */
114
    public function getSlug()
115
    {
116
        return $this->slug;
117
    }
118
}
119