Test Failed
Push — master ( 299cbe...c555d0 )
by Maxim
01:58
created

Departament::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
eloc 1
nc 1
nop 1
1
<?php
2
/**
3
 * This file is a part of "Axessors" library.
4
 *
5
 * @author <[email protected]>
6
 * @package NoOne4rever\Axessors
7
 * @license GPL
8
 */
9
10
namespace NoOne4rever\Axessors\Examples;
11
12
use NoOne4rever\Axessors\Axessors;
13
14
/**
15
 * Class Departament.
16
 *
17
 * Stores employees.
18
 *
19
 * @method void addEmployees(Employee $employee) adds an employee to the departament
20
 * @method void removeEmployees(Employee $employee) removes an employee
21
 * @method int countEmployees() returns number of employees
22
 * @method string getName() getter for departament name
23
 * @method Employee[] getEmployees() getter for departament employees
24
 * @method void setName(string $name) setter for name
25
 */
26
class Departament implements Unit
27
{
28
    use Axessors;
29
30
    /** @var string departament name */
31
    private $name; #> +axs string
32
    /** @var Employee[] departament employees */
33
    private $employees = []; #> +axs Array[Employee]
34
35
    public function __construct(string $name)
36
    {
37
        $this->name = $name;
38
    }
39
}