@@ -180,9 +180,9 @@ discard block |
||
| 180 | 180 | |
| 181 | 181 | $response = json_decode($request->getBody()->getContents(), true); |
| 182 | 182 | |
| 183 | - if (! $response || |
|
| 184 | - ! is_array($response) || |
|
| 185 | - ! isset($response['SessionKeyBase64'], $response['SessionIVBase64'], $response['SymmetricKeyStrength']) |
|
| 183 | + if (!$response || |
|
| 184 | + !is_array($response) || |
|
| 185 | + !isset($response['SessionKeyBase64'], $response['SessionIVBase64'], $response['SymmetricKeyStrength']) |
|
| 186 | 186 | ) { |
| 187 | 187 | throw new IronBoxException('ContainerKeyData call returned invalid data'); |
| 188 | 188 | } |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | |
| 226 | 226 | $response = json_decode($request->getBody()->getContents(), true); |
| 227 | 227 | |
| 228 | - if (! $response || ! is_string($response)) { |
|
| 228 | + if (!$response || !is_string($response)) { |
|
| 229 | 229 | throw new IronBoxException('CreateEntityContainerBlob call returned invalid data'); |
| 230 | 230 | } |
| 231 | 231 | |
@@ -264,7 +264,7 @@ discard block |
||
| 264 | 264 | |
| 265 | 265 | $response = json_decode($request->getBody()->getContents(), true); |
| 266 | 266 | |
| 267 | - if (! $response || ! is_array($response)) { |
|
| 267 | + if (!$response || !is_array($response)) { |
|
| 268 | 268 | throw new IronBoxException('CheckOutEntityContainerBlob call returned invalid data'); |
| 269 | 269 | } |
| 270 | 270 | |
@@ -302,7 +302,7 @@ discard block |
||
| 302 | 302 | $i = 0; |
| 303 | 303 | $fh = fopen($encryptedFilePath, 'r'); |
| 304 | 304 | |
| 305 | - while (! feof($fh)) { |
|
| 305 | + while (!feof($fh)) { |
|
| 306 | 306 | $buf = fread($fh, $blockSizeBytes); |
| 307 | 307 | |
| 308 | 308 | // block IDs all have to be the same length, which was NOT documented by MSFT |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | |
| 76 | 76 | public function __get($key) |
| 77 | 77 | { |
| 78 | - if (! isset($this->{$key})) { |
|
| 78 | + if (!isset($this->{$key})) { |
|
| 79 | 79 | throw new IronBoxException("Property `{$key}` doesn't exist"); |
| 80 | 80 | } |
| 81 | 81 | |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | */ |
| 118 | 118 | protected function setCipher() |
| 119 | 119 | { |
| 120 | - if (! isset($this->supportedCiphers[$this->keyStrength])) { |
|
| 120 | + if (!isset($this->supportedCiphers[$this->keyStrength])) { |
|
| 121 | 121 | throw new IronBoxException('Unsupported cipher'); |
| 122 | 122 | } |
| 123 | 123 | |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | |
| 127 | 127 | public function __get($key) |
| 128 | 128 | { |
| 129 | - if (! isset($this->{$key})) { |
|
| 129 | + if (!isset($this->{$key})) { |
|
| 130 | 130 | throw new Exception("Property `{$key}` doesn't exist"); |
| 131 | 131 | } |
| 132 | 132 | |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | $in = fopen($this->inputFile, 'rb'); |
| 52 | 52 | $out = fopen($this->outputFile, 'wb'); |
| 53 | 53 | |
| 54 | - while (! feof($in)) { |
|
| 54 | + while (!feof($in)) { |
|
| 55 | 55 | $line = fread($in, $readBlockSize); |
| 56 | 56 | |
| 57 | 57 | if (strlen($line) < $readBlockSize) { |
@@ -224,11 +224,11 @@ |
||
| 224 | 224 | // If the payload is not valid JSON or does not have the proper keys set we will |
| 225 | 225 | // assume it is invalid and bail out of the routine since we will not be able |
| 226 | 226 | // to decrypt the given value. We'll also check the MAC for this encryption. |
| 227 | - if (! $this->validPayload($payload)) { |
|
| 227 | + if (!$this->validPayload($payload)) { |
|
| 228 | 228 | throw new DecryptException('The payload is invalid.'); |
| 229 | 229 | } |
| 230 | 230 | |
| 231 | - if (! $this->validMac($payload)) { |
|
| 231 | + if (!$this->validMac($payload)) { |
|
| 232 | 232 | throw new DecryptException('The MAC is invalid.'); |
| 233 | 233 | } |
| 234 | 234 | |