Passed
Push — master ( 8aa524...83beaa )
by y
07:25
created
src/Workspace.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      *
41 41
      * @return OrganizationExport
42 42
      */
43
-    public function export () {
43
+    public function export() {
44 44
         /** @var OrganizationExport $export */
45 45
         $export = $this->api->factory($this, OrganizationExport::class);
46 46
         return $export->create($this);
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      * @param int $limit 1-100
65 65
      * @return array|AbstractEntity[]
66 66
      */
67
-    protected function find (string $class, string $text = '*', int $limit = 20) {
67
+    protected function find(string $class, string $text = '*', int $limit = 20) {
68 68
         return $this->api->loadAll($this, $class, "{$this}/typeahead", [
69 69
             'resource_type' => $class::TYPE,
70 70
             'query' => $text,
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      * @param int $limit 1-100
80 80
      * @return CustomField[]
81 81
      */
82
-    public function findCustomFields (string $text = '*', int $limit = 20) {
82
+    public function findCustomFields(string $text = '*', int $limit = 20) {
83 83
         return $this->find(CustomField::class, $text, $limit);
84 84
     }
85 85
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
      * @param int $limit 1-100
91 91
      * @return Portfolio[]
92 92
      */
93
-    public function findPortfolios (string $text = '*', int $limit = 20) {
93
+    public function findPortfolios(string $text = '*', int $limit = 20) {
94 94
         return $this->find(Portfolio::class, $text, $limit);
95 95
     }
96 96
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
      * @param int $limit 1-100
102 102
      * @return Project[]
103 103
      */
104
-    public function findProjects (string $text = '*', int $limit = 20) {
104
+    public function findProjects(string $text = '*', int $limit = 20) {
105 105
         return $this->find(Project::class, $text, $limit);
106 106
     }
107 107
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      * @param int $limit 1-100
116 116
      * @return Tag[]
117 117
      */
118
-    public function findTags (string $text = '*', int $limit = 20) {
118
+    public function findTags(string $text = '*', int $limit = 20) {
119 119
         return $this->find(Tag::class, $text, $limit);
120 120
     }
121 121
 
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      * @param int $limit 1-100
127 127
      * @return Task[]
128 128
      */
129
-    public function findTasks (string $text = '*', int $limit = 20) {
129
+    public function findTasks(string $text = '*', int $limit = 20) {
130 130
         return $this->find(Task::class, $text, $limit);
131 131
     }
132 132
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
      *
138 138
      * @return CustomField[]
139 139
      */
140
-    public function getCustomFields () {
140
+    public function getCustomFields() {
141 141
         return $this->api->loadAll($this, CustomField::class, "{$this}/custom_fields");
142 142
     }
143 143
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      *
149 149
      * @return Portfolio[]
150 150
      */
151
-    public function getPortfolios () {
151
+    public function getPortfolios() {
152 152
         return $this->api->loadAll($this, Portfolio::class, "portfolios", [
153 153
             'workspace' => $this->getGid(),
154 154
             'owner' => $this->api->getMe()->getGid() // the only allowed value, but still required.
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      * @param array $filter
164 164
      * @return Project[]
165 165
      */
166
-    public function getProjects (array $filter = Project::GET_ACTIVE) {
166
+    public function getProjects(array $filter = Project::GET_ACTIVE) {
167 167
         $filter['workspace'] = $this->getGid();
168 168
         return $this->api->loadAll($this, Project::class, 'projects', $filter);
169 169
     }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
      *
179 179
      * @return Tag[]
180 180
      */
181
-    public function getTags () {
181
+    public function getTags() {
182 182
         return $this->api->loadAll($this, Tag::class, 'tags', ['workspace' => $this->getGid()]);
183 183
     }
184 184
 
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
      *
190 190
      * @return Team[]
191 191
      */
192
-    public function getTeams () {
192
+    public function getTeams() {
193 193
         return $this->api->loadAll($this, Team::class, "organizations/{$this->getGid()}/teams");
194 194
     }
195 195
 
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
      * @param string $email
200 200
      * @return null|User
201 201
      */
202
-    public function getUserByEmail (string $email) {
202
+    public function getUserByEmail(string $email) {
203 203
         return $this->api->getPool()->get("users/{$email}", $this, function() use ($email) {
204 204
             return $this->selectUsers(function(User $user) use ($email) {
205 205
                     return $user->getEmail() === $email;
@@ -210,14 +210,14 @@  discard block
 block discarded – undo
210 210
     /**
211 211
      * @return User[]
212 212
      */
213
-    public function getUsers () {
213
+    public function getUsers() {
214 214
         return $this->api->loadAll($this, User::class, "{$this}/users");
215 215
     }
216 216
 
217 217
     /**
218 218
      * @return ProjectWebhook[]|TaskWebhook[]
219 219
      */
220
-    public function getWebhooks () {
220
+    public function getWebhooks() {
221 221
         return array_map(function(array $each) {
222 222
             return $this->api->getPool()->get($each['gid'], $this, function() use ($each) {
223 223
                 return $this->api->factory($this, [
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
     /**
235 235
      * @return bool
236 236
      */
237
-    final public function isOrganization (): bool {
237
+    final public function isOrganization(): bool {
238 238
         return $this->_is('is_organization');
239 239
     }
240 240
 
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
      *
244 244
      * @return CustomField
245 245
      */
246
-    public function newCustomField () {
246
+    public function newCustomField() {
247 247
         /** @var CustomField $field */
248 248
         $field = $this->api->factory($this, CustomField::class);
249 249
         return $field->setWorkspace($this);
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
      *
255 255
      * @return Portfolio
256 256
      */
257
-    public function newPortfolio () {
257
+    public function newPortfolio() {
258 258
         /** @var Portfolio $portfolio */
259 259
         $portfolio = $this->api->factory($this, Portfolio::class);
260 260
         return $portfolio->setWorkspace($this);
@@ -265,7 +265,7 @@  discard block
 block discarded – undo
265 265
      *
266 266
      * @return Project
267 267
      */
268
-    public function newProject () {
268
+    public function newProject() {
269 269
         /** @var Project $project */
270 270
         $project = $this->api->factory($this, Project::class);
271 271
         return $project->setWorkspace($this);
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
      *
277 277
      * @return Tag
278 278
      */
279
-    public function newTag () {
279
+    public function newTag() {
280 280
         /** @var Tag $tag */
281 281
         $tag = $this->api->factory($this, Tag::class);
282 282
         return $tag->setWorkspace($this);
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
      *
288 288
      * @return Task
289 289
      */
290
-    public function newTask () {
290
+    public function newTask() {
291 291
         /** @var Task $task */
292 292
         $task = $this->api->factory($this, Task::class);
293 293
         return $task->setWorkspace($this);
Please login to merge, or discard this patch.