| Conditions | 3 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3.1406 |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | 30 | public function __construct(EcAdapter $adapter, \GMP $r, \GMP $s, $secp256k1_ecdsa_signature_t) |
|
| 38 | { |
||
| 39 | 30 | if (!is_resource($secp256k1_ecdsa_signature_t) || |
|
| 40 | 30 | !get_resource_type($secp256k1_ecdsa_signature_t) === SECP256K1_TYPE_SIG |
|
| 41 | 30 | ) { |
|
| 42 | throw new \InvalidArgumentException('Secp256k1\Signature\Signature expects ' . SECP256K1_TYPE_SIG . ' resource'); |
||
| 43 | } |
||
| 44 | |||
| 45 | 30 | $this->secp256k1_sig = $secp256k1_ecdsa_signature_t; |
|
| 46 | 30 | $this->ecAdapter = $adapter; |
|
| 47 | 30 | $this->r = $r; |
|
| 48 | 30 | $this->s = $s; |
|
| 49 | 30 | } |
|
| 50 | |||
| 83 |