@@ -16,7 +16,7 @@ discard block |
||
| 16 | 16 | /** |
| 17 | 17 | * @var array |
| 18 | 18 | */ |
| 19 | - protected $jwt=array( |
|
| 19 | + protected $jwt = array( |
|
| 20 | 20 | 'using' => false, |
| 21 | 21 | 'UAPAY_pubkey' => '', |
| 22 | 22 | 'our_privkey' => '', |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | * @param string $json_string JSON string |
| 34 | 34 | * @param array $jwt_options array of options |
| 35 | 35 | */ |
| 36 | - public function __construct($json_string, $jwt_options=null) |
|
| 36 | + public function __construct($json_string, $jwt_options = null) |
|
| 37 | 37 | { |
| 38 | 38 | if (isset($jwt_options) && is_array($jwt_options)) |
| 39 | 39 | { |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | { |
| 75 | 75 | throw new Exception\JSON('json response contain an error message!'); |
| 76 | 76 | } |
| 77 | - if ( ! isset($this->json['status'])) |
|
| 77 | + if (!isset($this->json['status'])) |
|
| 78 | 78 | { |
| 79 | 79 | throw new Exception\JSON('invalid json response!'); |
| 80 | 80 | } |
@@ -84,14 +84,14 @@ discard block |
||
| 84 | 84 | } |
| 85 | 85 | $this->status = $this->json['status']; |
| 86 | 86 | |
| 87 | - if ( ! isset($this->json['data']) || !is_array($this->json['data'])) |
|
| 87 | + if (!isset($this->json['data']) || !is_array($this->json['data'])) |
|
| 88 | 88 | { |
| 89 | 89 | throw new Exception\JSON('json does not contain the data field!'); |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | 92 | if ($this->jwt['using'] === true) |
| 93 | 93 | { |
| 94 | - if ( ! isset($this->json['data']['token'])) |
|
| 94 | + if (!isset($this->json['data']['token'])) |
|
| 95 | 95 | { |
| 96 | 96 | throw new Exception\JSON('data does not contain the token field!'); |
| 97 | 97 | } |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | protected function uapay_public_key() |
| 121 | 121 | { |
| 122 | 122 | // check public key file |
| 123 | - if ( ! file_exists($this->jwt['UAPAY_pubkey'])) |
|
| 123 | + if (!file_exists($this->jwt['UAPAY_pubkey'])) |
|
| 124 | 124 | { |
| 125 | 125 | throw new Exception\Runtime('The file with the public key was not find!'); |
| 126 | 126 | } |