| Conditions | 6 |
| Paths | 2 |
| Total Lines | 25 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 25 | public function __construct($options) |
||
| 26 | { |
||
| 27 | if (isset($options['jwt'])) |
||
| 28 | { |
||
| 29 | // using |
||
| 30 | if ( ! isset($options['jwt']['using'])) |
||
| 31 | { |
||
| 32 | throw new Exception\Data('parameter jwt/using is not specified'); |
||
| 33 | } |
||
| 34 | if ( ! is_bool($options['jwt']['using'])) |
||
| 35 | { |
||
| 36 | throw new Exception\Data('parameter jwt/using is incorrect'); |
||
| 37 | } |
||
| 38 | // using |
||
| 39 | if ( ! isset($options['jwt']['UAPAY_pubkey'])) |
||
| 40 | { |
||
| 41 | throw new Exception\Data('parameter jwt/UAPAY_pubkey is not specified'); |
||
| 42 | } |
||
| 43 | // using |
||
| 44 | if ( ! isset($options['jwt']['our_privkey'])) |
||
| 45 | { |
||
| 46 | throw new Exception\Data('parameter jwt/our_privkey is not specified'); |
||
| 47 | } |
||
| 48 | |||
| 49 | $this->jwt = $options['jwt']; |
||
| 50 | } |
||
| 63 |