@@ -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,7 +123,7 @@ 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 | |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | * @param array $filter |
| 132 | 132 | * @return Project[] |
| 133 | 133 | */ |
| 134 | - public function getProjects (array $filter = []) { |
|
| 134 | + public function getProjects(array $filter = []) { |
|
| 135 | 135 | $filter['workspace'] = $this->getGid(); |
| 136 | 136 | return $this->loadAll(Project::class, 'projects', $filter); |
| 137 | 137 | } |
@@ -139,14 +139,14 @@ discard block |
||
| 139 | 139 | /** |
| 140 | 140 | * @return Tag[] |
| 141 | 141 | */ |
| 142 | - public function getTags () { |
|
| 142 | + public function getTags() { |
|
| 143 | 143 | return $this->loadAll(Tag::class, 'tags', ['workspace' => $this->getGid()]); |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | /** |
| 147 | 147 | * @return Team[] |
| 148 | 148 | */ |
| 149 | - public function getTeams () { |
|
| 149 | + public function getTeams() { |
|
| 150 | 150 | return $this->loadAll(Team::class, "organizations/{$this->getGid()}/teams"); |
| 151 | 151 | } |
| 152 | 152 | |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | * @param string $email |
| 155 | 155 | * @return null|User |
| 156 | 156 | */ |
| 157 | - public function getUserByEmail (string $email) { |
|
| 157 | + public function getUserByEmail(string $email) { |
|
| 158 | 158 | return $this->api->getCache()->get($email, $this, function() use ($email) { |
| 159 | 159 | foreach ($this->getUsers() as $user) { |
| 160 | 160 | if ($user->getEmail() === $email) { |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | /** |
| 169 | 169 | * @return User[] |
| 170 | 170 | */ |
| 171 | - public function getUsers () { |
|
| 171 | + public function getUsers() { |
|
| 172 | 172 | return $this->loadAll(User::class, "{$this}/users"); |
| 173 | 173 | } |
| 174 | 174 | |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | * |
| 178 | 178 | * @return ProjectWebhook[]|TaskWebhook[] |
| 179 | 179 | */ |
| 180 | - public function getWebhooks () { |
|
| 180 | + public function getWebhooks() { |
|
| 181 | 181 | $all = $this->api->get('webhooks', ['workspace' => $this->getGid()], ['expand' => 'this']); |
| 182 | 182 | return array_map(function(array $each) { |
| 183 | 183 | return $this->api->getCache()->get($each['gid'], $this, function() use ($each) { |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | /** |
| 194 | 194 | * @return bool |
| 195 | 195 | */ |
| 196 | - public function isOrganization (): bool { |
|
| 196 | + public function isOrganization(): bool { |
|
| 197 | 197 | return $this->_is('is_organization'); |
| 198 | 198 | } |
| 199 | 199 | |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | * |
| 203 | 203 | * @return CustomField |
| 204 | 204 | */ |
| 205 | - public function newCustomField () { |
|
| 205 | + public function newCustomField() { |
|
| 206 | 206 | /** @var CustomField $field */ |
| 207 | 207 | $field = $this->factory(CustomField::class); |
| 208 | 208 | return $field->setWorkspace($this); |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | * |
| 214 | 214 | * @return Portfolio |
| 215 | 215 | */ |
| 216 | - public function newPortfolio () { |
|
| 216 | + public function newPortfolio() { |
|
| 217 | 217 | /** @var Portfolio $portfolio */ |
| 218 | 218 | $portfolio = $this->factory(Portfolio::class); |
| 219 | 219 | return $portfolio->setWorkspace($this); |
@@ -224,7 +224,7 @@ discard block |
||
| 224 | 224 | * |
| 225 | 225 | * @return Project |
| 226 | 226 | */ |
| 227 | - public function newProject () { |
|
| 227 | + public function newProject() { |
|
| 228 | 228 | /** @var Project $project */ |
| 229 | 229 | $project = $this->factory(Project::class); |
| 230 | 230 | return $project->setWorkspace($this); |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | * |
| 236 | 236 | * @return Tag |
| 237 | 237 | */ |
| 238 | - public function newTag () { |
|
| 238 | + public function newTag() { |
|
| 239 | 239 | /** @var Tag $tag */ |
| 240 | 240 | $tag = $this->factory(Tag::class); |
| 241 | 241 | return $tag->setWorkspace($this); |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | * |
| 247 | 247 | * @return Task |
| 248 | 248 | */ |
| 249 | - public function newTask () { |
|
| 249 | + public function newTask() { |
|
| 250 | 250 | /** @var Task $task */ |
| 251 | 251 | $task = $this->factory(Task::class); |
| 252 | 252 | return $task->setWorkspace($this); |