PerformancesResponse::getCount()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace App\Model;
4
5
use JMS\Serializer\Annotation\Accessor;
6
use JMS\Serializer\Annotation\ExclusionPolicy;
7
use JMS\Serializer\Annotation\Expose;
8
use JMS\Serializer\Annotation\Type;
9
10
/**
11
 * Class PerformancesResponse
12
 * @package App\Model
13
 * @ExclusionPolicy("all")
14
 */
15
class PerformancesResponse extends AbstractPaginatedModel
16
{
17
    /**
18
     * @var Array[]
19
     * @Type("array")
20
     * @Expose
21
     */
22
    protected $performances;
23
24
    /**
25
     * @var int
26
     *
27
     * @Type("integer")
28
     * @Accessor(getter="getCount")
29
     * @Expose
30
     */
31
    protected $count;
32
33
    /**
34
     * @return mixed
35
     */
36 2
    public function getPerformances()
37
    {
38 2
        return $this->performances;
39
    }
40
41
    /**
42
     * @param  mixed $performances
43
     * @return $this
44
     */
45 2
    public function setPerformances($performances)
46
    {
47 2
        $this->performances = $performances;
48
49 2
        return $this;
50
    }
51
52
    /**
53
     * @return int
54
     */
55 2
    public function getCount()
56
    {
57 2
        return count($this->getPerformances());
58
    }
59
}
60