@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | |
38 | 38 | protected function asJson($value) |
39 | 39 | { |
40 | - if( ! is_string($value) ) { |
|
40 | + if (!is_string($value)) { |
|
41 | 41 | return json_encode($value); |
42 | 42 | } |
43 | 43 | |
@@ -46,11 +46,11 @@ discard block |
||
46 | 46 | |
47 | 47 | protected function fromJson($value) |
48 | 48 | { |
49 | - if( null === json_decode($value) ) { |
|
49 | + if (null === json_decode($value)) { |
|
50 | 50 | return $value; |
51 | 51 | } |
52 | 52 | |
53 | - if($this->decryptAsObject) { |
|
53 | + if ($this->decryptAsObject) { |
|
54 | 54 | return json_decode($value); |
55 | 55 | } |
56 | 56 |
@@ -187,11 +187,11 @@ |
||
187 | 187 | // If the payload is not valid JSON or does not have the proper keys set we will |
188 | 188 | // assume it is invalid and bail out of the routine since we will not be able |
189 | 189 | // to decrypt the given value. We'll also check the MAC for this encryption. |
190 | - if (! $this->validPayload($payload)) { |
|
190 | + if (!$this->validPayload($payload)) { |
|
191 | 191 | throw new DecryptException('The payload is invalid.'); |
192 | 192 | } |
193 | 193 | |
194 | - if (! $this->validMac($payload)) { |
|
194 | + if (!$this->validMac($payload)) { |
|
195 | 195 | throw new DecryptException('The MAC is invalid.'); |
196 | 196 | } |
197 | 197 |