Passed
Push — master ( 7073d8...993609 )
by y
01:42
created
src/Base/AbstractEntity/CreateTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,14 +15,14 @@
 block discarded – undo
15 15
      *
16 16
      * @return string
17 17
      */
18
-    abstract protected function _getDir (): string;
18
+    abstract protected function _getDir(): string;
19 19
 
20 20
     /**
21 21
      * `POST`
22 22
      *
23 23
      * @return $this
24 24
      */
25
-    public function create () {
25
+    public function create() {
26 26
         /** @var Api $api */
27 27
         $api = $this->api;
28 28
         $remote = $api->post($this->_getDir(), $this->getDiff(), ['expand' => 'this']);
Please login to merge, or discard this patch.
src/Task/CustomValues.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     protected $task;
41 41
 
42
-    public function __construct (Task $task, array $fields) {
42
+    public function __construct(Task $task, array $fields) {
43 43
         parent::__construct($task);
44 44
         $this->task = $task;
45 45
         foreach ($fields as $field) {
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
     /**
61 61
      * @return int
62 62
      */
63
-    public function count () {
63
+    public function count() {
64 64
         return count($this->data);
65 65
     }
66 66
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * @param string $enumGid
69 69
      * @return null|string
70 70
      */
71
-    public function getCurrentOptionName (string $enumGid): ?string {
71
+    public function getCurrentOptionName(string $enumGid): ?string {
72 72
         return $this->optionNames[$enumGid][$this[$enumGid]] ?? null;
73 73
     }
74 74
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      * @param string $fieldName
77 77
      * @return null|string
78 78
      */
79
-    public function getGid (string $fieldName) {
79
+    public function getGid(string $fieldName) {
80 80
         return $this->gids[$fieldName] ?? null;
81 81
     }
82 82
 
@@ -85,14 +85,14 @@  discard block
 block discarded – undo
85 85
      *
86 86
      * @return string[]
87 87
      */
88
-    public function getGids () {
88
+    public function getGids() {
89 89
         return $this->gids;
90 90
     }
91 91
 
92 92
     /**
93 93
      * @return Traversable
94 94
      */
95
-    public function getIterator () {
95
+    public function getIterator() {
96 96
         return new ArrayIterator($this->data);
97 97
     }
98 98
 
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      * @param string $fieldGid
101 101
      * @return null|string
102 102
      */
103
-    public function getName (string $fieldGid): ?string {
103
+    public function getName(string $fieldGid): ?string {
104 104
         return array_search($fieldGid, $this->gids) ?: null;
105 105
     }
106 106
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      *
110 110
      * @return string[]
111 111
      */
112
-    public function getNames () {
112
+    public function getNames() {
113 113
         return array_flip($this->gids);
114 114
     }
115 115
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      * @param string $optionName
119 119
      * @return null|string
120 120
      */
121
-    public function getOptionGid (string $enumGid, string $optionName) {
121
+    public function getOptionGid(string $enumGid, string $optionName) {
122 122
         return array_search($optionName, $this->optionNames[$enumGid]) ?: null;
123 123
     }
124 124
 
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
      * @param string $enumGid
129 129
      * @return string[]
130 130
      */
131
-    public function getOptionGids (string $enumGid) {
131
+    public function getOptionGids(string $enumGid) {
132 132
         return array_flip($this->optionNames[$enumGid]);
133 133
     }
134 134
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
      * @param string $optionGid
138 138
      * @return null|string
139 139
      */
140
-    public function getOptionName (string $enumGid, string $optionGid): ?string {
140
+    public function getOptionName(string $enumGid, string $optionGid): ?string {
141 141
         return $this->optionNames[$enumGid][$optionGid] ?? null;
142 142
     }
143 143
 
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
      * @param string $enumGid
148 148
      * @return string[]
149 149
      */
150
-    public function getOptionNames (string $enumGid) {
150
+    public function getOptionNames(string $enumGid) {
151 151
         return $this->optionNames[$enumGid];
152 152
     }
153 153
 
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
      * @param string $fieldGid
156 156
      * @return null|number|string
157 157
      */
158
-    public function getValue (string $fieldGid) {
158
+    public function getValue(string $fieldGid) {
159 159
         return $this->data[$fieldGid] ?? null;
160 160
     }
161 161
 
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
      * @param string $fieldGid
164 164
      * @return bool
165 165
      */
166
-    public function offsetExists ($fieldGid) {
166
+    public function offsetExists($fieldGid) {
167 167
         return array_key_exists($fieldGid, $this->data);
168 168
     }
169 169
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
      * @param string $fieldGid
172 172
      * @return null|number|string
173 173
      */
174
-    public function offsetGet ($fieldGid) {
174
+    public function offsetGet($fieldGid) {
175 175
         return $this->getValue($fieldGid);
176 176
     }
177 177
 
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
      * @param string $fieldGid
180 180
      * @param null|number|string $value
181 181
      */
182
-    public function offsetSet ($fieldGid, $value) {
182
+    public function offsetSet($fieldGid, $value) {
183 183
         $this->setValue($fieldGid, $value);
184 184
     }
185 185
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
      *
189 189
      * @param string $fieldGid
190 190
      */
191
-    public function offsetUnset ($fieldGid) {
191
+    public function offsetUnset($fieldGid) {
192 192
         $this->setValue($fieldGid, null);
193 193
     }
194 194
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
      * @param null|number|string $value
198 198
      * @return $this
199 199
      */
200
-    public function setValue (string $fieldGid, $value) {
200
+    public function setValue(string $fieldGid, $value) {
201 201
         $this->data[$fieldGid] = $value;
202 202
         $this->diff[$fieldGid] = true;
203 203
         $this->task->diff['custom_fields'] = true;
Please login to merge, or discard this patch.
src/Task/External.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
      */
25 25
     protected $task;
26 26
 
27
-    public function __construct (Task $task, array $data = []) {
27
+    public function __construct(Task $task, array $data = []) {
28 28
         parent::__construct($task, $data);
29 29
         $this->task = $task;
30 30
     }
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      * @param mixed $value
37 37
      * @return $this
38 38
      */
39
-    protected function _set (string $key, $value) {
39
+    protected function _set(string $key, $value) {
40 40
         $this->task->diff['external'] = true;
41 41
         return parent::_set($key, $value);
42 42
     }
Please login to merge, or discard this patch.
src/Job.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
         'new_task' => Task::class
34 34
     ];
35 35
 
36
-    final public function __toString (): string {
36
+    final public function __toString(): string {
37 37
         return "jobs/{$this->getGid()}";
38 38
     }
39 39
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      *
43 43
      * @return bool
44 44
      */
45
-    public function isActive (): bool {
45
+    public function isActive(): bool {
46 46
         return $this->getStatus() === self::STATUS_ACTIVE;
47 47
     }
48 48
 
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      *
52 52
      * @return bool
53 53
      */
54
-    public function isDone (): bool {
54
+    public function isDone(): bool {
55 55
         return $this->isSuccessful() or $this->isFailed();
56 56
     }
57 57
 
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
      *
61 61
      * @return bool
62 62
      */
63
-    public function isFailed (): bool {
63
+    public function isFailed(): bool {
64 64
         return $this->getStatus() === self::STATUS_FAIL;
65 65
     }
66 66
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
      *
70 70
      * @return bool
71 71
      */
72
-    public function isQueued (): bool {
72
+    public function isQueued(): bool {
73 73
         return $this->getStatus() === self::STATUS_QUEUED;
74 74
     }
75 75
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      *
79 79
      * @return bool
80 80
      */
81
-    public function isSuccessful (): bool {
81
+    public function isSuccessful(): bool {
82 82
         return $this->getStatus() === self::STATUS_SUCCESS;
83 83
     }
84 84
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      *
88 88
      * @return $this
89 89
      */
90
-    public function wait () {
90
+    public function wait() {
91 91
         while (!$this->isDone()) {
92 92
             sleep(3);
93 93
             $this->reload();
Please login to merge, or discard this patch.
src/User/TaskList.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
30 30
         'workspace' => Workspace::class
31 31
     ];
32 32
 
33
-    final public function __toString (): string {
33
+    final public function __toString(): string {
34 34
         return "user_task_lists/{$this->getGid()}";
35 35
     }
36 36
 
37 37
     /**
38 38
      * @return Task[]
39 39
      */
40
-    public function getIncompleteTasks () {
40
+    public function getIncompleteTasks() {
41 41
         return $this->loadAll(Task::class, "{$this}/tasks", ['completed_since' => 'now']);
42 42
     }
43 43
 
@@ -46,14 +46,14 @@  discard block
 block discarded – undo
46 46
      *
47 47
      * @return ArrayIterator|Task[]
48 48
      */
49
-    public function getIterator () {
49
+    public function getIterator() {
50 50
         return new ArrayIterator($this->getTasks());
51 51
     }
52 52
 
53 53
     /**
54 54
      * @return Task[]
55 55
      */
56
-    public function getTasks () {
56
+    public function getTasks() {
57 57
         return $this->loadAll(Task::class, "{$this}/tasks");
58 58
     }
59 59
 }
60 60
\ No newline at end of file
Please login to merge, or discard this patch.
src/Tag.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,18 +31,18 @@
 block discarded – undo
31 31
         'workspace' => Workspace::class
32 32
     ];
33 33
 
34
-    final public function __toString (): string {
34
+    final public function __toString(): string {
35 35
         return "tags/{$this->getGid()}";
36 36
     }
37 37
 
38
-    final protected function _getDir (): string {
38
+    final protected function _getDir(): string {
39 39
         return 'tags';
40 40
     }
41 41
 
42 42
     /**
43 43
      * @return Task[]
44 44
      */
45
-    public function getTasks () {
45
+    public function getTasks() {
46 46
         return $this->loadAll(Task::class, "{$this}/tasks");
47 47
     }
48 48
 }
49 49
\ No newline at end of file
Please login to merge, or discard this patch.
src/CustomField.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -40,11 +40,11 @@  discard block
 block discarded – undo
40 40
         'enum_options' => [EnumOption::class],
41 41
     ];
42 42
 
43
-    final public function __toString (): string {
43
+    final public function __toString(): string {
44 44
         return "custom_fields/{$this->getGid()}";
45 45
     }
46 46
 
47
-    final protected function _getDir (): string {
47
+    final protected function _getDir(): string {
48 48
         return 'custom_fields';
49 49
     }
50 50
 
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
      * @param string $name
53 53
      * @return EnumOption
54 54
      */
55
-    public function addEnumOption (string $name) {
55
+    public function addEnumOption(string $name) {
56 56
         /** @var EnumOption $option */
57 57
         $option = $this->factory(EnumOption::class);
58 58
         $option->setName($name);
@@ -69,28 +69,28 @@  discard block
 block discarded – undo
69 69
     /**
70 70
      * @return bool
71 71
      */
72
-    public function hasNotificationsEnabled (): bool {
72
+    public function hasNotificationsEnabled(): bool {
73 73
         return $this->_is('has_notifications_enabled');
74 74
     }
75 75
 
76 76
     /**
77 77
      * @return bool
78 78
      */
79
-    public function isEnum (): bool {
79
+    public function isEnum(): bool {
80 80
         return $this->getResourceSubtype() === self::TYPE_ENUM;
81 81
     }
82 82
 
83 83
     /**
84 84
      * @return bool
85 85
      */
86
-    public function isGlobalToWorkspace (): bool {
86
+    public function isGlobalToWorkspace(): bool {
87 87
         return $this->_is('is_global_to_workspace');
88 88
     }
89 89
 
90 90
     /**
91 91
      * @return bool
92 92
      */
93
-    final public function isText (): bool {
93
+    final public function isText(): bool {
94 94
         return $this->getResourceSubtype() === self::TYPE_TEXT;
95 95
     }
96 96
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      * @param bool $flag
99 99
      * @return $this
100 100
      */
101
-    public function setGlobalToWorkspace (bool $flag) {
101
+    public function setGlobalToWorkspace(bool $flag) {
102 102
         return $this->_set('is_global_to_workspace', $flag);
103 103
     }
104 104
 
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
      * @param bool $flag
107 107
      * @return $this
108 108
      */
109
-    public function setNotificationsEnabled (bool $flag) {
109
+    public function setNotificationsEnabled(bool $flag) {
110 110
         return $this->_set('has_notifications_enabled', $flag);
111 111
     }
112 112
 
Please login to merge, or discard this patch.
src/Project/Status.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,23 +52,23 @@
 block discarded – undo
52 52
      * @param Project $project
53 53
      * @param array $data
54 54
      */
55
-    public function __construct (Project $project, array $data = []) {
55
+    public function __construct(Project $project, array $data = []) {
56 56
         parent::__construct($project, $data);
57 57
         $this->project = $project;
58 58
     }
59 59
 
60
-    final public function __toString (): string {
60
+    final public function __toString(): string {
61 61
         return "project_statuses/{$this->getGid()}";
62 62
     }
63 63
 
64
-    final protected function _getDir (): string {
64
+    final protected function _getDir(): string {
65 65
         return "{$this->project}/project_statuses";
66 66
     }
67 67
 
68 68
     /**
69 69
      * @return Project
70 70
      */
71
-    public function getProject () {
71
+    public function getProject() {
72 72
         return $this->project;
73 73
     }
74 74
 }
75 75
\ No newline at end of file
Please login to merge, or discard this patch.
src/Project/Section.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,18 +28,18 @@  discard block
 block discarded – undo
28 28
         'project' => Project::class
29 29
     ];
30 30
 
31
-    final public function __toString (): string {
31
+    final public function __toString(): string {
32 32
         return "sections/{$this->getGid()}";
33 33
     }
34 34
 
35
-    final protected function _getDir (): string {
35
+    final protected function _getDir(): string {
36 36
         return "{$this->getProject()}/sections";
37 37
     }
38 38
 
39 39
     /**
40 40
      * @return Task[]
41 41
      */
42
-    public function getTasks () {
42
+    public function getTasks() {
43 43
         return $this->loadAll(Task::class, 'tasks', ['section' => $this->getGid()]);
44 44
     }
45 45
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
      * @depends after-create
50 50
      * @return Task
51 51
      */
52
-    public function newTask () {
52
+    public function newTask() {
53 53
         /** @var Task $task */
54 54
         $task = $this->factory(Task::class);
55 55
         return $task->addToProject($this);
Please login to merge, or discard this patch.