Passed
Push — master ( 42264c...07b006 )
by Pulkit
03:47
created

Webhook   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Test Coverage

Coverage 83.33%

Importance

Changes 0
Metric Value
wmc 1
eloc 6
dl 0
loc 10
ccs 5
cts 6
cp 0.8333
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 3
    public static function send(string $url, array $body, $proxy, string $method = 'POST')
9
    {
10 3
        $client = new Client();
11 3
        $result = $client->request($method, $url, [
12 3
            'proxy' => $proxy,
13 3
            'body' => json_encode($body)
14
        ]);
15
        return $result;
16
    }
17
}
18