Conditions | 3 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | public function __construct(ScriptInterface $script) |
||
21 | { |
||
22 | $chunks = $script->getScriptParser()->decode(); |
||
23 | if (count($chunks) < 1 || !$chunks[0]->isPush()) { |
||
24 | throw new \InvalidArgumentException('Malformed pay-to-pubkey script'); |
||
25 | } |
||
26 | $this->publicKey = PublicKeyFactory::fromHex($chunks[0]->getData()); |
||
27 | } |
||
28 | |||
62 |