@@ -15,14 +15,14 @@ |
||
15 | 15 | * |
16 | 16 | * @return string |
17 | 17 | */ |
18 | - abstract protected function _getDir (): string; |
|
18 | + abstract protected function _getDir(): string; |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * `POST` |
22 | 22 | * |
23 | 23 | * @return $this |
24 | 24 | */ |
25 | - public function create () { |
|
25 | + public function create() { |
|
26 | 26 | /** @var Api $api */ |
27 | 27 | $api = $this->api; |
28 | 28 | $remote = $api->post($this->_getDir(), $this->_getPatch(), ['expand' => 'this']); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | /** |
14 | 14 | * `DELETE` |
15 | 15 | */ |
16 | - public function delete (): void { |
|
16 | + public function delete(): void { |
|
17 | 17 | /** @var Api $api */ |
18 | 18 | $api = $this->api; |
19 | 19 | $api->delete($this); |
@@ -15,7 +15,7 @@ |
||
15 | 15 | * |
16 | 16 | * @return $this |
17 | 17 | */ |
18 | - public function update () { |
|
18 | + public function update() { |
|
19 | 19 | if ($this->isDiff()) { |
20 | 20 | /** @var Api $api */ |
21 | 21 | $api = $this->api; |
@@ -7,7 +7,7 @@ |
||
7 | 7 | */ |
8 | 8 | class Logger implements LoggerInterface { |
9 | 9 | |
10 | - public function log (string $info, string $path, ?array $payload): void { |
|
10 | + public function log(string $info, string $path, ?array $payload): void { |
|
11 | 11 | // stub |
12 | 12 | } |
13 | 13 | } |
14 | 14 | \ No newline at end of file |
@@ -23,15 +23,15 @@ discard block |
||
23 | 23 | |
24 | 24 | const TYPE = 'section'; |
25 | 25 | |
26 | - final public function __toString (): string { |
|
26 | + final public function __toString(): string { |
|
27 | 27 | return "sections/{$this->getGid()}"; |
28 | 28 | } |
29 | 29 | |
30 | - final protected function _getDir (): string { |
|
30 | + final protected function _getDir(): string { |
|
31 | 31 | return "{$this->getProject()}/sections"; |
32 | 32 | } |
33 | 33 | |
34 | - protected function _getMap (): array { |
|
34 | + protected function _getMap(): array { |
|
35 | 35 | return [ |
36 | 36 | 'projects' => [Project::class] |
37 | 37 | ]; |
@@ -40,14 +40,14 @@ discard block |
||
40 | 40 | /** |
41 | 41 | * @return Project |
42 | 42 | */ |
43 | - public function getProject () { |
|
43 | + public function getProject() { |
|
44 | 44 | return $this->_get('projects')[0]; |
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
48 | 48 | * @return Task[] |
49 | 49 | */ |
50 | - public function getTasks () { |
|
50 | + public function getTasks() { |
|
51 | 51 | return $this->loadAll(Task::class, 'tasks', ['section' => $this->getGid()]); |
52 | 52 | } |
53 | 53 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | * @depends after-create |
58 | 58 | * @return Task |
59 | 59 | */ |
60 | - public function newTask () { |
|
60 | + public function newTask() { |
|
61 | 61 | /** @var Task $task */ |
62 | 62 | $task = $this->factory(Task::class); |
63 | 63 | return $task->addToProject($this); |
@@ -56,15 +56,15 @@ discard block |
||
56 | 56 | const LAYOUT_BOARD = 'board'; |
57 | 57 | const LAYOUT_LIST = 'list'; |
58 | 58 | |
59 | - final public function __toString (): string { |
|
59 | + final public function __toString(): string { |
|
60 | 60 | return "projects/{$this->getGid()}"; |
61 | 61 | } |
62 | 62 | |
63 | - final protected function _getDir (): string { |
|
63 | + final protected function _getDir(): string { |
|
64 | 64 | return 'projects'; |
65 | 65 | } |
66 | 66 | |
67 | - protected function _getMap (): array { |
|
67 | + protected function _getMap(): array { |
|
68 | 68 | return [ |
69 | 69 | 'current_status' => Status::class, |
70 | 70 | 'custom_fields' => [CustomField::class], |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | * @param User $user |
82 | 82 | * @return $this |
83 | 83 | */ |
84 | - public function addMember (User $user) { |
|
84 | + public function addMember(User $user) { |
|
85 | 85 | return $this->addMembers([$user]); |
86 | 86 | } |
87 | 87 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * @param User[] $users |
91 | 91 | * @return $this |
92 | 92 | */ |
93 | - public function addMembers (array $users) { |
|
93 | + public function addMembers(array $users) { |
|
94 | 94 | $this->api->post("{$this}/addMembers", ['members' => static::_getGids($users)]); |
95 | 95 | $this->_merge('members', $users); |
96 | 96 | return $this; |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | * @param string $target |
102 | 102 | * @return ProjectWebhook |
103 | 103 | */ |
104 | - public function addWebhook (string $target) { |
|
104 | + public function addWebhook(string $target) { |
|
105 | 105 | /** @var ProjectWebhook $webhook */ |
106 | 106 | $webhook = $this->factory(ProjectWebhook::class); |
107 | 107 | return $webhook->create($this, $target); |
@@ -126,7 +126,7 @@ discard block |
||
126 | 126 | * @param array $schedule |
127 | 127 | * @return Job |
128 | 128 | */ |
129 | - public function duplicate (string $name, array $include, Team $team = null, array $schedule = []) { |
|
129 | + public function duplicate(string $name, array $include, Team $team = null, array $schedule = []) { |
|
130 | 130 | $data = ['name' => $name]; |
131 | 131 | if ($team) { |
132 | 132 | $data['team'] = $team->getGid(); |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | * @param string $token |
147 | 147 | * @return ProjectEvent[]|TaskEvent[]|StoryEvent[] |
148 | 148 | */ |
149 | - public function getEvents (string &$token) { |
|
149 | + public function getEvents(string &$token) { |
|
150 | 150 | return $this->api->sync($this, $token); |
151 | 151 | } |
152 | 152 | |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | * @depends after-create |
155 | 155 | * @return Section[] |
156 | 156 | */ |
157 | - public function getSections () { |
|
157 | + public function getSections() { |
|
158 | 158 | return $this->loadAll(Section::class, "{$this}/sections"); |
159 | 159 | } |
160 | 160 | |
@@ -162,7 +162,7 @@ discard block |
||
162 | 162 | * @depends after-create |
163 | 163 | * @return Status[] |
164 | 164 | */ |
165 | - public function getStatuses () { |
|
165 | + public function getStatuses() { |
|
166 | 166 | return $this->loadAll(Status::class, "{$this}/project_statuses"); |
167 | 167 | } |
168 | 168 | |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | * @param array $query |
172 | 172 | * @return Task[] |
173 | 173 | */ |
174 | - public function getTasks (array $query = []) { |
|
174 | + public function getTasks(array $query = []) { |
|
175 | 175 | $query['project'] = $this->getGid(); |
176 | 176 | return $this->loadAll(Task::class, "tasks", $query); |
177 | 177 | } |
@@ -180,25 +180,25 @@ discard block |
||
180 | 180 | * @depends after-create |
181 | 181 | * @return string |
182 | 182 | */ |
183 | - public function getUrl (): string { |
|
183 | + public function getUrl(): string { |
|
184 | 184 | return "https://app.asana.com/0/{$this->getGid()}"; |
185 | 185 | } |
186 | 186 | |
187 | 187 | /** |
188 | 188 | * @return ProjectWebhook[] |
189 | 189 | */ |
190 | - public function getWebhooks () { |
|
190 | + public function getWebhooks() { |
|
191 | 191 | return $this->loadAll(ProjectWebhook::class, 'webhooks', [ |
192 | 192 | 'workspace' => $this->getWorkspace()->getGid(), |
193 | 193 | 'resource' => $this->getGid() |
194 | 194 | ]); |
195 | 195 | } |
196 | 196 | |
197 | - public function isBoard (): bool { |
|
197 | + public function isBoard(): bool { |
|
198 | 198 | return $this->getLayout() === self::LAYOUT_BOARD; |
199 | 199 | } |
200 | 200 | |
201 | - public function isList (): bool { |
|
201 | + public function isList(): bool { |
|
202 | 202 | return $this->getLayout() === self::LAYOUT_LIST; |
203 | 203 | } |
204 | 204 | |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | * @depends after-create |
207 | 207 | * @return Section |
208 | 208 | */ |
209 | - public function newSection () { |
|
209 | + public function newSection() { |
|
210 | 210 | return $this->factory(Section::class, ['projects' => [$this]]); |
211 | 211 | } |
212 | 212 | |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | * @depends after-create |
215 | 215 | * @return Status |
216 | 216 | */ |
217 | - public function newStatus () { |
|
217 | + public function newStatus() { |
|
218 | 218 | return $this->factory(Status::class); |
219 | 219 | } |
220 | 220 | |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | * @depends after-create |
225 | 225 | * @return Task |
226 | 226 | */ |
227 | - public function newTask () { |
|
227 | + public function newTask() { |
|
228 | 228 | return $this->getSections()[0]->newTask(); |
229 | 229 | } |
230 | 230 | |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | * @param User $user |
234 | 234 | * @return $this |
235 | 235 | */ |
236 | - public function removeMember (User $user) { |
|
236 | + public function removeMember(User $user) { |
|
237 | 237 | return $this->removeMembers([$user]); |
238 | 238 | } |
239 | 239 | |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | * @param User[] $users |
243 | 243 | * @return $this |
244 | 244 | */ |
245 | - public function removeMembers (array $users) { |
|
245 | + public function removeMembers(array $users) { |
|
246 | 246 | $this->api->post("{$this}/removeMembers", ['members' => static::_getGids($users)]); |
247 | 247 | $this->_remove('members', $users); |
248 | 248 | return $this; |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | * @param null|Team $team |
254 | 254 | * @return $this |
255 | 255 | */ |
256 | - public function setTeam (?Team $team) { |
|
256 | + public function setTeam(?Team $team) { |
|
257 | 257 | assert(!$this->hasGid()); |
258 | 258 | if ($team and !$this->hasWorkspace()) { |
259 | 259 | $this->setWorkspace($team->getOrganization()); |
@@ -49,21 +49,21 @@ |
||
49 | 49 | /** |
50 | 50 | * @return Api |
51 | 51 | */ |
52 | - final public static function getApi () { |
|
52 | + final public static function getApi() { |
|
53 | 53 | return static::getFacadeRoot(); |
54 | 54 | } |
55 | 55 | |
56 | 56 | /** |
57 | 57 | * @return string |
58 | 58 | */ |
59 | - public static function getFacadeAccessor () { |
|
59 | + public static function getFacadeAccessor() { |
|
60 | 60 | return AsanaServiceProvider::NAME; |
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |
64 | 64 | * @return Api |
65 | 65 | */ |
66 | - public static function getFacadeRoot () { |
|
66 | + public static function getFacadeRoot() { |
|
67 | 67 | return parent::getFacadeRoot(); |
68 | 68 | } |
69 | 69 | } |
70 | 70 | \ No newline at end of file |
@@ -23,11 +23,11 @@ discard block |
||
23 | 23 | |
24 | 24 | const TYPE = 'user'; |
25 | 25 | |
26 | - final public function __toString (): string { |
|
26 | + final public function __toString(): string { |
|
27 | 27 | return "users/{$this->getGid()}"; |
28 | 28 | } |
29 | 29 | |
30 | - protected function _getMap (): array { |
|
30 | + protected function _getMap(): array { |
|
31 | 31 | return [ |
32 | 32 | 'photo' => Photo::class, |
33 | 33 | 'workspaces' => [Workspace::class] |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | * @param Workspace $workspace |
39 | 39 | * @return $this |
40 | 40 | */ |
41 | - public function addToWorkspace (Workspace $workspace) { |
|
41 | + public function addToWorkspace(Workspace $workspace) { |
|
42 | 42 | $this->api->post("{$workspace}/addUser", ['user' => $this->getGid()]); |
43 | 43 | $this->_merge('workspaces', [$workspace]); |
44 | 44 | return $this; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | * @param Workspace $workspace |
49 | 49 | * @return Portfolio[] |
50 | 50 | */ |
51 | - public function getFavoritePortfolios (Workspace $workspace) { |
|
51 | + public function getFavoritePortfolios(Workspace $workspace) { |
|
52 | 52 | return $this->getFavorites(Portfolio::class, Portfolio::TYPE, $workspace); |
53 | 53 | } |
54 | 54 | |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | * @param Workspace $workspace |
57 | 57 | * @return Project[] |
58 | 58 | */ |
59 | - public function getFavoriteProjects (Workspace $workspace) { |
|
59 | + public function getFavoriteProjects(Workspace $workspace) { |
|
60 | 60 | return $this->getFavorites(Project::class, Project::TYPE, $workspace); |
61 | 61 | } |
62 | 62 | |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | * @param Workspace $workspace |
65 | 65 | * @return Tag[] |
66 | 66 | */ |
67 | - public function getFavoriteTags (Workspace $workspace) { |
|
67 | + public function getFavoriteTags(Workspace $workspace) { |
|
68 | 68 | return $this->getFavorites(Tag::class, Tag::TYPE, $workspace); |
69 | 69 | } |
70 | 70 | |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | * @param Workspace $workspace |
73 | 73 | * @return Team[] |
74 | 74 | */ |
75 | - public function getFavoriteTeams (Workspace $workspace) { |
|
75 | + public function getFavoriteTeams(Workspace $workspace) { |
|
76 | 76 | return $this->getFavorites(Team::class, Team::TYPE, $workspace); |
77 | 77 | } |
78 | 78 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | * @param Workspace $workspace |
81 | 81 | * @return User[] |
82 | 82 | */ |
83 | - public function getFavoriteUsers (Workspace $workspace) { |
|
83 | + public function getFavoriteUsers(Workspace $workspace) { |
|
84 | 84 | return $this->getFavorites(self::class, self::TYPE, $workspace); |
85 | 85 | } |
86 | 86 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * @param Workspace $workspace |
91 | 91 | * @return array |
92 | 92 | */ |
93 | - protected function getFavorites (string $class, string $resourceType, Workspace $workspace) { |
|
93 | + protected function getFavorites(string $class, string $resourceType, Workspace $workspace) { |
|
94 | 94 | return $this->loadAll($class, "{$this}/favorites", [ |
95 | 95 | 'resource_type' => $resourceType, |
96 | 96 | 'workspace' => $workspace->getGid() |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | * @param Workspace $workspace |
106 | 106 | * @return Task[] |
107 | 107 | */ |
108 | - public function getIncompleteTasks (Workspace $workspace) { |
|
108 | + public function getIncompleteTasks(Workspace $workspace) { |
|
109 | 109 | return $this->loadAll(Task::class, 'tasks', [ |
110 | 110 | 'assignee' => $this->getGid(), |
111 | 111 | 'workspace' => $workspace->getGid(), |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | * @param Workspace $workspace |
118 | 118 | * @return Portfolio[] |
119 | 119 | */ |
120 | - public function getPortfolios (Workspace $workspace) { |
|
120 | + public function getPortfolios(Workspace $workspace) { |
|
121 | 121 | return $this->loadAll(Portfolio::class, "portfolios", [ |
122 | 122 | 'workspace' => $workspace->getGid(), |
123 | 123 | 'owner' => $this->getGid() |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | * @param Workspace $workspace |
129 | 129 | * @return TaskList |
130 | 130 | */ |
131 | - public function getTaskList (Workspace $workspace) { |
|
131 | + public function getTaskList(Workspace $workspace) { |
|
132 | 132 | return $this->load(TaskList::class, "{$this}/user_task_list", [ |
133 | 133 | 'workspace' => $workspace->getGid() |
134 | 134 | ]); |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | * @param string[] $filter |
144 | 144 | * @return Task[] |
145 | 145 | */ |
146 | - public function getTasks (Workspace $workspace, array $filter = []) { |
|
146 | + public function getTasks(Workspace $workspace, array $filter = []) { |
|
147 | 147 | $filter['assignee'] = $this->getGid(); |
148 | 148 | $filter['workspace'] = $workspace->getGid(); |
149 | 149 | return $this->loadAll(Task::class, 'tasks', $filter); |
@@ -153,13 +153,13 @@ discard block |
||
153 | 153 | * @param Workspace $organization |
154 | 154 | * @return Team[] |
155 | 155 | */ |
156 | - public function getTeams (Workspace $organization) { |
|
156 | + public function getTeams(Workspace $organization) { |
|
157 | 157 | return $this->loadAll(Team::class, "{$this}/teams", [ |
158 | 158 | 'organization' => $organization->getGid() |
159 | 159 | ]); |
160 | 160 | } |
161 | 161 | |
162 | - public function getUrl (): string { |
|
162 | + public function getUrl(): string { |
|
163 | 163 | return "https://app.asana.com/0/{$this->getGid()}/list"; |
164 | 164 | } |
165 | 165 | |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | * @param Workspace $workspace |
168 | 168 | * @return $this |
169 | 169 | */ |
170 | - public function removeFromWorkspace (Workspace $workspace) { |
|
170 | + public function removeFromWorkspace(Workspace $workspace) { |
|
171 | 171 | $this->api->post("{$workspace}/removeUser", ['user' => $this->getGid()]); |
172 | 172 | $this->_remove('workspaces', [$workspace]); |
173 | 173 | return $this; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | |
27 | 27 | const TYPE = 'workspace'; |
28 | 28 | |
29 | - final public function __toString (): string { |
|
29 | + final public function __toString(): string { |
|
30 | 30 | return "workspaces/{$this->getGid()}"; |
31 | 31 | } |
32 | 32 | |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | * |
36 | 36 | * @return OrganizationExport |
37 | 37 | */ |
38 | - public function export () { |
|
38 | + public function export() { |
|
39 | 39 | assert($this->isOrganization()); |
40 | 40 | /** @var OrganizationExport $export */ |
41 | 41 | $export = $this->factory(OrganizationExport::class); |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | * @param int $limit 1-100 |
54 | 54 | * @return array|AbstractEntity[] |
55 | 55 | */ |
56 | - protected function find (string $class, string $resourceType, string $text, int $limit = 20) { |
|
56 | + protected function find(string $class, string $resourceType, string $text, int $limit = 20) { |
|
57 | 57 | return $this->loadAll($class, "{$this}/typeahead", [ |
58 | 58 | 'resource_type' => $resourceType, |
59 | 59 | 'query' => $text, |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | * @param int $limit 1-100 |
69 | 69 | * @return CustomField[] |
70 | 70 | */ |
71 | - public function findCustomFields (string $text, int $limit = 20) { |
|
71 | + public function findCustomFields(string $text, int $limit = 20) { |
|
72 | 72 | return $this->find(CustomField::class, CustomField::TYPE, $text, $limit); |
73 | 73 | } |
74 | 74 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | * @param int $limit 1-100 |
80 | 80 | * @return Portfolio[] |
81 | 81 | */ |
82 | - public function findPortfolios (string $text, int $limit = 20) { |
|
82 | + public function findPortfolios(string $text, int $limit = 20) { |
|
83 | 83 | return $this->find(Portfolio::class, Portfolio::TYPE, $text, $limit); |
84 | 84 | } |
85 | 85 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | * @param int $limit 1-100 |
91 | 91 | * @return Project[] |
92 | 92 | */ |
93 | - public function findProjects (string $text, int $limit = 20) { |
|
93 | + public function findProjects(string $text, int $limit = 20) { |
|
94 | 94 | return $this->find(Project::class, Project::TYPE, $text, $limit); |
95 | 95 | } |
96 | 96 | |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | * @param int $limit 1-100 |
102 | 102 | * @return Tag[] |
103 | 103 | */ |
104 | - public function findTags (string $text, int $limit = 20) { |
|
104 | + public function findTags(string $text, int $limit = 20) { |
|
105 | 105 | return $this->find(Tag::class, Tag::TYPE, $text, $limit); |
106 | 106 | } |
107 | 107 | |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | * @param int $limit 1-100 |
113 | 113 | * @return Task[] |
114 | 114 | */ |
115 | - public function findTasks (string $text, int $limit = 20) { |
|
115 | + public function findTasks(string $text, int $limit = 20) { |
|
116 | 116 | return $this->find(Task::class, Task::TYPE, $text, $limit); |
117 | 117 | } |
118 | 118 | |
@@ -123,28 +123,28 @@ discard block |
||
123 | 123 | * @param int $limit 1-100 |
124 | 124 | * @return User[] |
125 | 125 | */ |
126 | - public function findUsers (string $text, int $limit = 20) { |
|
126 | + public function findUsers(string $text, int $limit = 20) { |
|
127 | 127 | return $this->find(User::class, User::TYPE, $text, $limit); |
128 | 128 | } |
129 | 129 | |
130 | 130 | /** |
131 | 131 | * @return Project[] |
132 | 132 | */ |
133 | - public function getProjects () { |
|
133 | + public function getProjects() { |
|
134 | 134 | return $this->loadAll(Project::class, 'projects', ['workspace' => $this->getGid()]); |
135 | 135 | } |
136 | 136 | |
137 | 137 | /** |
138 | 138 | * @return Tag[] |
139 | 139 | */ |
140 | - public function getTags () { |
|
140 | + public function getTags() { |
|
141 | 141 | return $this->loadAll(Tag::class, 'tags', ['workspace' => $this->getGid()]); |
142 | 142 | } |
143 | 143 | |
144 | 144 | /** |
145 | 145 | * @return Team[] |
146 | 146 | */ |
147 | - public function getTeams () { |
|
147 | + public function getTeams() { |
|
148 | 148 | return $this->loadAll(Team::class, "organizations/{$this->getGid()}/teams"); |
149 | 149 | } |
150 | 150 | |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | * @param string $email |
153 | 153 | * @return null|User |
154 | 154 | */ |
155 | - public function getUserByEmail (string $email) { |
|
155 | + public function getUserByEmail(string $email) { |
|
156 | 156 | return $this->api->getCache()->get($email, $this, function() use ($email) { |
157 | 157 | foreach ($this->getUsers() as $user) { |
158 | 158 | if ($user->getEmail() === $email) { |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | /** |
167 | 167 | * @return User[] |
168 | 168 | */ |
169 | - public function getUsers () { |
|
169 | + public function getUsers() { |
|
170 | 170 | return $this->loadAll(User::class, "{$this}/users"); |
171 | 171 | } |
172 | 172 | |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | * |
176 | 176 | * @return ProjectWebhook[]|TaskWebhook[] |
177 | 177 | */ |
178 | - public function getWebhooks () { |
|
178 | + public function getWebhooks() { |
|
179 | 179 | $all = $this->api->get('webhooks', ['workspace' => $this->getGid()], ['expand' => 'this']); |
180 | 180 | return array_map(function(array $each) { |
181 | 181 | return $this->api->getCache()->get($each['gid'], $this, function() use ($each) { |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | /** |
192 | 192 | * @return bool |
193 | 193 | */ |
194 | - public function isOrganization (): bool { |
|
194 | + public function isOrganization(): bool { |
|
195 | 195 | return $this->_is('is_organization'); |
196 | 196 | } |
197 | 197 | |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | * |
201 | 201 | * @return CustomField |
202 | 202 | */ |
203 | - public function newCustomField () { |
|
203 | + public function newCustomField() { |
|
204 | 204 | /** @var CustomField $field */ |
205 | 205 | $field = $this->factory(CustomField::class); |
206 | 206 | return $field->setWorkspace($this); |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | * |
212 | 212 | * @return Portfolio |
213 | 213 | */ |
214 | - public function newPortfolio () { |
|
214 | + public function newPortfolio() { |
|
215 | 215 | /** @var Portfolio $portfolio */ |
216 | 216 | $portfolio = $this->factory(Portfolio::class); |
217 | 217 | return $portfolio->setWorkspace($this); |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | * |
223 | 223 | * @return Project |
224 | 224 | */ |
225 | - public function newProject () { |
|
225 | + public function newProject() { |
|
226 | 226 | /** @var Project $project */ |
227 | 227 | $project = $this->factory(Project::class); |
228 | 228 | return $project->setWorkspace($this); |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | * |
234 | 234 | * @return Tag |
235 | 235 | */ |
236 | - public function newTag () { |
|
236 | + public function newTag() { |
|
237 | 237 | /** @var Tag $tag */ |
238 | 238 | $tag = $this->factory(Tag::class); |
239 | 239 | return $tag->setWorkspace($this); |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | * |
245 | 245 | * @return Task |
246 | 246 | */ |
247 | - public function newTask () { |
|
247 | + public function newTask() { |
|
248 | 248 | /** @var Task $task */ |
249 | 249 | $task = $this->factory(Task::class); |
250 | 250 | return $task->setWorkspace($this); |