Total Complexity | 7 |
Total Lines | 72 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
14 | class Backend |
||
15 | { |
||
16 | const TYPE_GITLAB = 'gitlab'; |
||
17 | const TYPE_GITHUB = 'github'; |
||
18 | |||
19 | /** |
||
20 | * @MongoDB\Id |
||
21 | * @Groups({"backend_default", "backend_full"}) |
||
22 | */ |
||
23 | protected $id; |
||
24 | |||
25 | /** |
||
26 | * @MongoDB\Field(type="string") |
||
27 | * @Assert\Choice({Backend::TYPE_GITHUB, Backend::TYPE_GITLAB}) |
||
28 | * @Assert\NotBlank |
||
29 | * @Groups({"backend_default", "backend_full", "backend_write"}) |
||
30 | */ |
||
31 | protected $type; |
||
32 | |||
33 | /** |
||
34 | * @MongoDB\Field(type="string") |
||
35 | * @Assert\NotBlank |
||
36 | * @Groups({"backend_default", "backend_full", "backend_write"}) |
||
37 | */ |
||
38 | protected $domain; |
||
39 | |||
40 | /** |
||
41 | * @MongoDB\Field(type="string") |
||
42 | * @Assert\NotBlank |
||
43 | * @Groups({"backend_full", "backend_write"}) |
||
44 | */ |
||
45 | protected $token; |
||
46 | |||
47 | public function getId(): string |
||
50 | } |
||
51 | |||
52 | public function getType(): string |
||
53 | { |
||
54 | return $this->type; |
||
55 | } |
||
56 | |||
57 | public function setType(string $type): self |
||
58 | { |
||
59 | $this->type = $type; |
||
60 | |||
61 | return $this; |
||
62 | } |
||
63 | |||
64 | public function getDomain(): string |
||
65 | { |
||
66 | return $this->domain; |
||
67 | } |
||
68 | |||
69 | public function setDomain(string $domain): self |
||
70 | { |
||
71 | $this->domain = $domain; |
||
72 | |||
73 | return $this; |
||
74 | } |
||
75 | |||
76 | public function getToken(): string |
||
79 | } |
||
80 | |||
81 | public function setToken(string $token): self |
||
82 | { |
||
83 | $this->token = $token; |
||
88 |