Completed
Push — develop ( 80a9dd...ce1a1e )
by Serhii
24s queued 10s
created

EmployeesResponse::getEmployees()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
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
    public $employees;
24
25
    /**
26
     * @Type("integer")
27
     * @Accessor(getter="getCount")
28
     * @Expose
29
     */
30
    public int $count;
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected T_STRING, expecting T_FUNCTION or T_CONST
Loading history...
31
32
    /**
33
     * @Type("integer")
34
     * @Expose
35
     */
36
    public int $currentPage;
37
38
    /**
39
     * @Type("integer")
40
     * @Expose
41
     */
42
    public int $overAllCount;
43
44
    public function getCount(): int
45
    {
46
        return count($this->employees);
47
    }
48
}
49