Skip to content

Commit 4499c52

Browse files
authored
Fix PHP 8.4 deprecations (#13)
1 parent 475361c commit 4499c52

63 files changed

Lines changed: 104 additions & 104 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
php-version:
1717
- 8.0
1818
- 8.1
19-
- 8.2
19+
- 8.4
2020

2121
steps:
2222
- name: Checkout code

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
}
2424
},
2525
"require": {
26-
"php-64bit": ">=7.0",
26+
"php-64bit": ">=7.1",
2727
"pleonasm/merkle-tree": "~1.0.0",
2828
"composer/semver": "^1.4.0|^3.2.0",
2929
"lastguest/murmurhash": "^v2.0.0",

src/Address/AddressCreator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function fromOutputScript(ScriptInterface $outputScript): Address
101101
* @return Address
102102
* @throws UnrecognizedAddressException
103103
*/
104-
public function fromString(string $strAddress, NetworkInterface $network = null): Address
104+
public function fromString(string $strAddress, ?NetworkInterface $network = null): Address
105105
{
106106
$network = $network ?: Bitcoin::getNetwork();
107107

src/Address/AddressInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ interface AddressInterface
1414
* @param NetworkInterface $network
1515
* @return string
1616
*/
17-
public function getAddress(NetworkInterface $network = null): string;
17+
public function getAddress(?NetworkInterface $network = null): string;
1818

1919
/**
2020
* @return BufferInterface

src/Address/Base58Address.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ abstract class Base58Address extends Address implements Base58AddressInterface
1515
* @param NetworkInterface|null $network
1616
* @return string
1717
*/
18-
public function getAddress(NetworkInterface $network = null): string
18+
public function getAddress(?NetworkInterface $network = null): string
1919
{
2020
$network = $network ?: Bitcoin::getNetwork();
2121
$payload = new Buffer($this->getPrefixByte($network) . $this->getHash()->getBinary());

src/Address/Base58AddressInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ interface Base58AddressInterface extends AddressInterface
1212
* @param NetworkInterface $network
1313
* @return string
1414
*/
15-
public function getPrefixByte(NetworkInterface $network = null): string;
15+
public function getPrefixByte(?NetworkInterface $network = null): string;
1616
}

src/Address/BaseAddressCreator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ abstract class BaseAddressCreator
1414
* @param NetworkInterface|null $network
1515
* @return Address
1616
*/
17-
abstract public function fromString(string $strAddress, NetworkInterface $network = null): Address;
17+
abstract public function fromString(string $strAddress, ?NetworkInterface $network = null): Address;
1818

1919
/**
2020
* @param ScriptInterface $script

src/Address/Bech32AddressInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ interface Bech32AddressInterface extends AddressInterface
1212
* @param NetworkInterface $network
1313
* @return string
1414
*/
15-
public function getHRP(NetworkInterface $network = null): string;
15+
public function getHRP(?NetworkInterface $network = null): string;
1616
}

src/Address/PayToPubKeyHashAddress.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct(BufferInterface $data)
2929
* @param NetworkInterface $network
3030
* @return string
3131
*/
32-
public function getPrefixByte(NetworkInterface $network = null): string
32+
public function getPrefixByte(?NetworkInterface $network = null): string
3333
{
3434
$network = $network ?: Bitcoin::getNetwork();
3535
return pack("H*", $network->getAddressByte());

src/Address/ScriptHashAddress.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct(BufferInterface $data)
2929
* @param NetworkInterface $network
3030
* @return string
3131
*/
32-
public function getPrefixByte(NetworkInterface $network = null): string
32+
public function getPrefixByte(?NetworkInterface $network = null): string
3333
{
3434
$network = $network ?: Bitcoin::getNetwork();
3535
return pack("H*", $network->getP2shByte());

0 commit comments

Comments
 (0)