@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | { |
| 70 | 70 | $response = $this->authenticate($hostname, $client_id, $client_secret, $username, $password, $handler); |
| 71 | 71 | |
| 72 | - if (! isset($response['access_token']) || ! isset($response['subdomain'])) { |
|
| 72 | + if (!isset($response['access_token']) || !isset($response['subdomain'])) { |
|
| 73 | 73 | throw new Exception("Incorrect response from Authentication: 'access_token' or 'subdomain' is missing."); |
| 74 | 74 | } |
| 75 | 75 | |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | 'method' => $method, |
| 336 | 336 | 'raw' => $raw, |
| 337 | 337 | 'fileName' => basename($filename), |
| 338 | - 'fileSize' => $stream == null ? filesize($filename): fstat($stream)['size'], |
|
| 338 | + 'fileSize' => $stream == null ? filesize($filename) : fstat($stream)['size'], |
|
| 339 | 339 | 'canResume' => false, |
| 340 | 340 | 'startOver' => false, |
| 341 | 341 | 'unzip' => $unzip, |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | |
| 411 | 411 | // First Chunk |
| 412 | 412 | $data = $this->readChunk($stream, $chunkSize); |
| 413 | - while (! ((strlen($data) < $chunkSize) || feof($stream))) { |
|
| 413 | + while (!((strlen($data) < $chunkSize) || feof($stream))) { |
|
| 414 | 414 | $parameters = $this->buildHttpQuery( |
| 415 | 415 | [ |
| 416 | 416 | 'index' => $index, |
@@ -507,7 +507,7 @@ discard block |
||
| 507 | 507 | */ |
| 508 | 508 | public function getItemAccessControls(string $itemId, string $userId = ''):array |
| 509 | 509 | { |
| 510 | - if (! empty($userId)) { |
|
| 510 | + if (!empty($userId)) { |
|
| 511 | 511 | return $this->get("AccessControls(principalid={$userId},itemid={$itemId})"); |
| 512 | 512 | } else { |
| 513 | 513 | return $this->get("Items({$itemId})/AccessControls"); |
@@ -625,7 +625,7 @@ discard block |
||
| 625 | 625 | ] |
| 626 | 626 | ); |
| 627 | 627 | |
| 628 | - return (string)$response->getBody(); |
|
| 628 | + return (string) $response->getBody(); |
|
| 629 | 629 | } |
| 630 | 630 | |
| 631 | 631 | /** |
@@ -642,7 +642,7 @@ discard block |
||
| 642 | 642 | protected function readChunk($stream, int $chunkSize) |
| 643 | 643 | { |
| 644 | 644 | $chunk = ''; |
| 645 | - while (! feof($stream) && $chunkSize > 0) { |
|
| 645 | + while (!feof($stream) && $chunkSize > 0) { |
|
| 646 | 646 | $part = fread($stream, $chunkSize); |
| 647 | 647 | if ($part === false) { |
| 648 | 648 | throw new Exception('Error reading from $stream.'); |
@@ -681,8 +681,8 @@ discard block |
||
| 681 | 681 | { |
| 682 | 682 | return http_build_query( |
| 683 | 683 | array_map( |
| 684 | - function ($parameter) { |
|
| 685 | - if (! is_bool($parameter)) { |
|
| 684 | + function($parameter) { |
|
| 685 | + if (!is_bool($parameter)) { |
|
| 686 | 686 | return $parameter; |
| 687 | 687 | } |
| 688 | 688 | |
@@ -702,7 +702,7 @@ discard block |
||
| 702 | 702 | */ |
| 703 | 703 | protected function jsonValidator($data = null):bool |
| 704 | 704 | { |
| 705 | - if (! empty($data)) { |
|
| 705 | + if (!empty($data)) { |
|
| 706 | 706 | @json_decode($data); |
| 707 | 707 | |
| 708 | 708 | return json_last_error() === JSON_ERROR_NONE; |