ReferenceClicks   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
eloc 8
dl 0
loc 47
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getReference() 0 3 1
A setReference() 0 3 1
A addClick() 0 3 1
A setClicks() 0 3 1
A getClicks() 0 3 1
1
<?php
2
3
/*
4
 * This file is part of the MsalsasVotingBundle package.
5
 *
6
 * (c) Manolo Salsas
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 Msalsas\VotingBundle\Entity;
13
14
15
class ReferenceClicks
16
{
17
    /**
18
     * @var integer
19
     */
20
    protected $reference;
21
22
    /**
23
     * @var integer
24
     */
25
    protected $clicks = 0;
26
27
    /**
28
     * @return int
29
     */
30 1
    public function getReference(): int
31
    {
32 1
        return $this->reference;
33
    }
34
35
    /**
36
     * @param int $reference
37
     */
38 3
    public function setReference(int $reference)
39
    {
40 3
        $this->reference = $reference;
41 3
    }
42
43
    /**
44
     * @return int
45
     */
46 3
    public function getClicks(): int
47
    {
48 3
        return $this->clicks;
49
    }
50
51
    /**
52
     * @param int $clicks
53
     */
54 1
    public function setClicks(int $clicks)
55
    {
56 1
        $this->clicks = $clicks;
57 1
    }
58
59 2
    public function addClick()
60
    {
61 2
        $this->clicks++;
62
    }
63
}