Passed
Push — master ( 1a00b5...984447 )
by y
03:02
created
src/Task/Attachment.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
         'parent' => Task::class
33 33
     ];
34 34
 
35
-    final public function __toString (): string {
35
+    final public function __toString(): string {
36 36
         return "attachments/{$this->getGid()}";
37 37
     }
38 38
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      * @param string $file
43 43
      * @return $this
44 44
      */
45
-    public function upload (string $file) {
45
+    public function upload(string $file) {
46 46
         // api returns compact version. reload.
47 47
         $remote = $this->api->upload("{$this->getParent()}/attachments", $file);
48 48
         $this->data['gid'] = $remote['gid'];
Please login to merge, or discard this patch.
src/Task.php 1 patch
Spacing   +41 added lines, -41 removed lines patch added patch discarded remove patch
@@ -95,14 +95,14 @@  discard block
 block discarded – undo
95 95
         'memberships' => 'memberships.(project|section)'
96 96
     ];
97 97
 
98
-    final public function __toString (): string {
98
+    final public function __toString(): string {
99 99
         return "tasks/{$this->getGid()}";
100 100
     }
101 101
 
102 102
     /**
103 103
      * Clears the diffs for `custom_fields` and `external` sub-objects after saving.
104 104
      */
105
-    protected function _clearSubDiffs (): void {
105
+    protected function _clearSubDiffs(): void {
106 106
         // use isset() to avoid has() fetch.
107 107
         if (isset($this->data['custom_fields'])) {
108 108
             $this->getCustomFields()->diff = [];
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         }
113 113
     }
114 114
 
115
-    final protected function _getDir (): string {
115
+    final protected function _getDir(): string {
116 116
         return 'tasks';
117 117
     }
118 118
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      * @param string $file
124 124
      * @return Attachment
125 125
      */
126
-    public function addAttachment (string $file) {
126
+    public function addAttachment(string $file) {
127 127
         /** @var Attachment $attachment */
128 128
         $attachment = $this->factory(Attachment::class, ['parent' => $this]);
129 129
         return $attachment->upload($file);
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
      * @param string $text
136 136
      * @return Story
137 137
      */
138
-    public function addComment (string $text) {
138
+    public function addComment(string $text) {
139 139
         return $this->newComment()->setText($text)->create();
140 140
     }
141 141
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
      * @param Task[] $tasks
147 147
      * @return $this
148 148
      */
149
-    public function addDependencies (array $tasks) {
149
+    public function addDependencies(array $tasks) {
150 150
         $this->api->post("{$this}/addDependencies", ['dependents' => static::_getGids($tasks)]);
151 151
         return $this;
152 152
     }
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
      * @param Task $task
159 159
      * @return $this
160 160
      */
161
-    public function addDependency (Task $task) {
161
+    public function addDependency(Task $task) {
162 162
         return $this->addDependencies([$task]);
163 163
     }
164 164
 
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
      * @param Task $task
170 170
      * @return $this
171 171
      */
172
-    public function addDependent (Task $task) {
172
+    public function addDependent(Task $task) {
173 173
         return $this->addDependents([$task]);
174 174
     }
175 175
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
      * @param Task[] $tasks
181 181
      * @return $this
182 182
      */
183
-    public function addDependents (array $tasks) {
183
+    public function addDependents(array $tasks) {
184 184
         $this->api->post("{$this}/addDependents", ['dependents' => static::_getGids($tasks)]);
185 185
         return $this;
186 186
     }
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      * @param User $user
192 192
      * @return $this
193 193
      */
194
-    public function addFollower (User $user) {
194
+    public function addFollower(User $user) {
195 195
         return $this->addFollowers([$user]);
196 196
     }
197 197
 
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
      * @param User[] $users
202 202
      * @return $this
203 203
      */
204
-    public function addFollowers (array $users) {
204
+    public function addFollowers(array $users) {
205 205
         if ($this->hasGid()) {
206 206
             $this->api->post("{$this}/addFollowers", ['followers' => static::_getGids($users)]);
207 207
             $this->_merge('followers', $users);
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
      * @param Tag $tag
219 219
      * @return $this
220 220
      */
221
-    public function addTag (Tag $tag) {
221
+    public function addTag(Tag $tag) {
222 222
         if ($this->hasGid()) {
223 223
             $this->api->post("{$this}/addTag", ['tag' => $tag->getGid()]);
224 224
             $this->_merge('tags', [$tag]);
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
      * @param Section $section
236 236
      * @return $this
237 237
      */
238
-    public function addToProject (Section $section) {
238
+    public function addToProject(Section $section) {
239 239
         $project = $section->getProject();
240 240
         if ($this->hasGid()) {
241 241
             $this->api->post("{$this}/addProject", [
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
      * @param string $target
270 270
      * @return TaskWebhook
271 271
      */
272
-    public function addWebhook (string $target) {
272
+    public function addWebhook(string $target) {
273 273
         /** @var TaskWebhook $webhook */
274 274
         $webhook = $this->factory(TaskWebhook::class);
275 275
         return $webhook->create($this, $target);
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
     /**
279 279
      * @return $this
280 280
      */
281
-    public function create () {
281
+    public function create() {
282 282
         $this->_create();
283 283
         $this->_clearSubDiffs();
284 284
         return $this;
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
      * @param string[] $include
295 295
      * @return Job
296 296
      */
297
-    public function duplicate (string $name, array $include) {
297
+    public function duplicate(string $name, array $include) {
298 298
         $remote = $this->api->post("{$this}/duplicate", [
299 299
             'name' => $name,
300 300
             'include' => array_values($include)
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
      * @depends after-create
309 309
      * @return Attachment[]
310 310
      */
311
-    public function getAttachments () {
311
+    public function getAttachments() {
312 312
         return $this->loadAll(Attachment::class, "{$this}/attachments");
313 313
     }
314 314
 
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
      * @depends after-create
319 319
      * @return Story[]
320 320
      */
321
-    public function getComments () {
321
+    public function getComments() {
322 322
         return array_values(array_filter($this->getStories(), function(Story $story) {
323 323
             return $story->isComment();
324 324
         }));
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
      * @depends after-create
331 331
      * @return Task[]
332 332
      */
333
-    public function getDependencies () {
333
+    public function getDependencies() {
334 334
         return $this->loadAll(self::class, "{$this}/dependencies");
335 335
     }
336 336
 
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
      * @depends after-create
341 341
      * @return Task[]
342 342
      */
343
-    public function getDependents () {
343
+    public function getDependents() {
344 344
         return $this->loadAll(self::class, "{$this}/dependents");
345 345
     }
346 346
 
@@ -351,21 +351,21 @@  discard block
 block discarded – undo
351 351
      * @param null|string $token
352 352
      * @return TaskEvent[]|StoryEvent[]
353 353
      */
354
-    public function getEvents (&$token) {
354
+    public function getEvents(&$token) {
355 355
         return $this->api->sync($this, $token);
356 356
     }
357 357
 
358 358
     /**
359 359
      * @return External
360 360
      */
361
-    public function getExternal () {
361
+    public function getExternal() {
362 362
         return $this->_get('external') ?? $this->data['external'] = $this->factory(static::$map['external']);
363 363
     }
364 364
 
365 365
     /**
366 366
      * @return Project[]
367 367
      */
368
-    public function getProjects () {
368
+    public function getProjects() {
369 369
         return array_map(function(Membership $membership) {
370 370
             return $membership->getProject();
371 371
         }, $this->getMemberships());
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
      * @depends after-create
378 378
      * @return Story[]
379 379
      */
380
-    public function getStories () {
380
+    public function getStories() {
381 381
         return $this->loadAll(Story::class, "{$this}/stories");
382 382
     }
383 383
 
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
      * @depends after-create
388 388
      * @return Task[]
389 389
      */
390
-    public function getSubTasks () {
390
+    public function getSubTasks() {
391 391
         return $this->loadAll(self::class, "{$this}/subtasks");
392 392
     }
393 393
 
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
      * @depends after-create
398 398
      * @return string
399 399
      */
400
-    public function getUrl (): string {
400
+    public function getUrl(): string {
401 401
         return "https://app.asana.com/0/0/{$this->getGid()}";
402 402
     }
403 403
 
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
      * @depends after-create
408 408
      * @return TaskWebhook[]
409 409
      */
410
-    public function getWebhooks () {
410
+    public function getWebhooks() {
411 411
         return $this->loadAll(TaskWebhook::class, 'webhooks', [
412 412
             'workspace' => $this->getWorkspace()->getGid(),
413 413
             'resource' => $this->getGid()
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
     /**
418 418
      * @return bool
419 419
      */
420
-    public function isRenderedAsSeparator (): bool {
420
+    public function isRenderedAsSeparator(): bool {
421 421
         return $this->_is('is_rendered_as_separator');
422 422
     }
423 423
 
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
      * @depends after-create
428 428
      * @return Story
429 429
      */
430
-    public function newComment () {
430
+    public function newComment() {
431 431
         /** @var Story $comment */
432 432
         $comment = $this->factory(Story::class, [
433 433
             'resource_subtype' => Story::TYPE_COMMENT_ADDED
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
      * @depends after-create
442 442
      * @return Task
443 443
      */
444
-    public function newSubTask () {
444
+    public function newSubTask() {
445 445
         /** @var Task $sub */
446 446
         $sub = $this->factory(self::class);
447 447
         return $sub->setParent($this);
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
      * @param Task[] $tasks
455 455
      * @return $this
456 456
      */
457
-    public function removeDependencies (array $tasks) {
457
+    public function removeDependencies(array $tasks) {
458 458
         $this->api->post("{$this}/removeDependencies", ['dependencies' => static::_getGids($tasks)]);
459 459
         return $this;
460 460
     }
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
      * @param Task $task
467 467
      * @return $this
468 468
      */
469
-    public function removeDependency (Task $task) {
469
+    public function removeDependency(Task $task) {
470 470
         return $this->removeDependencies([$task]);
471 471
     }
472 472
 
@@ -477,7 +477,7 @@  discard block
 block discarded – undo
477 477
      * @param Task $task
478 478
      * @return $this
479 479
      */
480
-    public function removeDependent (Task $task) {
480
+    public function removeDependent(Task $task) {
481 481
         return $this->removeDependents([$task]);
482 482
     }
483 483
 
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
      * @param Task[] $tasks
489 489
      * @return $this
490 490
      */
491
-    public function removeDependents (array $tasks) {
491
+    public function removeDependents(array $tasks) {
492 492
         $this->api->post("{$this}/removeDependents", ['dependents' => static::_getGids($tasks)]);
493 493
         return $this;
494 494
     }
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
      * @param User $user
500 500
      * @return $this
501 501
      */
502
-    public function removeFollower (User $user) {
502
+    public function removeFollower(User $user) {
503 503
         return $this->removeFollowers([$user]);
504 504
     }
505 505
 
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
      * @param User[] $users
510 510
      * @return $this
511 511
      */
512
-    public function removeFollowers (array $users) {
512
+    public function removeFollowers(array $users) {
513 513
         if ($this->hasGid()) {
514 514
             $this->api->post("{$this}/removeFollowers", ['followers' => static::_getGids($users)]);
515 515
         }
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
      * @param Project $project
524 524
      * @return $this
525 525
      */
526
-    public function removeFromProject (Project $project) {
526
+    public function removeFromProject(Project $project) {
527 527
         $gid = $project->getGid();
528 528
         if ($this->hasGid()) {
529 529
             $this->api->post("{$this}/removeProject", ['project' => $gid]);
@@ -542,7 +542,7 @@  discard block
 block discarded – undo
542 542
      * @param Tag $tag
543 543
      * @return $this
544 544
      */
545
-    public function removeTag (Tag $tag) {
545
+    public function removeTag(Tag $tag) {
546 546
         if ($this->hasGid()) {
547 547
             $this->api->post("{$this}/removeTag", ['tag' => $tag->getGid()]);
548 548
         }
@@ -556,7 +556,7 @@  discard block
 block discarded – undo
556 556
      * @param null|Task $parent
557 557
      * @return $this
558 558
      */
559
-    public function setParent (?self $parent) {
559
+    public function setParent(?self $parent) {
560 560
         if ($this->hasGid()) {
561 561
             $this->api->post("{$this}/setParent", ['parent' => $parent ? $parent->getGid() : null]);
562 562
             $this->data['parent'] = $parent;
@@ -571,14 +571,14 @@  discard block
 block discarded – undo
571 571
      * @param bool $flag
572 572
      * @return $this
573 573
      */
574
-    public function setRenderedAsSeparator (bool $flag) {
574
+    public function setRenderedAsSeparator(bool $flag) {
575 575
         return $this->_set('is_rendered_as_separator', $flag);
576 576
     }
577 577
 
578 578
     /**
579 579
      * @return $this
580 580
      */
581
-    public function update () {
581
+    public function update() {
582 582
         $this->_update();
583 583
         $this->_clearSubDiffs();
584 584
         return $this;
Please login to merge, or discard this patch.
src/User.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
         'workspaces' => [Workspace::class]
29 29
     ];
30 30
 
31
-    final public function __toString (): string {
31
+    final public function __toString(): string {
32 32
         return "users/{$this->getGid()}";
33 33
     }
34 34
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      * @param Workspace $workspace
37 37
      * @return $this
38 38
      */
39
-    public function addToWorkspace (Workspace $workspace) {
39
+    public function addToWorkspace(Workspace $workspace) {
40 40
         $this->api->post("{$workspace}/addUser", ['user' => $this->getGid()]);
41 41
         $this->_merge('workspaces', [$workspace]);
42 42
         return $this;
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      * @param Workspace $workspace
47 47
      * @return Portfolio[]
48 48
      */
49
-    public function getFavoritePortfolios (Workspace $workspace) {
49
+    public function getFavoritePortfolios(Workspace $workspace) {
50 50
         return $this->getFavorites(Portfolio::class, Portfolio::TYPE, $workspace);
51 51
     }
52 52
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
      * @param Workspace $workspace
55 55
      * @return Project[]
56 56
      */
57
-    public function getFavoriteProjects (Workspace $workspace) {
57
+    public function getFavoriteProjects(Workspace $workspace) {
58 58
         return $this->getFavorites(Project::class, Project::TYPE, $workspace);
59 59
     }
60 60
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      * @param Workspace $workspace
63 63
      * @return Tag[]
64 64
      */
65
-    public function getFavoriteTags (Workspace $workspace) {
65
+    public function getFavoriteTags(Workspace $workspace) {
66 66
         return $this->getFavorites(Tag::class, Tag::TYPE, $workspace);
67 67
     }
68 68
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      * @param Workspace $workspace
71 71
      * @return Team[]
72 72
      */
73
-    public function getFavoriteTeams (Workspace $workspace) {
73
+    public function getFavoriteTeams(Workspace $workspace) {
74 74
         return $this->getFavorites(Team::class, Team::TYPE, $workspace);
75 75
     }
76 76
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      * @param Workspace $workspace
79 79
      * @return User[]
80 80
      */
81
-    public function getFavoriteUsers (Workspace $workspace) {
81
+    public function getFavoriteUsers(Workspace $workspace) {
82 82
         return $this->getFavorites(self::class, self::TYPE, $workspace);
83 83
     }
84 84
 
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      * @param Workspace $workspace
89 89
      * @return array
90 90
      */
91
-    protected function getFavorites (string $class, string $resourceType, Workspace $workspace) {
91
+    protected function getFavorites(string $class, string $resourceType, Workspace $workspace) {
92 92
         return $this->loadAll($class, "{$this}/favorites", [
93 93
             'resource_type' => $resourceType,
94 94
             'workspace' => $workspace->getGid()
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      * @param Workspace $workspace
104 104
      * @return Task[]
105 105
      */
106
-    public function getIncompleteTasks (Workspace $workspace) {
106
+    public function getIncompleteTasks(Workspace $workspace) {
107 107
         return $this->loadAll(Task::class, 'tasks', [
108 108
             'assignee' => $this->getGid(),
109 109
             'workspace' => $workspace->getGid(),
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
      * @param Workspace $workspace
116 116
      * @return Portfolio[]
117 117
      */
118
-    public function getPortfolios (Workspace $workspace) {
118
+    public function getPortfolios(Workspace $workspace) {
119 119
         return $this->loadAll(Portfolio::class, "portfolios", [
120 120
             'workspace' => $workspace->getGid(),
121 121
             'owner' => $this->getGid()
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      * @param Workspace $workspace
127 127
      * @return TaskList
128 128
      */
129
-    public function getTaskList (Workspace $workspace) {
129
+    public function getTaskList(Workspace $workspace) {
130 130
         return $this->load(TaskList::class, "{$this}/user_task_list", [
131 131
             'workspace' => $workspace->getGid()
132 132
         ]);
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
      * @param string[] $filter
142 142
      * @return Task[]
143 143
      */
144
-    public function getTasks (Workspace $workspace, array $filter = []) {
144
+    public function getTasks(Workspace $workspace, array $filter = []) {
145 145
         $filter['assignee'] = $this->getGid();
146 146
         $filter['workspace'] = $workspace->getGid();
147 147
         return $this->loadAll(Task::class, 'tasks', $filter);
@@ -151,13 +151,13 @@  discard block
 block discarded – undo
151 151
      * @param Workspace $organization
152 152
      * @return Team[]
153 153
      */
154
-    public function getTeams (Workspace $organization) {
154
+    public function getTeams(Workspace $organization) {
155 155
         return $this->loadAll(Team::class, "{$this}/teams", [
156 156
             'organization' => $organization->getGid()
157 157
         ]);
158 158
     }
159 159
 
160
-    public function getUrl (): string {
160
+    public function getUrl(): string {
161 161
         return "https://app.asana.com/0/{$this->getGid()}/list";
162 162
     }
163 163
 
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
      * @param Workspace $workspace
166 166
      * @return $this
167 167
      */
168
-    public function removeFromWorkspace (Workspace $workspace) {
168
+    public function removeFromWorkspace(Workspace $workspace) {
169 169
         $this->api->post("{$workspace}/removeUser", ['user' => $this->getGid()]);
170 170
         $this->_remove('workspaces', [$workspace]);
171 171
         return $this;
Please login to merge, or discard this patch.
src/Project.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -67,11 +67,11 @@  discard block
 block discarded – undo
67 67
         'workspace' => Workspace::class
68 68
     ];
69 69
 
70
-    final public function __toString (): string {
70
+    final public function __toString(): string {
71 71
         return "projects/{$this->getGid()}";
72 72
     }
73 73
 
74
-    final protected function _getDir (): string {
74
+    final protected function _getDir(): string {
75 75
         return 'projects';
76 76
     }
77 77
 
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      * @param User $user
81 81
      * @return $this
82 82
      */
83
-    public function addMember (User $user) {
83
+    public function addMember(User $user) {
84 84
         return $this->addMembers([$user]);
85 85
     }
86 86
 
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      * @param User[] $users
90 90
      * @return $this
91 91
      */
92
-    public function addMembers (array $users) {
92
+    public function addMembers(array $users) {
93 93
         $this->api->post("{$this}/addMembers", ['members' => static::_getGids($users)]);
94 94
         $this->_merge('members', $users);
95 95
         return $this;
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      * @param string $target
101 101
      * @return ProjectWebhook
102 102
      */
103
-    public function addWebhook (string $target) {
103
+    public function addWebhook(string $target) {
104 104
         /** @var ProjectWebhook $webhook */
105 105
         $webhook = $this->factory(ProjectWebhook::class);
106 106
         return $webhook->create($this, $target);
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
      * @param array $schedule
126 126
      * @return Job
127 127
      */
128
-    public function duplicate (string $name, array $include, Team $team = null, array $schedule = []) {
128
+    public function duplicate(string $name, array $include, Team $team = null, array $schedule = []) {
129 129
         $data = ['name' => $name];
130 130
         if ($team) {
131 131
             $data['team'] = $team->getGid();
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      * @param null|string $token
148 148
      * @return ProjectEvent[]|TaskEvent[]|StoryEvent[]
149 149
      */
150
-    public function getEvents (&$token) {
150
+    public function getEvents(&$token) {
151 151
         return $this->api->sync($this, $token);
152 152
     }
153 153
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
      * @depends after-create
156 156
      * @return Section[]
157 157
      */
158
-    public function getSections () {
158
+    public function getSections() {
159 159
         return $this->loadAll(Section::class, "{$this}/sections");
160 160
     }
161 161
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      * @depends after-create
164 164
      * @return Status[]
165 165
      */
166
-    public function getStatuses () {
166
+    public function getStatuses() {
167 167
         return $this->loadAll(Status::class, "{$this}/project_statuses");
168 168
     }
169 169
 
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
      * @param array $query
173 173
      * @return Task[]
174 174
      */
175
-    public function getTasks (array $query = []) {
175
+    public function getTasks(array $query = []) {
176 176
         $query['project'] = $this->getGid();
177 177
         return $this->loadAll(Task::class, "tasks", $query);
178 178
     }
@@ -181,25 +181,25 @@  discard block
 block discarded – undo
181 181
      * @depends after-create
182 182
      * @return string
183 183
      */
184
-    public function getUrl (): string {
184
+    public function getUrl(): string {
185 185
         return "https://app.asana.com/0/{$this->getGid()}";
186 186
     }
187 187
 
188 188
     /**
189 189
      * @return ProjectWebhook[]
190 190
      */
191
-    public function getWebhooks () {
191
+    public function getWebhooks() {
192 192
         return $this->loadAll(ProjectWebhook::class, 'webhooks', [
193 193
             'workspace' => $this->getWorkspace()->getGid(),
194 194
             'resource' => $this->getGid()
195 195
         ]);
196 196
     }
197 197
 
198
-    public function isBoard (): bool {
198
+    public function isBoard(): bool {
199 199
         return $this->getLayout() === self::LAYOUT_BOARD;
200 200
     }
201 201
 
202
-    public function isList (): bool {
202
+    public function isList(): bool {
203 203
         return $this->getLayout() === self::LAYOUT_LIST;
204 204
     }
205 205
 
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
      * @depends after-create
208 208
      * @return Section
209 209
      */
210
-    public function newSection () {
210
+    public function newSection() {
211 211
         return $this->factory(Section::class, ['projects' => [$this]]);
212 212
     }
213 213
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
      * @depends after-create
216 216
      * @return Status
217 217
      */
218
-    public function newStatus () {
218
+    public function newStatus() {
219 219
         return $this->factory(Status::class);
220 220
     }
221 221
 
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
      * @depends after-create
226 226
      * @return Task
227 227
      */
228
-    public function newTask () {
228
+    public function newTask() {
229 229
         return $this->getSections()[0]->newTask();
230 230
     }
231 231
 
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
      * @param User $user
235 235
      * @return $this
236 236
      */
237
-    public function removeMember (User $user) {
237
+    public function removeMember(User $user) {
238 238
         return $this->removeMembers([$user]);
239 239
     }
240 240
 
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
      * @param User[] $users
244 244
      * @return $this
245 245
      */
246
-    public function removeMembers (array $users) {
246
+    public function removeMembers(array $users) {
247 247
         $this->api->post("{$this}/removeMembers", ['members' => static::_getGids($users)]);
248 248
         $this->_remove('members', $users);
249 249
         return $this;
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
      * @param null|Team $team
255 255
      * @return $this
256 256
      */
257
-    public function setTeam (?Team $team) {
257
+    public function setTeam(?Team $team) {
258 258
         assert(!$this->hasGid());
259 259
         if ($team and !$this->hasWorkspace()) {
260 260
             $this->setWorkspace($team->getOrganization());
Please login to merge, or discard this patch.
src/Team.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
         'organization' => Workspace::class
26 26
     ];
27 27
 
28
-    final public function __toString (): string {
28
+    final public function __toString(): string {
29 29
         return "teams/{$this->getGid()}";
30 30
     }
31 31
 
@@ -33,19 +33,19 @@  discard block
 block discarded – undo
33 33
      * @param User $user
34 34
      * @return $this
35 35
      */
36
-    public function addUser (User $user) {
36
+    public function addUser(User $user) {
37 37
         $this->api->post("{$this}/addUser", ['user' => $user->getGid()]);
38 38
         return $this;
39 39
     }
40 40
 
41
-    public function getUrl (): string {
41
+    public function getUrl(): string {
42 42
         return "https://app.asana.com/0/{$this->getGid()}/overview";
43 43
     }
44 44
 
45 45
     /**
46 46
      * @return User[]
47 47
      */
48
-    public function getUsers () {
48
+    public function getUsers() {
49 49
         return $this->loadAll(User::class, "{$this}/users");
50 50
     }
51 51
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      * @param User $user
54 54
      * @return $this
55 55
      */
56
-    public function removeUser (User $user) {
56
+    public function removeUser(User $user) {
57 57
         $this->api->post("{$this}/removeUser", ['user' => $user->getGid()]);
58 58
         return $this;
59 59
     }
Please login to merge, or discard this patch.
src/Workspace/OrganizationExport.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
         'organization' => Workspace::class
34 34
     ];
35 35
 
36
-    final public function __toString (): string {
36
+    final public function __toString(): string {
37 37
         return "organization_exports/{$this->getGid()}";
38 38
     }
39 39
 
40
-    final protected function _getDir (): string {
40
+    final protected function _getDir(): string {
41 41
         return "organization_exports";
42 42
     }
43 43
 
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      * @param Workspace $organization
46 46
      * @return $this
47 47
      */
48
-    public function create (Workspace $organization) {
48
+    public function create(Workspace $organization) {
49 49
         $this->_set('organization', $organization);
50 50
         return $this->_create();
51 51
     }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      *
56 56
      * @return bool
57 57
      */
58
-    public function isActive (): bool {
58
+    public function isActive(): bool {
59 59
         return $this->getState() === self::STATE_ACTIVE;
60 60
     }
61 61
 
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      *
65 65
      * @return bool
66 66
      */
67
-    public function isDone (): bool {
67
+    public function isDone(): bool {
68 68
         return $this->isSuccessful() or $this->isFailed();
69 69
     }
70 70
 
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      *
74 74
      * @return bool
75 75
      */
76
-    public function isFailed (): bool {
76
+    public function isFailed(): bool {
77 77
         return $this->getState() === self::STATE_FAIL;
78 78
     }
79 79
 
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      *
83 83
      * @return bool
84 84
      */
85
-    public function isQueued (): bool {
85
+    public function isQueued(): bool {
86 86
         return $this->getState() === self::STATE_QUEUED;
87 87
     }
88 88
 
@@ -91,14 +91,14 @@  discard block
 block discarded – undo
91 91
      *
92 92
      * @return bool
93 93
      */
94
-    public function isSuccessful (): bool {
94
+    public function isSuccessful(): bool {
95 95
         return $this->getState() === self::STATE_SUCCESS;
96 96
     }
97 97
 
98 98
     /**
99 99
      * Sleeps and reloads "every few minutes" until the export completes successfully or fails.
100 100
      */
101
-    public function wait () {
101
+    public function wait() {
102 102
         while (!$this->isDone()) {
103 103
             sleep(240);
104 104
             $this->reload();
Please login to merge, or discard this patch.