container: php: refactor for linter
- Removes deprecations (since PHP 8.4) - Resolves linter errors
This commit is contained in:
@@ -51,7 +51,7 @@ namespace docker_finance\blockchains
|
|||||||
parent::__construct($env);
|
parent::__construct($env);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function fetch(internal\Metadata $metadata = null): void
|
public function fetch(internal\Metadata|null $metadata = null): void
|
||||||
{
|
{
|
||||||
// API_SUBACCOUNT format: blockchain/account/address[,blockchain/account/address,...]"
|
// API_SUBACCOUNT format: blockchain/account/address[,blockchain/account/address,...]"
|
||||||
// TODO: if caller is using a custom delimiter, this will break!
|
// TODO: if caller is using a custom delimiter, this will break!
|
||||||
|
|||||||
@@ -296,7 +296,7 @@ namespace docker_finance\blockchains
|
|||||||
*
|
*
|
||||||
* @warning Implementation *should* param check for null.
|
* @warning Implementation *should* param check for null.
|
||||||
*/
|
*/
|
||||||
abstract public function fetch(internal\Metadata $metadata = null): void;
|
abstract public function fetch(internal\Metadata|null $metadata = null): void;
|
||||||
}
|
}
|
||||||
} // namespace docker_finance\blockchains
|
} // namespace docker_finance\blockchains
|
||||||
|
|
||||||
|
|||||||
@@ -290,7 +290,7 @@ namespace docker_finance\blockchains\internal\blockchains
|
|||||||
$this->explorer = new algorand\AlgoIndexer($env);
|
$this->explorer = new algorand\AlgoIndexer($env);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function fetch(internal\Metadata $metadata = null): void
|
public function fetch(internal\Metadata|null $metadata = null): void
|
||||||
{
|
{
|
||||||
if (is_null($metadata)) {
|
if (is_null($metadata)) {
|
||||||
utils\CLI::throw_fatal("metadata unavailable");
|
utils\CLI::throw_fatal("metadata unavailable");
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ namespace docker_finance\blockchains\internal\blockchains\ethereum
|
|||||||
* @details Upstream returns a variable-size string with the higher length
|
* @details Upstream returns a variable-size string with the higher length
|
||||||
* being ETH transferred. Example: 279006000000000000000 = 279.006
|
* being ETH transferred. Example: 279006000000000000000 = 279.006
|
||||||
*/
|
*/
|
||||||
private function amount_calculator(string $value, string $decimal = null): string
|
private function amount_calculator(string $value, string|null $decimal = null): string
|
||||||
{
|
{
|
||||||
// non-ERC-20
|
// non-ERC-20
|
||||||
if (empty($decimal)) {
|
if (empty($decimal)) {
|
||||||
@@ -342,7 +342,7 @@ namespace docker_finance\blockchains\internal\blockchains
|
|||||||
$this->explorer = new ethereum\Etherscan($env);
|
$this->explorer = new ethereum\Etherscan($env);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function fetch(internal\Metadata $metadata = null): void
|
public function fetch(internal\Metadata|null $metadata = null): void
|
||||||
{
|
{
|
||||||
if (is_null($metadata)) {
|
if (is_null($metadata)) {
|
||||||
utils\CLI::throw_fatal("metadata unavailable");
|
utils\CLI::throw_fatal("metadata unavailable");
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ namespace docker_finance\blockchains\internal\blockchains
|
|||||||
$this->explorer = new tezos\TzKt($env);
|
$this->explorer = new tezos\TzKt($env);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function fetch(internal\Metadata $metadata = null): void
|
public function fetch(internal\Metadata|null $metadata = null): void
|
||||||
{
|
{
|
||||||
if (is_null($metadata)) {
|
if (is_null($metadata)) {
|
||||||
utils\CLI::throw_fatal("metadata unavailable");
|
utils\CLI::throw_fatal("metadata unavailable");
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ namespace docker_finance\exchanges\internal\exchanges\gemini
|
|||||||
* @param string $path URI path
|
* @param string $path URI path
|
||||||
* @param string $api API scope
|
* @param string $api API scope
|
||||||
* @param string $method HTTP method
|
* @param string $method HTTP method
|
||||||
* @param array<string> $params Optional parameters
|
* @param array<string, int|string> $params Optional parameters
|
||||||
* @return mixed Raw requested data
|
* @return mixed Raw requested data
|
||||||
*/
|
*/
|
||||||
protected function request(
|
protected function request(
|
||||||
|
|||||||
Reference in New Issue
Block a user