Passed
Push — master ( e1698c...dba318 )
by y
02:23
created
src/Task.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -69,15 +69,15 @@  discard block
 block discarded – undo
69 69
     const ASSIGN_TODAY = 'today';
70 70
     const ASSIGN_UPCOMING = 'upcoming';
71 71
 
72
-    final public function __toString (): string {
72
+    final public function __toString(): string {
73 73
         return "tasks/{$this->getGid()}";
74 74
     }
75 75
 
76
-    final protected function _getDir (): string {
76
+    final protected function _getDir(): string {
77 77
         return 'tasks';
78 78
     }
79 79
 
80
-    protected function _getMap (): array {
80
+    protected function _getMap(): array {
81 81
         return [
82 82
             'assignee' => User::class,
83 83
             'custom_fields' => CustomValues::class,
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      * @param string $file
99 99
      * @return Attachment
100 100
      */
101
-    public function addAttachment (string $file) {
101
+    public function addAttachment(string $file) {
102 102
         /** @var Attachment $attachment */
103 103
         $attachment = $this->factory(Attachment::class, ['parent' => $this]);
104 104
         return $attachment->upload($file);
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      * @param string $text
112 112
      * @return Story
113 113
      */
114
-    public function addComment (string $text) {
114
+    public function addComment(string $text) {
115 115
         return $this->newComment()->setText($text)->create();
116 116
     }
117 117
 
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      * @param Task[] $tasks
123 123
      * @return $this
124 124
      */
125
-    public function addDependencies (array $tasks) {
125
+    public function addDependencies(array $tasks) {
126 126
         $this->api->post("{$this}/addDependencies", ['dependents' => static::_getGids($tasks)]);
127 127
         return $this;
128 128
     }
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
      * @param Task $task
135 135
      * @return $this
136 136
      */
137
-    public function addDependency (Task $task) {
137
+    public function addDependency(Task $task) {
138 138
         return $this->addDependencies([$task]);
139 139
     }
140 140
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      * @param Task $task
146 146
      * @return $this
147 147
      */
148
-    public function addDependent (Task $task) {
148
+    public function addDependent(Task $task) {
149 149
         return $this->addDependents([$task]);
150 150
     }
151 151
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
      * @param Task[] $tasks
157 157
      * @return $this
158 158
      */
159
-    public function addDependents (array $tasks) {
159
+    public function addDependents(array $tasks) {
160 160
         $this->api->post("{$this}/addDependents", ['dependents' => static::_getGids($tasks)]);
161 161
         return $this;
162 162
     }
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
      * @param User $user
168 168
      * @return $this
169 169
      */
170
-    public function addFollower (User $user) {
170
+    public function addFollower(User $user) {
171 171
         return $this->addFollowers([$user]);
172 172
     }
173 173
 
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
      * @param User[] $users
178 178
      * @return $this
179 179
      */
180
-    public function addFollowers (array $users) {
180
+    public function addFollowers(array $users) {
181 181
         if ($this->hasGid()) {
182 182
             $this->api->post("{$this}/addFollowers", ['followers' => static::_getGids($users)]);
183 183
             $this->_merge('followers', $users);
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
      * @param Tag $tag
195 195
      * @return $this
196 196
      */
197
-    public function addTag (Tag $tag) {
197
+    public function addTag(Tag $tag) {
198 198
         if ($this->hasGid()) {
199 199
             $this->api->post("{$this}/addTag", ['tag' => $tag->getGid()]);
200 200
             $this->_merge('tags', [$tag]);
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
      * @param Section $section
212 212
      * @return $this
213 213
      */
214
-    public function addToProject (Section $section) {
214
+    public function addToProject(Section $section) {
215 215
         $project = $section->getProject();
216 216
         if ($this->hasGid()) {
217 217
             $this->api->post("{$this}/addProject", [
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
      * @param string $target
246 246
      * @return TaskWebhook
247 247
      */
248
-    public function addWebhook (string $target) {
248
+    public function addWebhook(string $target) {
249 249
         /** @var TaskWebhook $webhook */
250 250
         $webhook = $this->factory(TaskWebhook::class);
251 251
         return $webhook->create($this, $target);
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
      * @param string[] $include
262 262
      * @return Job
263 263
      */
264
-    public function duplicate (string $name, array $include) {
264
+    public function duplicate(string $name, array $include) {
265 265
         $remote = $this->api->post("{$this}/duplicate", [
266 266
             'name' => $name,
267 267
             'include' => array_values($include)
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
      * @depends after-create
276 276
      * @return Attachment[]
277 277
      */
278
-    public function getAttachments () {
278
+    public function getAttachments() {
279 279
         return $this->loadAll(Attachment::class, "{$this}/attachments");
280 280
     }
281 281
 
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
      * @depends after-create
286 286
      * @return Story[]
287 287
      */
288
-    public function getComments () {
288
+    public function getComments() {
289 289
         return array_values(array_filter($this->getStories(), function(Story $story) {
290 290
             return $story->isComment();
291 291
         }));
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
      * @depends after-create
298 298
      * @return Task[]
299 299
      */
300
-    public function getDependencies () {
300
+    public function getDependencies() {
301 301
         return $this->loadAll(self::class, "{$this}/dependencies");
302 302
     }
303 303
 
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
      * @depends after-create
308 308
      * @return Task[]
309 309
      */
310
-    public function getDependents () {
310
+    public function getDependents() {
311 311
         return $this->loadAll(self::class, "{$this}/dependents");
312 312
     }
313 313
 
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
      * @param string $token
319 319
      * @return TaskEvent[]|StoryEvent[]
320 320
      */
321
-    public function getEvents (string &$token) {
321
+    public function getEvents(string &$token) {
322 322
         return $this->api->sync($this, $token);
323 323
     }
324 324
 
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
      * @depends after-create
329 329
      * @return Story[]
330 330
      */
331
-    public function getStories () {
331
+    public function getStories() {
332 332
         return $this->loadAll(Story::class, "{$this}/stories");
333 333
     }
334 334
 
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
      * @depends after-create
339 339
      * @return Task[]
340 340
      */
341
-    public function getSubTasks () {
341
+    public function getSubTasks() {
342 342
         return $this->loadAll(self::class, "{$this}/subtasks");
343 343
     }
344 344
 
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
      * @depends after-create
349 349
      * @return string
350 350
      */
351
-    public function getUrl (): string {
351
+    public function getUrl(): string {
352 352
         return "https://app.asana.com/0/0/{$this->getGid()}";
353 353
     }
354 354
 
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
      * @depends after-create
359 359
      * @return TaskWebhook[]
360 360
      */
361
-    public function getWebhooks () {
361
+    public function getWebhooks() {
362 362
         return $this->loadAll(TaskWebhook::class, 'webhooks', [
363 363
             'workspace' => $this->getWorkspace()->getGid(),
364 364
             'resource' => $this->getGid()
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
     /**
369 369
      * @return bool
370 370
      */
371
-    public function isRenderedAsSeparator (): bool {
371
+    public function isRenderedAsSeparator(): bool {
372 372
         return $this->_is('is_rendered_as_separator');
373 373
     }
374 374
 
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
      * @depends after-create
379 379
      * @return Story
380 380
      */
381
-    public function newComment () {
381
+    public function newComment() {
382 382
         /** @var Story $comment */
383 383
         $comment = $this->factory(Story::class, [
384 384
             'resource_subtype' => Story::TYPE_COMMENT_ADDED
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
      * @depends after-create
393 393
      * @return Task
394 394
      */
395
-    public function newSubTask () {
395
+    public function newSubTask() {
396 396
         /** @var Task $sub */
397 397
         $sub = $this->factory(self::class);
398 398
         return $sub->setParent($this);
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
      * @param Task[] $tasks
406 406
      * @return $this
407 407
      */
408
-    public function removeDependencies (array $tasks) {
408
+    public function removeDependencies(array $tasks) {
409 409
         $this->api->post("{$this}/removeDependencies", ['dependencies' => static::_getGids($tasks)]);
410 410
         return $this;
411 411
     }
@@ -417,7 +417,7 @@  discard block
 block discarded – undo
417 417
      * @param Task $task
418 418
      * @return $this
419 419
      */
420
-    public function removeDependency (Task $task) {
420
+    public function removeDependency(Task $task) {
421 421
         return $this->removeDependencies([$task]);
422 422
     }
423 423
 
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
      * @param Task $task
429 429
      * @return $this
430 430
      */
431
-    public function removeDependent (Task $task) {
431
+    public function removeDependent(Task $task) {
432 432
         return $this->removeDependents([$task]);
433 433
     }
434 434
 
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
      * @param Task[] $tasks
440 440
      * @return $this
441 441
      */
442
-    public function removeDependents (array $tasks) {
442
+    public function removeDependents(array $tasks) {
443 443
         $this->api->post("{$this}/removeDependents", ['dependents' => static::_getGids($tasks)]);
444 444
         return $this;
445 445
     }
@@ -450,7 +450,7 @@  discard block
 block discarded – undo
450 450
      * @param User $user
451 451
      * @return $this
452 452
      */
453
-    public function removeFollower (User $user) {
453
+    public function removeFollower(User $user) {
454 454
         return $this->removeFollowers([$user]);
455 455
     }
456 456
 
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
      * @param User[] $users
461 461
      * @return $this
462 462
      */
463
-    public function removeFollowers (array $users) {
463
+    public function removeFollowers(array $users) {
464 464
         if ($this->hasGid()) {
465 465
             $this->api->post("{$this}/removeFollowers", ['followers' => static::_getGids($users)]);
466 466
         }
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
      * @param Project $project
475 475
      * @return $this
476 476
      */
477
-    public function removeFromProject (Project $project) {
477
+    public function removeFromProject(Project $project) {
478 478
         $gid = $project->getGid();
479 479
         if ($this->hasGid()) {
480 480
             $this->api->post("{$this}/removeProject", ['project' => $gid]);
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
      * @param Tag $tag
494 494
      * @return $this
495 495
      */
496
-    public function removeTag (Tag $tag) {
496
+    public function removeTag(Tag $tag) {
497 497
         if ($this->hasGid()) {
498 498
             $this->api->post("{$this}/removeTag", ['tag' => $tag->getGid()]);
499 499
         }
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
      * @param null|Task $parent
508 508
      * @return $this
509 509
      */
510
-    public function setParent (?self $parent) {
510
+    public function setParent(?self $parent) {
511 511
         if ($this->hasGid()) {
512 512
             $this->api->post("{$this}/setParent", ['parent' => $parent ? $parent->getGid() : null]);
513 513
             $this->data['parent'] = $parent;
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
      * @param bool $flag
523 523
      * @return $this
524 524
      */
525
-    public function setRenderedAsSeparator (bool $flag) {
525
+    public function setRenderedAsSeparator(bool $flag) {
526 526
         return $this->_set('is_rendered_as_separator', $flag);
527 527
     }
528 528
 }
529 529
\ No newline at end of file
Please login to merge, or discard this patch.
src/CustomField/CustomValues.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
      */
17 17
     protected $enumNames = [];
18 18
 
19
-    public function __construct ($caller, array $data = []) {
19
+    public function __construct($caller, array $data = []) {
20 20
         parent::__construct($caller);
21 21
         foreach ($data as $field) {
22 22
             $gid = $field['gid'];
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      * @param string $enumName
39 39
      * @return null|string
40 40
      */
41
-    public function getEnumGid (string $fieldGid, string $enumName) {
41
+    public function getEnumGid(string $fieldGid, string $enumName) {
42 42
         return array_search($enumName, $this->enumNames[$fieldGid]) ?: null;
43 43
     }
44 44
 
@@ -47,14 +47,14 @@  discard block
 block discarded – undo
47 47
      * @param string $valueGid
48 48
      * @return string
49 49
      */
50
-    public function getEnumName (string $fieldGid, string $valueGid) {
50
+    public function getEnumName(string $fieldGid, string $valueGid) {
51 51
         return $this->enumNames[$fieldGid][$valueGid];
52 52
     }
53 53
 
54 54
     /**
55 55
      * @return string[][]
56 56
      */
57
-    public function getEnumNames (): array {
57
+    public function getEnumNames(): array {
58 58
         return $this->enumNames;
59 59
     }
60 60
 
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      * @param string $fieldGid
63 63
      * @return null|number|string
64 64
      */
65
-    public function getValue (string $fieldGid) {
65
+    public function getValue(string $fieldGid) {
66 66
         return $this->data[$fieldGid] ?? null;
67 67
     }
68 68
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      * @param string $fieldGid
71 71
      * @return bool
72 72
      */
73
-    public function offsetExists ($fieldGid) {
73
+    public function offsetExists($fieldGid) {
74 74
         return array_key_exists($fieldGid, $this->data);
75 75
     }
76 76
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      * @param string $fieldGid
79 79
      * @return null|number|string
80 80
      */
81
-    public function offsetGet ($fieldGid) {
81
+    public function offsetGet($fieldGid) {
82 82
         return $this->getValue($fieldGid);
83 83
     }
84 84
 
@@ -86,14 +86,14 @@  discard block
 block discarded – undo
86 86
      * @param string $fieldGid
87 87
      * @param null|number|string $value
88 88
      */
89
-    public function offsetSet ($fieldGid, $value) {
89
+    public function offsetSet($fieldGid, $value) {
90 90
         $this->setValue($fieldGid, $value);
91 91
     }
92 92
 
93 93
     /**
94 94
      * @param string $fieldGid
95 95
      */
96
-    public function offsetUnset ($fieldGid) {
96
+    public function offsetUnset($fieldGid) {
97 97
         unset($this->data[$fieldGid]);
98 98
         $this->diff[$fieldGid] = true;
99 99
     }
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      * @param null|number|string $value
104 104
      * @return $this
105 105
      */
106
-    public function setValue (string $fieldGid, $value) {
106
+    public function setValue(string $fieldGid, $value) {
107 107
         $this->data[$fieldGid] = $value;
108 108
         $this->diff[$fieldGid] = true;
109 109
         return $this;
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,11 +23,9 @@
 block discarded – undo
23 23
             if ($field['type'] === CustomField::TYPE_ENUM) {
24 24
                 $this->enumNames[$gid] = array_column($field['enum_options'], 'name', 'gid');
25 25
                 $this->data[$gid] = $field['enum_value']['gid'];
26
-            }
27
-            elseif ($field['type'] === CustomField::TYPE_TEXT) {
26
+            } elseif ($field['type'] === CustomField::TYPE_TEXT) {
28 27
                 $this->data[$gid] = $field['text_value'];
29
-            }
30
-            elseif ($field['type'] === CustomField::TYPE_NUMBER) {
28
+            } elseif ($field['type'] === CustomField::TYPE_NUMBER) {
31 29
                 $this->data[$gid] = $field['number_value'];
32 30
             }
33 31
         }
Please login to merge, or discard this patch.
src/Project.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -58,15 +58,15 @@  discard block
 block discarded – undo
58 58
     const LAYOUT_BOARD = 'board';
59 59
     const LAYOUT_LIST = 'list';
60 60
 
61
-    final public function __toString (): string {
61
+    final public function __toString(): string {
62 62
         return "projects/{$this->getGid()}";
63 63
     }
64 64
 
65
-    final protected function _getDir (): string {
65
+    final protected function _getDir(): string {
66 66
         return 'projects';
67 67
     }
68 68
 
69
-    protected function _getMap (): array {
69
+    protected function _getMap(): array {
70 70
         return [
71 71
             'current_status' => Status::class,
72 72
             'custom_fields' => CustomValues::class,
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
      * @param User $user
84 84
      * @return $this
85 85
      */
86
-    public function addMember (User $user) {
86
+    public function addMember(User $user) {
87 87
         return $this->addMembers([$user]);
88 88
     }
89 89
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      * @param User[] $users
93 93
      * @return $this
94 94
      */
95
-    public function addMembers (array $users) {
95
+    public function addMembers(array $users) {
96 96
         $this->api->post("{$this}/addMembers", ['members' => static::_getGids($users)]);
97 97
         $this->_merge('members', $users);
98 98
         return $this;
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      * @param string $target
104 104
      * @return ProjectWebhook
105 105
      */
106
-    public function addWebhook (string $target) {
106
+    public function addWebhook(string $target) {
107 107
         /** @var ProjectWebhook $webhook */
108 108
         $webhook = $this->factory(ProjectWebhook::class);
109 109
         return $webhook->create($this, $target);
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
      * @param array $schedule
129 129
      * @return Job
130 130
      */
131
-    public function duplicate (string $name, array $include, Team $team = null, array $schedule = []) {
131
+    public function duplicate(string $name, array $include, Team $team = null, array $schedule = []) {
132 132
         $data = ['name' => $name];
133 133
         if ($team) {
134 134
             $data['team'] = $team->getGid();
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
      * @param string $token
149 149
      * @return ProjectEvent[]|TaskEvent[]|StoryEvent[]
150 150
      */
151
-    public function getEvents (string &$token) {
151
+    public function getEvents(string &$token) {
152 152
         return $this->api->sync($this, $token);
153 153
     }
154 154
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
      * @depends after-create
157 157
      * @return Section[]
158 158
      */
159
-    public function getSections () {
159
+    public function getSections() {
160 160
         return $this->loadAll(Section::class, "{$this}/sections");
161 161
     }
162 162
 
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
      * @depends after-create
165 165
      * @return Status[]
166 166
      */
167
-    public function getStatuses () {
167
+    public function getStatuses() {
168 168
         return $this->loadAll(Status::class, "{$this}/project_statuses");
169 169
     }
170 170
 
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
      * @param array $query
174 174
      * @return Task[]
175 175
      */
176
-    public function getTasks (array $query = []) {
176
+    public function getTasks(array $query = []) {
177 177
         $query['project'] = $this->getGid();
178 178
         return $this->loadAll(Task::class, "tasks", $query);
179 179
     }
@@ -182,25 +182,25 @@  discard block
 block discarded – undo
182 182
      * @depends after-create
183 183
      * @return string
184 184
      */
185
-    public function getUrl (): string {
185
+    public function getUrl(): string {
186 186
         return "https://app.asana.com/0/{$this->getGid()}";
187 187
     }
188 188
 
189 189
     /**
190 190
      * @return ProjectWebhook[]
191 191
      */
192
-    public function getWebhooks () {
192
+    public function getWebhooks() {
193 193
         return $this->loadAll(ProjectWebhook::class, 'webhooks', [
194 194
             'workspace' => $this->getWorkspace()->getGid(),
195 195
             'resource' => $this->getGid()
196 196
         ]);
197 197
     }
198 198
 
199
-    public function isBoard (): bool {
199
+    public function isBoard(): bool {
200 200
         return $this->getLayout() === self::LAYOUT_BOARD;
201 201
     }
202 202
 
203
-    public function isList (): bool {
203
+    public function isList(): bool {
204 204
         return $this->getLayout() === self::LAYOUT_LIST;
205 205
     }
206 206
 
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
      * @depends after-create
209 209
      * @return Section
210 210
      */
211
-    public function newSection () {
211
+    public function newSection() {
212 212
         return $this->factory(Section::class, ['projects' => [$this]]);
213 213
     }
214 214
 
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
      * @depends after-create
217 217
      * @return Status
218 218
      */
219
-    public function newStatus () {
219
+    public function newStatus() {
220 220
         return $this->factory(Status::class);
221 221
     }
222 222
 
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
      * @depends after-create
227 227
      * @return Task
228 228
      */
229
-    public function newTask () {
229
+    public function newTask() {
230 230
         return $this->getSections()[0]->newTask();
231 231
     }
232 232
 
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
      * @param User $user
236 236
      * @return $this
237 237
      */
238
-    public function removeMember (User $user) {
238
+    public function removeMember(User $user) {
239 239
         return $this->removeMembers([$user]);
240 240
     }
241 241
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
      * @param User[] $users
245 245
      * @return $this
246 246
      */
247
-    public function removeMembers (array $users) {
247
+    public function removeMembers(array $users) {
248 248
         $this->api->post("{$this}/removeMembers", ['members' => static::_getGids($users)]);
249 249
         $this->_remove('members', $users);
250 250
         return $this;
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
      * @param null|Team $team
256 256
      * @return $this
257 257
      */
258
-    public function setTeam (?Team $team) {
258
+    public function setTeam(?Team $team) {
259 259
         assert(!$this->hasGid());
260 260
         if ($team and !$this->hasWorkspace()) {
261 261
             $this->setWorkspace($team->getOrganization());
Please login to merge, or discard this patch.
src/CustomField.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -39,15 +39,15 @@  discard block
 block discarded – undo
39 39
     const TYPE_NUMBER = 'number';
40 40
     const TYPE_TEXT = 'text';
41 41
 
42
-    final public function __toString (): string {
42
+    final public function __toString(): string {
43 43
         return "custom_fields/{$this->getGid()}";
44 44
     }
45 45
 
46
-    final protected function _getDir (): string {
46
+    final protected function _getDir(): string {
47 47
         return 'custom_fields';
48 48
     }
49 49
 
50
-    protected function _getMap (): array {
50
+    protected function _getMap(): array {
51 51
         return [
52 52
             'enum_options' => [EnumOption::class],
53 53
         ];
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
      * @param string $name
58 58
      * @return EnumOption
59 59
      */
60
-    public function addEnumOption (string $name) {
60
+    public function addEnumOption(string $name) {
61 61
         /** @var EnumOption $option */
62 62
         $option = $this->factory(EnumOption::class);
63 63
         $option->setName($name);
@@ -74,28 +74,28 @@  discard block
 block discarded – undo
74 74
     /**
75 75
      * @return bool
76 76
      */
77
-    public function hasNotificationsEnabled (): bool {
77
+    public function hasNotificationsEnabled(): bool {
78 78
         return $this->_is('has_notifications_enabled');
79 79
     }
80 80
 
81 81
     /**
82 82
      * @return bool
83 83
      */
84
-    public function isEnum (): bool {
84
+    public function isEnum(): bool {
85 85
         return $this->getResourceSubtype() === self::TYPE_ENUM;
86 86
     }
87 87
 
88 88
     /**
89 89
      * @return bool
90 90
      */
91
-    public function isGlobalToWorkspace (): bool {
91
+    public function isGlobalToWorkspace(): bool {
92 92
         return $this->_is('is_global_to_workspace');
93 93
     }
94 94
 
95 95
     /**
96 96
      * @return bool
97 97
      */
98
-    final public function isText (): bool {
98
+    final public function isText(): bool {
99 99
         return $this->getResourceSubtype() === self::TYPE_TEXT;
100 100
     }
101 101
 
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      * @param bool $flag
104 104
      * @return $this
105 105
      */
106
-    public function setGlobalToWorkspace (bool $flag) {
106
+    public function setGlobalToWorkspace(bool $flag) {
107 107
         return $this->_set('is_global_to_workspace', $flag);
108 108
     }
109 109
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      * @param bool $flag
112 112
      * @return $this
113 113
      */
114
-    public function setNotificationsEnabled (bool $flag) {
114
+    public function setNotificationsEnabled(bool $flag) {
115 115
         return $this->_set('has_notifications_enabled', $flag);
116 116
     }
117 117
 
Please login to merge, or discard this patch.