@@ -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 | |
@@ -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, |
@@ -506,7 +506,7 @@ discard block |
||
| 506 | 506 | */ |
| 507 | 507 | public function getItemAccessControls(string $itemId, string $userId = ''):array |
| 508 | 508 | { |
| 509 | - if (! empty($userId)) { |
|
| 509 | + if (!empty($userId)) { |
|
| 510 | 510 | return $this->get("AccessControls(principalid={$userId},itemid={$itemId})"); |
| 511 | 511 | } else { |
| 512 | 512 | return $this->get("Items({$itemId})/AccessControls"); |
@@ -641,7 +641,7 @@ discard block |
||
| 641 | 641 | protected function readChunk($stream, int $chunkSize) |
| 642 | 642 | { |
| 643 | 643 | $chunk = ''; |
| 644 | - while (! feof($stream) && $chunkSize > 0) { |
|
| 644 | + while (!feof($stream) && $chunkSize > 0) { |
|
| 645 | 645 | $part = fread($stream, $chunkSize); |
| 646 | 646 | if ($part === false) { |
| 647 | 647 | throw new Exception('Error reading from $stream.'); |
@@ -680,8 +680,8 @@ discard block |
||
| 680 | 680 | { |
| 681 | 681 | return http_build_query( |
| 682 | 682 | array_map( |
| 683 | - function ($parameter) { |
|
| 684 | - if (! is_bool($parameter)) { |
|
| 683 | + function($parameter) { |
|
| 684 | + if (!is_bool($parameter)) { |
|
| 685 | 685 | return $parameter; |
| 686 | 686 | } |
| 687 | 687 | |
@@ -701,7 +701,7 @@ discard block |
||
| 701 | 701 | */ |
| 702 | 702 | protected function jsonValidator($data = null):bool |
| 703 | 703 | { |
| 704 | - if (! empty($data)) { |
|
| 704 | + if (!empty($data)) { |
|
| 705 | 705 | @json_decode($data); |
| 706 | 706 | |
| 707 | 707 | return json_last_error() === JSON_ERROR_NONE; |