Merge pull request #209 into master

903560c container: php: refactor for linter (Aaron Fiore)
This commit is contained in:
2025-08-19 13:39:48 -07:00
6 changed files with 7 additions and 7 deletions

View File

@@ -51,7 +51,7 @@ namespace docker_finance\blockchains
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,...]"
// TODO: if caller is using a custom delimiter, this will break!

View File

@@ -296,7 +296,7 @@ namespace docker_finance\blockchains
*
* @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

View File

@@ -290,7 +290,7 @@ namespace docker_finance\blockchains\internal\blockchains
$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)) {
utils\CLI::throw_fatal("metadata unavailable");

View File

@@ -65,7 +65,7 @@ namespace docker_finance\blockchains\internal\blockchains\ethereum
* @details Upstream returns a variable-size string with the higher length
* 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
if (empty($decimal)) {
@@ -342,7 +342,7 @@ namespace docker_finance\blockchains\internal\blockchains
$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)) {
utils\CLI::throw_fatal("metadata unavailable");

View File

@@ -285,7 +285,7 @@ namespace docker_finance\blockchains\internal\blockchains
$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)) {
utils\CLI::throw_fatal("metadata unavailable");

View File

@@ -97,7 +97,7 @@ namespace docker_finance\exchanges\internal\exchanges\gemini
* @param string $path URI path
* @param string $api API scope
* @param string $method HTTP method
* @param array<string> $params Optional parameters
* @param array<string, int|string> $params Optional parameters
* @return mixed Raw requested data
*/
protected function request(