Conditions | 5 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
5 | function decodeOpN($op) |
||
6 | { |
||
7 | 1560 | if ($op === Opcodes::OP_0) { |
|
8 | 172 | return 0; |
|
9 | } |
||
10 | |||
11 | 1426 | if (!($op === Opcodes::OP_1NEGATE || $op >= Opcodes::OP_1 && $op <= Opcodes::OP_16)) { |
|
12 | 1426 | throw new \RuntimeException("Invalid opcode"); |
|
13 | } |
||
14 | |||
15 | return (int) $op - (Opcodes::OP_1 - 1); |
||
16 | } |
||
17 | 68 | ||
30 |