Webhook   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 3
dl 0
loc 16
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A create() 0 6 1
1
<?php
2
3
namespace Groove\Api;
4
5
use Groove\Api;
6
use Groove\Models\Webhook as Model;
7
8
class Webhook extends Api
9
{
10
    /**
11
     * Create a webhook.
12
     *
13
     * @param  string $event
14
     * @param  string $url
15
     * @return Model
16
     */
17
    public function create($event, $url)
18
    {
19
        $response = $this->client->post('webhooks', ['event' => $event, 'url' => $url]);
20
21
        return new Model($response->webhook, $this->client);
22
    }
23
}
24