ReferenceClicks::setClicks()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 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
}