| Total Complexity | 4 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class Tx extends NetworkSerializable |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Tx describes a bitcoin transaction, in reply to getdata |
||
| 15 | * |
||
| 16 | * @var BufferInterface |
||
| 17 | */ |
||
| 18 | private $transaction; |
||
| 19 | 6 | ||
| 20 | public function __construct(BufferInterface $tx) |
||
| 21 | 6 | { |
|
| 22 | 6 | $this->transaction = $tx; |
|
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * {@inheritdoc} |
||
| 27 | * @see https://en.bitcoin.it/wiki/Protocol_documentation#tx |
||
| 28 | 6 | * @see \BitWasp\Bitcoin\Network\NetworkSerializableInterface::getNetworkCommand() |
|
| 29 | */ |
||
| 30 | 6 | public function getNetworkCommand(): string |
|
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | 3 | * @return BufferInterface |
|
| 37 | */ |
||
| 38 | 3 | public function getTransaction(): BufferInterface |
|
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * {@inheritdoc} |
||
| 45 | 6 | * @see \BitWasp\Bitcoin\SerializableInterface::getBuffer() |
|
| 46 | */ |
||
| 47 | 6 | public function getBuffer(): BufferInterface |
|
| 52 |