@@ -25,7 +25,7 @@ |
||
| 25 | 25 | return (isset($this->apiToken)); |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | - public function getApiToken() |
|
| 28 | + public function getApiToken () |
|
| 29 | 29 | { |
| 30 | 30 | return $this->apiToken; |
| 31 | 31 | } |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | public function __construct ($url, $urlParams) |
| 58 | 58 | { |
| 59 | - $this->url = $url . "?" . self::formatParameters($urlParams); |
|
| 59 | + $this->url = $url."?".self::formatParameters($urlParams); |
|
| 60 | 60 | $this->cURL = curl_init(); |
| 61 | 61 | |
| 62 | 62 | $this->configureCurl(); |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | curl_setopt_array($this->cURL, array( |
| 91 | 91 | CURLOPT_HTTPAUTH => CURLAUTH_BASIC, |
| 92 | - CURLOPT_USERPWD => $username . ":" . $password |
|
| 92 | + CURLOPT_USERPWD => $username.":".$password |
|
| 93 | 93 | )); |
| 94 | 94 | } |
| 95 | 95 | |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | continue; |
| 310 | 310 | } |
| 311 | 311 | |
| 312 | - $parameters[] = rawurlencode($key) . "=" . rawurlencode($value); |
|
| 312 | + $parameters[] = rawurlencode($key)."=".rawurlencode($value); |
|
| 313 | 313 | } |
| 314 | 314 | |
| 315 | 315 | return implode("&", $parameters); |
@@ -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); |
@@ -274,7 +274,7 @@ |
||
| 274 | 274 | * @param string $title |
| 275 | 275 | * @since 0.1.0 |
| 276 | 276 | */ |
| 277 | - public function editName($title) |
|
| 277 | + public function editName ($title) |
|
| 278 | 278 | { |
| 279 | 279 | $this->jsonResponse = self::editPulseNameCall($this->getId(), $title); |
| 280 | 280 | $this->assignResults(); |
@@ -151,12 +151,12 @@ discard block |
||
| 151 | 151 | /** |
| 152 | 152 | * {@inheritdoc} |
| 153 | 153 | */ |
| 154 | - public function jsonSerialize() |
|
| 154 | + public function jsonSerialize () |
|
| 155 | 155 | { |
| 156 | 156 | return $this->jsonResponse; |
| 157 | 157 | } |
| 158 | 158 | |
| 159 | - protected function lazyLoad() |
|
| 159 | + protected function lazyLoad () |
|
| 160 | 160 | { |
| 161 | 161 | if (empty($this->jsonResponse)) |
| 162 | 162 | { |
@@ -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 | } |
@@ -351,7 +351,7 @@ discard block |
||
| 351 | 351 | */ |
| 352 | 352 | final protected static function lazyCastNeeded ($target, $objectType) |
| 353 | 353 | { |
| 354 | - $objectDefinition = ($objectType[0] === "\\") ? $objectType : self::OBJ_NAMESPACE . $objectType; |
|
| 354 | + $objectDefinition = ($objectType[0] === "\\") ? $objectType : self::OBJ_NAMESPACE.$objectType; |
|
| 355 | 355 | |
| 356 | 356 | return !($target instanceof $objectDefinition); |
| 357 | 357 | } |
@@ -388,7 +388,7 @@ discard block |
||
| 388 | 388 | */ |
| 389 | 389 | final protected static function castArrayToObjectArray ($className, $objects) |
| 390 | 390 | { |
| 391 | - $class = self::OBJ_NAMESPACE . $className; |
|
| 391 | + $class = self::OBJ_NAMESPACE.$className; |
|
| 392 | 392 | $array = array(); |
| 393 | 393 | |
| 394 | 394 | foreach ($objects as $post) |
@@ -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 | /** |