Completed
Push — master ( 6d4901...0b42c8 )
by Ryan
01:44
created

CrmAssociations   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 33
rs 10
c 0
b 0
f 0
wmc 2
lcom 1
cbo 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A create() 0 8 1
A delete() 0 8 1
1
<?php
2
3
namespace SevenShores\Hubspot\Resources;
4
5
class CrmAssociations extends Resource
6
{
7
    /**
8
     * @param array $ticket Array of deal properties.
0 ignored issues
show
Bug introduced by
There is no parameter named $ticket. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
9
     *
10
     * @throws \SevenShores\Hubspot\Exceptions\BadRequest
11
     *
12
     * @return mixed
13
     */
14
    public function create(array $data)
15
    {
16
        $endpoint = 'https://api.hubapi.com/crm-associations/v1/associations';
17
18
        $options['json'] = $data;
19
20
        return $this->client->request('put', $endpoint, $options);
21
    }
22
23
    /**
24
     * @param int   $id     The deal id.
0 ignored issues
show
Bug introduced by
There is no parameter named $id. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
25
     * @param array $ticket The deal properties to update.
0 ignored issues
show
Bug introduced by
There is no parameter named $ticket. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
26
     *
27
     * @return mixed
28
     */
29
    public function delete(array $data)
30
    {
31
        $endpoint = 'https://api.hubapi.com/crm-associations/v1/associations/delete';
32
33
        $options['json'] = $data;
34
35
        return $this->client->request('put', $endpoint, $options);
36
    }
37
}
38