@@ -1,8 +1,8 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -$auth = json_decode(file_get_contents(__DIR__ . '/../phpunit-auth.json'), true); |
|
4 | -$findAndReplace = json_decode(file_get_contents(__DIR__ . '/sanitize-values.json'), true); |
|
5 | -$fixtures = file_get_contents(__DIR__ . '/fixtures/PhpPulseVCR'); |
|
3 | +$auth = json_decode(file_get_contents(__DIR__.'/../phpunit-auth.json'), true); |
|
4 | +$findAndReplace = json_decode(file_get_contents(__DIR__.'/sanitize-values.json'), true); |
|
5 | +$fixtures = file_get_contents(__DIR__.'/fixtures/PhpPulseVCR'); |
|
6 | 6 | |
7 | 7 | $sanitized = str_replace($auth['apiToken'], 'YourApiKeyHere', $fixtures); |
8 | 8 | |
@@ -11,4 +11,4 @@ discard block |
||
11 | 11 | $sanitized = str_replace($key, $value, $sanitized); |
12 | 12 | } |
13 | 13 | |
14 | -file_put_contents(__DIR__ . '/fixtures/PhpPulseVCR-sanitized', $sanitized); |
|
15 | 14 | \ No newline at end of file |
15 | +file_put_contents(__DIR__.'/fixtures/PhpPulseVCR-sanitized', $sanitized); |
|
16 | 16 | \ No newline at end of file |
@@ -56,7 +56,7 @@ |
||
56 | 56 | $url = sprintf("%s/%d/columns/%s/text.json", self::apiEndpoint(), $this->board_id, $this->column_id); |
57 | 57 | $postParams = array( |
58 | 58 | "pulse_id" => $this->pulse_id, |
59 | - "text" => (string)$text |
|
59 | + "text" => (string) $text |
|
60 | 60 | ); |
61 | 61 | |
62 | 62 | $result = self::sendPut($url, $postParams); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | * |
123 | 123 | * @api |
124 | 124 | * @since 0.1.0 |
125 | - * @return string |
|
125 | + * @return integer |
|
126 | 126 | */ |
127 | 127 | public function getId () |
128 | 128 | { |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | * |
299 | 299 | * @since 0.3.0 Previously was available as 'getHasAssets()' |
300 | 300 | * |
301 | - * @return bool |
|
301 | + * @return string |
|
302 | 302 | */ |
303 | 303 | public function hasAssets () |
304 | 304 | { |
@@ -448,7 +448,7 @@ discard block |
||
448 | 448 | * @api |
449 | 449 | * |
450 | 450 | * @param int|PulseUser $user The author of this post |
451 | - * @param int|Pulse $pulse The Pulse to whom this update will belong to |
|
451 | + * @param integer $pulse The Pulse to whom this update will belong to |
|
452 | 452 | * @param string $text The content of the update |
453 | 453 | * @param null|bool $announceToAll Whether or not to announce this update to everyone's wall |
454 | 454 | * |
@@ -50,12 +50,12 @@ |
||
50 | 50 | |
51 | 51 | public function isArchived () |
52 | 52 | { |
53 | - return (bool)$this->archived; |
|
53 | + return (bool) $this->archived; |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | public function isDeleted () |
57 | 57 | { |
58 | - return (bool)$this->deleted; |
|
58 | + return (bool) $this->deleted; |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | * |
107 | 107 | * @since 0.1.0 |
108 | 108 | * |
109 | - * @return string |
|
109 | + * @return integer |
|
110 | 110 | */ |
111 | 111 | public function getId () |
112 | 112 | { |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | * |
213 | 213 | * @param null|string $title The new title of the note |
214 | 214 | * @param null|string $content The new content of the note |
215 | - * @param null|int|PulseUser $user The new author of the note |
|
215 | + * @param string $user The new author of the note |
|
216 | 216 | * @param null|bool $createUpdate Whether to create an update or not |
217 | 217 | * |
218 | 218 | * @since 0.1.0 |
@@ -315,7 +315,7 @@ discard block |
||
315 | 315 | { |
316 | 316 | if (self::lazyCastNeeded($target, $objectType)) |
317 | 317 | { |
318 | - $object = ($objectType[0] == "\\") ? $objectType : self::OBJ_NAMESPACE . $objectType; |
|
318 | + $object = ($objectType[0] == "\\") ? $objectType : self::OBJ_NAMESPACE.$objectType; |
|
319 | 319 | $target = new $object($target); |
320 | 320 | } |
321 | 321 | } |
@@ -354,7 +354,7 @@ discard block |
||
354 | 354 | */ |
355 | 355 | final protected static function lazyCastNeeded ($target, $objectType) |
356 | 356 | { |
357 | - $objectDefinition = ($objectType[0] === "\\") ? $objectType : self::OBJ_NAMESPACE . $objectType; |
|
357 | + $objectDefinition = ($objectType[0] === "\\") ? $objectType : self::OBJ_NAMESPACE.$objectType; |
|
358 | 358 | |
359 | 359 | return !($target instanceof $objectDefinition); |
360 | 360 | } |
@@ -391,7 +391,7 @@ discard block |
||
391 | 391 | */ |
392 | 392 | final protected static function castArrayToObjectArray ($className, $objects) |
393 | 393 | { |
394 | - $class = self::OBJ_NAMESPACE . $className; |
|
394 | + $class = self::OBJ_NAMESPACE.$className; |
|
395 | 395 | $array = []; |
396 | 396 | |
397 | 397 | foreach ($objects as $post) |
@@ -124,7 +124,7 @@ |
||
124 | 124 | |
125 | 125 | if ($this->arrayConstructionOnly && !is_array($idOrArray)) |
126 | 126 | { |
127 | - throw new \InvalidArgumentException("A $staticClass cannot be fetched from an ID."); |
|
127 | + throw new \InvalidArgumentException("a $staticClass cannot be fetched from an ID."); |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | $this->initializeValues(); |