mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-05 04:03:26 +00:00
Code cleanup
This commit is contained in:
@@ -53,14 +53,6 @@ class Sha3SignatureGenerator implements SignatureGeneratorInterface
|
||||
{
|
||||
private int $version = 1;
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getVersion(): int
|
||||
{
|
||||
return $this->version;
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
@@ -89,4 +81,12 @@ class Sha3SignatureGenerator implements SignatureGeneratorInterface
|
||||
// Schemes start with v, followed by an integer. Currently, the only valid live signature scheme is v1.
|
||||
return sprintf('t=%s,v%d=%s', $timestamp, $this->getVersion(), $signature);
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
public function getVersion(): int
|
||||
{
|
||||
return $this->version;
|
||||
}
|
||||
}
|
||||
|
@@ -50,17 +50,17 @@ use FireflyIII\Models\WebhookMessage;
|
||||
*/
|
||||
interface SignatureGeneratorInterface
|
||||
{
|
||||
/**
|
||||
* Return the version of this signature generator.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getVersion(): int;
|
||||
|
||||
/**
|
||||
* @param WebhookMessage $message
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function generate(WebhookMessage $message): string;
|
||||
|
||||
/**
|
||||
* Return the version of this signature generator.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getVersion(): int;
|
||||
}
|
||||
|
Reference in New Issue
Block a user