| Total Complexity | 5 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class Alert extends NetworkSerializable |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var AlertDetail |
||
| 19 | */ |
||
| 20 | private $alert; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var SignatureInterface |
||
| 24 | */ |
||
| 25 | private $signature; |
||
| 26 | |||
| 27 | /** |
||
| 28 | 3 | * @param AlertDetail $alert |
|
| 29 | * @param SignatureInterface $signature |
||
| 30 | 3 | */ |
|
| 31 | 3 | public function __construct(AlertDetail $alert, SignatureInterface $signature) |
|
| 35 | } |
||
| 36 | |||
| 37 | 3 | /** |
|
| 38 | * @return string |
||
| 39 | 3 | * @see https://en.bitcoin.it/wiki/Protocol_documentation#alert |
|
| 40 | */ |
||
| 41 | public function getNetworkCommand(): string |
||
| 42 | { |
||
| 43 | return Message::ALERT; |
||
| 44 | } |
||
| 45 | 3 | ||
| 46 | /** |
||
| 47 | 3 | * @return AlertDetail |
|
| 48 | */ |
||
| 49 | public function getDetail(): AlertDetail |
||
| 52 | } |
||
| 53 | 3 | ||
| 54 | /** |
||
| 55 | 3 | * @return SignatureInterface |
|
| 56 | */ |
||
| 57 | public function getSignature(): SignatureInterface |
||
| 58 | { |
||
| 59 | return $this->signature; |
||
| 60 | } |
||
| 61 | |||
| 62 | 3 | /** |
|
| 63 | * @see \BitWasp\Bitcoin\SerializableInterface::getBuffer() |
||
| 64 | 3 | * @return BufferInterface |
|
| 65 | */ |
||
| 66 | public function getBuffer(): BufferInterface |
||
| 69 | } |
||
| 70 | } |
||
| 71 |