Passed
Push — master ( 1a00b5...984447 )
by y
03:02
created
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.