Skip to content

Commit 897234e

Browse files
committed
syntax fixes
1 parent 954c1dc commit 897234e

File tree

7 files changed

+18
-15
lines changed

7 files changed

+18
-15
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
}
1515
],
1616
"require": {
17-
"php": ">=7.0",
17+
"php": ">=7.1",
1818
"stephenhill/base58": "^1.1",
1919
"bitwasp/bech32": "^0.0.1",
2020
"btccom/cashaddress": "^0.0.3"

src/Network/Networks/Bitcoin.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use AndKom\Bitcoin\Address\Output\Outputs\P2wsh;
1414
use AndKom\Bitcoin\Address\Utils;
1515
use AndKom\Bitcoin\Address\Validate;
16+
use BitWasp\Bech32\Exception\Bech32Exception;
1617
use function BitWasp\Bech32\decodeSegwit;
1718
use function BitWasp\Bech32\encodeSegwit;
1819

@@ -74,7 +75,7 @@ public function getPrefixBech32(): string
7475
* @param string $pubKeyHash
7576
* @return string
7677
* @throws Exception
77-
* @throws \BitWasp\Bech32\Exception\Bech32Exception
78+
* @throws Bech32Exception
7879
*/
7980
public function getAddressP2wpkh(string $pubKeyHash): string
8081
{
@@ -85,7 +86,7 @@ public function getAddressP2wpkh(string $pubKeyHash): string
8586
* @param string $witnessHash
8687
* @return string
8788
* @throws Exception
88-
* @throws \BitWasp\Bech32\Exception\Bech32Exception
89+
* @throws Bech32Exception
8990
*/
9091
public function getAddressP2wsh(string $witnessHash): string
9192
{
@@ -96,7 +97,7 @@ public function getAddressP2wsh(string $witnessHash): string
9697
* @param string $address
9798
* @return OutputInterface
9899
* @throws \Exception
99-
* @throws \BitWasp\Bech32\Exception\Bech32Exception
100+
* @throws Bech32Exception
100101
*/
101102
public function decodeAddress(string $address): OutputInterface
102103
{

src/Network/Networks/BitcoinCash.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
use AndKom\Bitcoin\Address\Output\Outputs\P2pkh;
1010
use AndKom\Bitcoin\Address\Output\Outputs\P2sh;
1111
use CashAddr\CashAddress;
12+
use CashAddr\Exception\Base32Exception;
13+
use CashAddr\Exception\CashAddressException;
1214

1315
/**
1416
* Class BitcoinCash
@@ -34,8 +36,8 @@ class BitcoinCash extends Bitcoin
3436
/**
3537
* @param string $pubKeyHash
3638
* @return string
37-
* @throws \CashAddr\Exception\Base32Exception
38-
* @throws \CashAddr\Exception\CashAddressException
39+
* @throws Base32Exception
40+
* @throws CashAddressException
3941
*/
4042
public function getAddressP2pkh(string $pubKeyHash): string
4143
{
@@ -45,8 +47,8 @@ public function getAddressP2pkh(string $pubKeyHash): string
4547
/**
4648
* @param string $scriptHash
4749
* @return string
48-
* @throws \CashAddr\Exception\Base32Exception
49-
* @throws \CashAddr\Exception\CashAddressException
50+
* @throws Base32Exception
51+
* @throws CashAddressException
5052
*/
5153
public function getAddressP2sh(string $scriptHash): string
5254
{
@@ -57,8 +59,8 @@ public function getAddressP2sh(string $scriptHash): string
5759
* @param string $address
5860
* @return OutputInterface
5961
* @throws Exception
60-
* @throws \CashAddr\Exception\Base32Exception
61-
* @throws \CashAddr\Exception\CashAddressException
62+
* @throws Base32Exception
63+
* @throws CashAddressException
6264
*/
6365
public function decodeAddress(string $address): OutputInterface
6466
{

src/Output/Outputs/P2pk.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class P2pk extends AbstractOutput
3030
/**
3131
* P2pk constructor.
3232
* @param string $pubKey
33-
* @throws \AndKom\Bitcoin\Address\Exception
33+
* @throws Exception
3434
*/
3535
public function __construct(string $pubKey)
3636
{

src/Output/Outputs/P2sh.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class P2sh extends AbstractOutput
2828
/**
2929
* P2sh constructor.
3030
* @param OutputInterface|string $scriptHash
31-
* @throws \AndKom\Bitcoin\Address\Exception
31+
* @throws Exception
3232
*/
3333
public function __construct($scriptHash)
3434
{

src/Output/Outputs/P2wpkh.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class P2wpkh extends AbstractOutput
2727
/**
2828
* P2wpkh constructor.
2929
* @param string $pubKeyHash
30-
* @throws \AndKom\Bitcoin\Address\Exception
30+
* @throws Exception
3131
*/
3232
public function __construct(string $pubKeyHash)
3333
{

src/Output/Outputs/P2wsh.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ class P2wsh extends AbstractOutput
2626

2727
/**
2828
* P2wsh constructor.
29-
* @param OutputInterface|string $witnessHash
30-
* @throws \AndKom\Bitcoin\Address\Exception
29+
* @param string|OutputInterface $witnessHash
30+
* @throws Exception
3131
*/
3232
public function __construct($witnessHash)
3333
{

0 commit comments

Comments
 (0)