EmployeesResponse   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

3 Methods

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