Completed
Push — master ( 07b006...66391b )
by Pulkit
03:51
created

Webhook   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
eloc 6
dl 0
loc 10
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A send() 0 8 1
1
<?php
2
namespace Kevincobain2000\LaravelAlertNotifications\Dispatcher;
3
4
use GuzzleHttp\Client;
5
6
class Webhook
7
{
8
    public static function send(string $url, array $body, $proxy, string $method = 'POST')
9
    {
10
        $client = new Client();
11
        $result = $client->request($method, $url, [
12
            'proxy' => $proxy,
13
            'body' => json_encode($body)
14
        ]);
15
        return $result;
16
    }
17
}
18