Lint PHP code psr-12, add GH action
This commit is contained in:
@@ -6,10 +6,13 @@ use App\Models\Forms\Form;
|
||||
|
||||
class WebhookHandlerProvider
|
||||
{
|
||||
const SLACK_PROVIDER = 'slack';
|
||||
const DISCORD_PROVIDER = 'discord';
|
||||
const SIMPLE_WEBHOOK_PROVIDER = 'webhook';
|
||||
const ZAPIER_PROVIDER = 'zapier';
|
||||
public const SLACK_PROVIDER = 'slack';
|
||||
|
||||
public const DISCORD_PROVIDER = 'discord';
|
||||
|
||||
public const SIMPLE_WEBHOOK_PROVIDER = 'webhook';
|
||||
|
||||
public const ZAPIER_PROVIDER = 'zapier';
|
||||
|
||||
public static function getProvider(Form $form, array $data, string $provider, ?string $webhookUrl = null)
|
||||
{
|
||||
@@ -24,6 +27,7 @@ class WebhookHandlerProvider
|
||||
if (is_null($webhookUrl)) {
|
||||
throw new \Exception('Zapier webhook url is required');
|
||||
}
|
||||
|
||||
return new ZapierHandler($form, $data, $webhookUrl);
|
||||
default:
|
||||
throw new \Exception('Unknown webhook provider');
|
||||
|
||||
Reference in New Issue
Block a user