Total Complexity | 5 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | class Team extends AbstractEntity { |
||
21 | |||
22 | const TYPE = 'team'; |
||
23 | |||
24 | protected static $map = [ |
||
25 | 'organization' => Workspace::class |
||
26 | ]; |
||
27 | |||
28 | final public function __toString (): string { |
||
30 | } |
||
31 | |||
32 | /** |
||
33 | * @param User $user |
||
34 | * @return $this |
||
35 | */ |
||
36 | public function addUser (User $user) { |
||
37 | $this->api->post("{$this}/addUser", ['user' => $user->getGid()]); |
||
38 | return $this; |
||
39 | } |
||
40 | |||
41 | public function getUrl (): string { |
||
42 | return "https://app.asana.com/0/{$this->getGid()}/overview"; |
||
43 | } |
||
44 | |||
45 | /** |
||
46 | * @return User[] |
||
47 | */ |
||
48 | public function getUsers () { |
||
49 | return $this->loadAll(User::class, "{$this}/users"); |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * @param User $user |
||
54 | * @return $this |
||
55 | */ |
||
56 | public function removeUser (User $user) { |
||
59 | } |
||
60 | } |