Code Duplication    Length = 8-8 lines in 2 locations

src/Resources/Webhooks.php 2 locations

@@ 27-34 (lines=8) @@
24
     * @param array $subscription
25
     * @return \SevenShores\Hubspot\Http\Response
26
     */    
27
    function createSubscription($app_id, $subscription)
28
    {
29
        $endpoint = "https://api.hubapi.com/webhooks/v1/{$app_id}/subscriptions";
30
31
        $options['json'] = $subscription;
32
33
        return $this->client->request('post', $endpoint, $options);
34
    }
35
36
    /**
37
     * Update a subscription.
@@ 44-51 (lines=8) @@
41
     * @param array $subscription
42
     * @return \SevenShores\Hubspot\Http\Response
43
     */    
44
    function updateSubscription($app_id, $subscription_id, $subscription)
45
    {
46
        $endpoint = "https://api.hubapi.com/webhooks/v1/{$app_id}/subscriptions/{$subscription_id}";
47
48
        $options['json'] = $subscription;
49
50
        return $this->client->request('put', $endpoint, $options);
51
    }
52
53
    /**
54
     * Delete a subscription.