| Conditions | 2 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | 10 | public static function fromBuffer(BufferInterface $buffer, Math $math = null): BlockInterface |
|
| 36 | { |
||
| 37 | 10 | $serializer = new BlockSerializer( |
|
| 38 | 10 | $math ?: Bitcoin::getMath(), |
|
| 39 | 10 | new BlockHeaderSerializer(), |
|
| 40 | 10 | new TransactionSerializer() |
|
| 41 | ); |
||
| 42 | |||
| 43 | 10 | return $serializer->parse($buffer); |
|
| 44 | } |
||
| 45 | } |
||
| 46 |