PerformanceEventsResponse   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 46
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0
wmc 3
lcom 1
cbo 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getPerformanceEvents() 0 4 1
A setPerformanceEvents() 0 6 1
A getCount() 0 4 1
1
<?php
2
3
namespace App\Model;
4
5
use App\Entity\Performance;
6
use JMS\Serializer\Annotation\Accessor;
7
use JMS\Serializer\Annotation\ExclusionPolicy;
8
use JMS\Serializer\Annotation\Expose;
9
use JMS\Serializer\Annotation\Type;
10
11
/**
12
 * Class PerformanceEventsResponse
13
 * @package App\Model
14
 * @ExclusionPolicy("all")
15
 */
16
class PerformanceEventsResponse
17
{
18
    /**
19
     * @var Performance[]
20
     *
21
     * @Type("array<App\Entity\PerformanceEvent>")
22
     * @Expose
23
     */
24
    protected $performanceEvents;
25
26
    /**
27
     * @var int
28
     *
29
     * @Type("integer")
30
     * @Accessor(getter="getCount")
31
     * @Expose
32
     */
33
    protected $count;
34
35
    /**
36
     * @return Performance[]
37
     */
38 2
    public function getPerformanceEvents()
39
    {
40 2
        return $this->performanceEvents;
41
    }
42
43
    /**
44
     * @param  mixed $performanceEvents
45
     * @return $this
46
     */
47 2
    public function setPerformanceEvents($performanceEvents)
48
    {
49 2
        $this->performanceEvents = $performanceEvents;
50
51 2
        return $this;
52
    }
53
54
    /**
55
     * @return int
56
     */
57 2
    public function getCount()
58
    {
59 2
        return count($this->getPerformanceEvents());
60
    }
61
}
62