Total Complexity | 7 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class Environment extends AbstractUser |
||
13 | { |
||
14 | /** |
||
15 | * @MongoDB\Field(type="string") |
||
16 | * |
||
17 | * @Groups({"environment_default", "environment_write", "environment_full"}) |
||
18 | * @Assert\NotBlank |
||
19 | */ |
||
20 | protected $name; |
||
21 | |||
22 | /** |
||
23 | * @MongoDB\ReferenceOne(targetDocument="Application", inversedBy="environments") |
||
24 | */ |
||
25 | protected $application; |
||
26 | |||
27 | public function getRoles(): array |
||
28 | { |
||
29 | return [static::ROLE_USER]; |
||
30 | } |
||
31 | |||
32 | public function getUsername(): string |
||
33 | { |
||
34 | return $this->id; |
||
35 | } |
||
36 | |||
37 | public function getPassword() |
||
38 | { |
||
39 | return null; |
||
40 | } |
||
41 | |||
42 | public function getName(): string |
||
43 | { |
||
44 | return $this->name; |
||
45 | } |
||
46 | |||
47 | public function setName(string $name): self |
||
48 | { |
||
49 | $this->name = $name; |
||
50 | |||
51 | return $this; |
||
52 | } |
||
53 | |||
54 | public function getApplication(): Application |
||
57 | } |
||
58 | |||
59 | public function setApplication(Application $application): self |
||
60 | { |
||
61 | $this->application = $application; |
||
64 | } |
||
65 | } |
||
66 |