mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Code cleanup.
This commit is contained in:
@@ -41,10 +41,6 @@ class WebhookTransformer extends AbstractTransformer
|
||||
|
||||
/**
|
||||
* Transform webhook.
|
||||
*
|
||||
* @param Webhook $webhook
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function transform(Webhook $webhook): array
|
||||
{
|
||||
@@ -68,12 +64,6 @@ class WebhookTransformer extends AbstractTransformer
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $type
|
||||
* @param int $value
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function getEnum(string $type, int $value): string
|
||||
{
|
||||
if ('trigger' === $type) {
|
||||
@@ -82,6 +72,7 @@ class WebhookTransformer extends AbstractTransformer
|
||||
if ('response' === $type) {
|
||||
return WebhookResponse::from($value)->name;
|
||||
}
|
||||
|
||||
return WebhookDelivery::from($value)->name;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user