@@ -40,11 +40,11 @@ discard block |
||
| 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 | |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | * @param string $name |
| 57 | 57 | * @return EnumOption |
| 58 | 58 | */ |
| 59 | - public function addEnumOption (string $name) { |
|
| 59 | + public function addEnumOption(string $name) { |
|
| 60 | 60 | /** @var EnumOption $option */ |
| 61 | 61 | $option = $this->_factory(EnumOption::class); |
| 62 | 62 | $option->setName($name); |
@@ -72,35 +72,35 @@ discard block |
||
| 72 | 72 | /** |
| 73 | 73 | * @return bool |
| 74 | 74 | */ |
| 75 | - public function hasNotificationsEnabled (): bool { |
|
| 75 | + public function hasNotificationsEnabled(): bool { |
|
| 76 | 76 | return $this->_is('has_notifications_enabled'); |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | /** |
| 80 | 80 | * @return bool |
| 81 | 81 | */ |
| 82 | - final public function isEnum (): bool { |
|
| 82 | + final public function isEnum(): bool { |
|
| 83 | 83 | return $this->getResourceSubtype() === self::TYPE_ENUM; |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | /** |
| 87 | 87 | * @return bool |
| 88 | 88 | */ |
| 89 | - public function isGlobalToWorkspace (): bool { |
|
| 89 | + public function isGlobalToWorkspace(): bool { |
|
| 90 | 90 | return $this->_is('is_global_to_workspace'); |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | 93 | /** |
| 94 | 94 | * @return bool |
| 95 | 95 | */ |
| 96 | - final public function isNumber (): bool { |
|
| 96 | + final public function isNumber(): bool { |
|
| 97 | 97 | return $this->getResourceSubtype() === self::TYPE_NUMBER; |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | /** |
| 101 | 101 | * @return bool |
| 102 | 102 | */ |
| 103 | - final public function isText (): bool { |
|
| 103 | + final public function isText(): bool { |
|
| 104 | 104 | return $this->getResourceSubtype() === self::TYPE_TEXT; |
| 105 | 105 | } |
| 106 | 106 | |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | * @param bool $flag |
| 109 | 109 | * @return $this |
| 110 | 110 | */ |
| 111 | - public function setGlobalToWorkspace (bool $flag) { |
|
| 111 | + public function setGlobalToWorkspace(bool $flag) { |
|
| 112 | 112 | return $this->_set('is_global_to_workspace', $flag); |
| 113 | 113 | } |
| 114 | 114 | |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | * @param bool $flag |
| 117 | 117 | * @return $this |
| 118 | 118 | */ |
| 119 | - public function setNotificationsEnabled (bool $flag) { |
|
| 119 | + public function setNotificationsEnabled(bool $flag) { |
|
| 120 | 120 | return $this->_set('has_notifications_enabled', $flag); |
| 121 | 121 | } |
| 122 | 122 | |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | * @param callable $cmp `fn( EnumOption $a, EnumOption $b ): int` |
| 125 | 125 | * @return $this |
| 126 | 126 | */ |
| 127 | - public function sortEnumOptions (callable $cmp) { |
|
| 127 | + public function sortEnumOptions(callable $cmp) { |
|
| 128 | 128 | if ($options = $this->getEnumOptions()) { |
| 129 | 129 | $prev = $options[0]; // first option on remote |
| 130 | 130 | usort($options, $cmp); |
@@ -30,11 +30,11 @@ discard block |
||
| 30 | 30 | 'project' => Project::class |
| 31 | 31 | ]; |
| 32 | 32 | |
| 33 | - final public function __toString (): string { |
|
| 33 | + final public function __toString(): string { |
|
| 34 | 34 | return "sections/{$this->getGid()}"; |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | - final protected function _getDir (): string { |
|
| 37 | + final protected function _getDir(): string { |
|
| 38 | 38 | return "{$this->getProject()}/sections"; |
| 39 | 39 | } |
| 40 | 40 | |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | * @param array $filter |
| 43 | 43 | * @return Traversable|Task[] |
| 44 | 44 | */ |
| 45 | - public function getIterator (array $filter = []) { |
|
| 45 | + public function getIterator(array $filter = []) { |
|
| 46 | 46 | $filter['section'] = $this->getGid(); |
| 47 | 47 | return $this->_loadEach(Task::class, 'tasks', $filter); |
| 48 | 48 | } |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | * @param array $filter |
| 52 | 52 | * @return Task[] |
| 53 | 53 | */ |
| 54 | - public function getTasks (array $filter = []) { |
|
| 54 | + public function getTasks(array $filter = []) { |
|
| 55 | 55 | return iterator_to_array($this->getIterator($filter)); |
| 56 | 56 | } |
| 57 | 57 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | * @depends after-create |
| 62 | 62 | * @return Task |
| 63 | 63 | */ |
| 64 | - public function newTask () { |
|
| 64 | + public function newTask() { |
|
| 65 | 65 | /** @var Task $task */ |
| 66 | 66 | $task = $this->_factory(Task::class); |
| 67 | 67 | return $task->addToProject($this->getProject(), $this); |