@@ -319,6 +319,9 @@ |
||
| 319 | 319 | return (new PulseGroup($groupResult)); |
| 320 | 320 | } |
| 321 | 321 | |
| 322 | + /** |
|
| 323 | + * @param boolean $showArchived |
|
| 324 | + */ |
|
| 322 | 325 | private function fetchGroups ($showArchived) |
| 323 | 326 | { |
| 324 | 327 | $url = sprintf("%s/%s/groups.json", parent::apiEndpoint(), $this->getId()); |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | * @since 0.1.0 |
| 115 | 115 | * @return string |
| 116 | 116 | */ |
| 117 | - public function getUrl() |
|
| 117 | + public function getUrl () |
|
| 118 | 118 | { |
| 119 | 119 | return $this->url; |
| 120 | 120 | } |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | * @since 0.1.0 |
| 127 | 127 | * @return int |
| 128 | 128 | */ |
| 129 | - public function getId() |
|
| 129 | + public function getId () |
|
| 130 | 130 | { |
| 131 | 131 | return $this->id; |
| 132 | 132 | } |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | * @since 0.1.0 |
| 139 | 139 | * @return string |
| 140 | 140 | */ |
| 141 | - public function getName() |
|
| 141 | + public function getName () |
|
| 142 | 142 | { |
| 143 | 143 | return $this->name; |
| 144 | 144 | } |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | * @since 0.1.0 |
| 151 | 151 | * @return string |
| 152 | 152 | */ |
| 153 | - public function getDescription() |
|
| 153 | + public function getDescription () |
|
| 154 | 154 | { |
| 155 | 155 | return $this->description; |
| 156 | 156 | } |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | * @since 0.1.0 |
| 163 | 163 | * @return PulseColumn[] |
| 164 | 164 | */ |
| 165 | - public function getColumns() |
|
| 165 | + public function getColumns () |
|
| 166 | 166 | { |
| 167 | 167 | self::lazyInject($this->columns, array( |
| 168 | 168 | "board_id" => $this->getId() |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | * @since 0.1.0 |
| 180 | 180 | * @return \DateTime |
| 181 | 181 | */ |
| 182 | - public function getCreatedAt() |
|
| 182 | + public function getCreatedAt () |
|
| 183 | 183 | { |
| 184 | 184 | self::lazyLoad($this->created_at, "DateTime"); |
| 185 | 185 | |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | * @since 0.1.0 |
| 194 | 194 | * @return \DateTime |
| 195 | 195 | */ |
| 196 | - public function getUpdatedAt() |
|
| 196 | + public function getUpdatedAt () |
|
| 197 | 197 | { |
| 198 | 198 | self::lazyLoad($this->updated_at, "DateTime"); |
| 199 | 199 | |
@@ -398,7 +398,7 @@ |
||
| 398 | 398 | $this->deletedObject = true; |
| 399 | 399 | } |
| 400 | 400 | |
| 401 | - public static function createBoard ($name, $user_id, $description = NULL) |
|
| 401 | + public static function createBoard ($name, $user_id, $description = null) |
|
| 402 | 402 | { |
| 403 | 403 | $url = sprintf("%s.json", parent::apiEndpoint()); |
| 404 | 404 | $postParams = array( |
@@ -69,6 +69,9 @@ |
||
| 69 | 69 | $this->deletedObject = true; |
| 70 | 70 | } |
| 71 | 71 | |
| 72 | + /** |
|
| 73 | + * @param string $field |
|
| 74 | + */ |
|
| 72 | 75 | private function editField ($field, $value) |
| 73 | 76 | { |
| 74 | 77 | $this->checkInvalid(); |
@@ -233,7 +233,7 @@ |
||
| 233 | 233 | * |
| 234 | 234 | * @throws \allejo\DaPulse\Exceptions\CurlException If cURL is misconfigured or encounters an error |
| 235 | 235 | * |
| 236 | - * @return mixed |
|
| 236 | + * @return string |
|
| 237 | 237 | */ |
| 238 | 238 | private function executeCurl () |
| 239 | 239 | { |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | * |
| 71 | 71 | * @return string |
| 72 | 72 | */ |
| 73 | - public function getType() |
|
| 73 | + public function getType () |
|
| 74 | 74 | { |
| 75 | 75 | return $this->type; |
| 76 | 76 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | * |
| 81 | 81 | * @return string |
| 82 | 82 | */ |
| 83 | - public function getId() |
|
| 83 | + public function getId () |
|
| 84 | 84 | { |
| 85 | 85 | return $this->id; |
| 86 | 86 | } |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | * |
| 91 | 91 | * @return string |
| 92 | 92 | */ |
| 93 | - public function getTitle() |
|
| 93 | + public function getTitle () |
|
| 94 | 94 | { |
| 95 | 95 | return $this->title; |
| 96 | 96 | } |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | * |
| 101 | 101 | * @return string |
| 102 | 102 | */ |
| 103 | - public function getProjectId() |
|
| 103 | + public function getProjectId () |
|
| 104 | 104 | { |
| 105 | 105 | return $this->project_id; |
| 106 | 106 | } |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | * |
| 111 | 111 | * @return string |
| 112 | 112 | */ |
| 113 | - public function getPermissions() |
|
| 113 | + public function getPermissions () |
|
| 114 | 114 | { |
| 115 | 115 | return $this->permissions; |
| 116 | 116 | } |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | * |
| 121 | 121 | * @return string |
| 122 | 122 | */ |
| 123 | - public function getContent() |
|
| 123 | + public function getContent () |
|
| 124 | 124 | { |
| 125 | 125 | return $this->content; |
| 126 | 126 | } |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | * |
| 131 | 131 | * @return \DateTime |
| 132 | 132 | */ |
| 133 | - public function getCreatedAt() |
|
| 133 | + public function getCreatedAt () |
|
| 134 | 134 | { |
| 135 | 135 | return $this->created_at; |
| 136 | 136 | } |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | * |
| 141 | 141 | * @return \DateTime |
| 142 | 142 | */ |
| 143 | - public function getUpdatedAt() |
|
| 143 | + public function getUpdatedAt () |
|
| 144 | 144 | { |
| 145 | 145 | return $this->updated_at; |
| 146 | 146 | } |
@@ -48,14 +48,14 @@ discard block |
||
| 48 | 48 | * |
| 49 | 49 | * @internal |
| 50 | 50 | */ |
| 51 | - const API_VERSION = "v1"; |
|
| 51 | + const API_VERSION = "v1"; |
|
| 52 | 52 | |
| 53 | 53 | /** |
| 54 | 54 | * The suffix that is appended to the URL to access functionality for certain objects |
| 55 | 55 | * |
| 56 | 56 | * @internal |
| 57 | 57 | */ |
| 58 | - const API_PREFIX = ""; |
|
| 58 | + const API_PREFIX = ""; |
|
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | 61 | * The API key used to make the URL calls |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | */ |
| 134 | 134 | protected function assignResults () |
| 135 | 135 | { |
| 136 | - foreach($this->jsonResponse as $key => $val) |
|
| 136 | + foreach ($this->jsonResponse as $key => $val) |
|
| 137 | 137 | { |
| 138 | 138 | if (property_exists(get_called_class(), $key)) |
| 139 | 139 | { |
@@ -387,7 +387,7 @@ |
||
| 387 | 387 | * |
| 388 | 388 | * @return string The base URL to call |
| 389 | 389 | */ |
| 390 | - protected static function apiEndpoint ($apiPrefix = NULL) |
|
| 390 | + protected static function apiEndpoint ($apiPrefix = null) |
|
| 391 | 391 | { |
| 392 | 392 | $apiSection = isset($apiPrefix) ? $apiPrefix : static::API_PREFIX; |
| 393 | 393 | |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | * |
| 97 | 97 | * @return PulseUser |
| 98 | 98 | */ |
| 99 | - public function getUser() |
|
| 99 | + public function getUser () |
|
| 100 | 100 | { |
| 101 | 101 | self::lazyLoad($this->user, "PulseUser"); |
| 102 | 102 | |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | * |
| 109 | 109 | * @return string |
| 110 | 110 | */ |
| 111 | - public function getUrl() |
|
| 111 | + public function getUrl () |
|
| 112 | 112 | { |
| 113 | 113 | return $this->url; |
| 114 | 114 | } |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | * |
| 119 | 119 | * @return string |
| 120 | 120 | */ |
| 121 | - public function getId() |
|
| 121 | + public function getId () |
|
| 122 | 122 | { |
| 123 | 123 | return $this->id; |
| 124 | 124 | } |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | * |
| 129 | 129 | * @return string |
| 130 | 130 | */ |
| 131 | - public function getBody() |
|
| 131 | + public function getBody () |
|
| 132 | 132 | { |
| 133 | 133 | return $this->body; |
| 134 | 134 | } |
@@ -138,7 +138,7 @@ discard block |
||
| 138 | 138 | * |
| 139 | 139 | * @return string |
| 140 | 140 | */ |
| 141 | - public function getBodyText() |
|
| 141 | + public function getBodyText () |
|
| 142 | 142 | { |
| 143 | 143 | return $this->body_text; |
| 144 | 144 | } |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | * |
| 149 | 149 | * @return static[] |
| 150 | 150 | */ |
| 151 | - public function getReplies() |
|
| 151 | + public function getReplies () |
|
| 152 | 152 | { |
| 153 | 153 | self::lazyArray($this->replies, "PulseUpdate"); |
| 154 | 154 | |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | * |
| 161 | 161 | * @return string |
| 162 | 162 | */ |
| 163 | - public function getKind() |
|
| 163 | + public function getKind () |
|
| 164 | 164 | { |
| 165 | 165 | return $this->kind; |
| 166 | 166 | } |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | * |
| 171 | 171 | * @return string |
| 172 | 172 | */ |
| 173 | - public function getHasAssets() |
|
| 173 | + public function getHasAssets () |
|
| 174 | 174 | { |
| 175 | 175 | return $this->has_assets; |
| 176 | 176 | } |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | * |
| 181 | 181 | * @return string |
| 182 | 182 | */ |
| 183 | - public function getAssets() |
|
| 183 | + public function getAssets () |
|
| 184 | 184 | { |
| 185 | 185 | return $this->assets; |
| 186 | 186 | } |
@@ -190,7 +190,7 @@ discard block |
||
| 190 | 190 | * |
| 191 | 191 | * @return array |
| 192 | 192 | */ |
| 193 | - public function getWatcherIds() |
|
| 193 | + public function getWatcherIds () |
|
| 194 | 194 | { |
| 195 | 195 | return $this->watched; |
| 196 | 196 | } |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | * |
| 201 | 201 | * @return \DateTime |
| 202 | 202 | */ |
| 203 | - public function getCreatedAt() |
|
| 203 | + public function getCreatedAt () |
|
| 204 | 204 | { |
| 205 | 205 | return $this->created_at; |
| 206 | 206 | } |
@@ -210,7 +210,7 @@ discard block |
||
| 210 | 210 | * |
| 211 | 211 | * @return \DateTime |
| 212 | 212 | */ |
| 213 | - public function getUpdatedAt() |
|
| 213 | + public function getUpdatedAt () |
|
| 214 | 214 | { |
| 215 | 215 | return $this->updated_at; |
| 216 | 216 | } |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | * |
| 113 | 113 | * @return string |
| 114 | 114 | */ |
| 115 | - public function getUrl() |
|
| 115 | + public function getUrl () |
|
| 116 | 116 | { |
| 117 | 117 | return $this->url; |
| 118 | 118 | } |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | * |
| 123 | 123 | * @return int |
| 124 | 124 | */ |
| 125 | - public function getId() |
|
| 125 | + public function getId () |
|
| 126 | 126 | { |
| 127 | 127 | return $this->id; |
| 128 | 128 | } |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | * |
| 133 | 133 | * @return string |
| 134 | 134 | */ |
| 135 | - public function getName() |
|
| 135 | + public function getName () |
|
| 136 | 136 | { |
| 137 | 137 | return $this->name; |
| 138 | 138 | } |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | * |
| 143 | 143 | * @return string |
| 144 | 144 | */ |
| 145 | - public function getEmail() |
|
| 145 | + public function getEmail () |
|
| 146 | 146 | { |
| 147 | 147 | return $this->email; |
| 148 | 148 | } |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | * |
| 153 | 153 | * @return string |
| 154 | 154 | */ |
| 155 | - public function getPhotoUrl() |
|
| 155 | + public function getPhotoUrl () |
|
| 156 | 156 | { |
| 157 | 157 | return $this->photo_url; |
| 158 | 158 | } |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | * |
| 163 | 163 | * @return string |
| 164 | 164 | */ |
| 165 | - public function getTitle() |
|
| 165 | + public function getTitle () |
|
| 166 | 166 | { |
| 167 | 167 | return $this->title; |
| 168 | 168 | } |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | * |
| 173 | 173 | * @return string |
| 174 | 174 | */ |
| 175 | - public function getPosition() |
|
| 175 | + public function getPosition () |
|
| 176 | 176 | { |
| 177 | 177 | return $this->position; |
| 178 | 178 | } |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | * |
| 183 | 183 | * @return string |
| 184 | 184 | */ |
| 185 | - public function getPhone() |
|
| 185 | + public function getPhone () |
|
| 186 | 186 | { |
| 187 | 187 | return $this->phone; |
| 188 | 188 | } |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | * |
| 193 | 193 | * @return string |
| 194 | 194 | */ |
| 195 | - public function getLocation() |
|
| 195 | + public function getLocation () |
|
| 196 | 196 | { |
| 197 | 197 | return $this->location; |
| 198 | 198 | } |
@@ -202,7 +202,7 @@ discard block |
||
| 202 | 202 | * |
| 203 | 203 | * @return string |
| 204 | 204 | */ |
| 205 | - public function getStatus() |
|
| 205 | + public function getStatus () |
|
| 206 | 206 | { |
| 207 | 207 | return $this->status; |
| 208 | 208 | } |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | * |
| 213 | 213 | * @return string |
| 214 | 214 | */ |
| 215 | - public function getBirthday() |
|
| 215 | + public function getBirthday () |
|
| 216 | 216 | { |
| 217 | 217 | return $this->birthday; |
| 218 | 218 | } |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | * |
| 223 | 223 | * @return bool |
| 224 | 224 | */ |
| 225 | - public function getIsGuest() |
|
| 225 | + public function getIsGuest () |
|
| 226 | 226 | { |
| 227 | 227 | return $this->is_guest; |
| 228 | 228 | } |
@@ -232,7 +232,7 @@ discard block |
||
| 232 | 232 | * |
| 233 | 233 | * @return string[] |
| 234 | 234 | */ |
| 235 | - public function getSkills() |
|
| 235 | + public function getSkills () |
|
| 236 | 236 | { |
| 237 | 237 | return $this->skills; |
| 238 | 238 | } |
@@ -242,7 +242,7 @@ discard block |
||
| 242 | 242 | * |
| 243 | 243 | * @return \DateTime |
| 244 | 244 | */ |
| 245 | - public function getCreatedAt() |
|
| 245 | + public function getCreatedAt () |
|
| 246 | 246 | { |
| 247 | 247 | return $this->created_at; |
| 248 | 248 | } |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | * |
| 253 | 253 | * @return \DateTime |
| 254 | 254 | */ |
| 255 | - public function getUpdatedAt() |
|
| 255 | + public function getUpdatedAt () |
|
| 256 | 256 | { |
| 257 | 257 | return $this->updated_at; |
| 258 | 258 | } |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | protected $pulse_id; |
| 19 | 19 | protected $column_value; |
| 20 | 20 | |
| 21 | - public function __construct($array) |
|
| 21 | + public function __construct ($array) |
|
| 22 | 22 | { |
| 23 | 23 | $this->arrayConstructionOnly = true; |
| 24 | 24 | |
@@ -45,6 +45,6 @@ discard block |
||
| 45 | 45 | throw new InvalidObjectException("'$type' is an unsupported column type to modify."); |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - abstract public function getValue(); |
|
| 49 | - abstract public function updateValue($updateValue); |
|
| 48 | + abstract public function getValue (); |
|
| 49 | + abstract public function updateValue ($updateValue); |
|
| 50 | 50 | } |
| 51 | 51 | \ No newline at end of file |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | * |
| 137 | 137 | * @return string |
| 138 | 138 | */ |
| 139 | - public function getUrl() |
|
| 139 | + public function getUrl () |
|
| 140 | 140 | { |
| 141 | 141 | return $this->url; |
| 142 | 142 | } |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | * |
| 147 | 147 | * @return int |
| 148 | 148 | */ |
| 149 | - public function getId() |
|
| 149 | + public function getId () |
|
| 150 | 150 | { |
| 151 | 151 | return $this->id; |
| 152 | 152 | } |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | * |
| 157 | 157 | * @return string |
| 158 | 158 | */ |
| 159 | - public function getName() |
|
| 159 | + public function getName () |
|
| 160 | 160 | { |
| 161 | 161 | return $this->name; |
| 162 | 162 | } |
@@ -166,7 +166,7 @@ discard block |
||
| 166 | 166 | * |
| 167 | 167 | * @return int |
| 168 | 168 | */ |
| 169 | - public function getUpdatesCount() |
|
| 169 | + public function getUpdatesCount () |
|
| 170 | 170 | { |
| 171 | 171 | return $this->updates_count; |
| 172 | 172 | } |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | * |
| 177 | 177 | * @return int |
| 178 | 178 | */ |
| 179 | - public function getBoardId() |
|
| 179 | + public function getBoardId () |
|
| 180 | 180 | { |
| 181 | 181 | return $this->board_id; |
| 182 | 182 | } |
@@ -186,7 +186,7 @@ discard block |
||
| 186 | 186 | * |
| 187 | 187 | * @return \DateTime |
| 188 | 188 | */ |
| 189 | - public function getCreatedAt() |
|
| 189 | + public function getCreatedAt () |
|
| 190 | 190 | { |
| 191 | 191 | return $this->created_at; |
| 192 | 192 | } |
@@ -196,7 +196,7 @@ discard block |
||
| 196 | 196 | * |
| 197 | 197 | * @return \DateTime |
| 198 | 198 | */ |
| 199 | - public function getUpdatedAt() |
|
| 199 | + public function getUpdatedAt () |
|
| 200 | 200 | { |
| 201 | 201 | return $this->updated_at; |
| 202 | 202 | } |
@@ -407,7 +407,7 @@ |
||
| 407 | 407 | * @since 0.1.0 |
| 408 | 408 | * @return PulseNote |
| 409 | 409 | */ |
| 410 | - public function addNote ($title, $content, $owners_only = false, $user_id = NULL, $create_update = false) |
|
| 410 | + public function addNote ($title, $content, $owners_only = false, $user_id = null, $create_update = false) |
|
| 411 | 411 | { |
| 412 | 412 | $url = sprintf($this->urlSyntax, parent::apiEndpoint(), $this->id, "notes"); |
| 413 | 413 | $postParams = array( |