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

CrmAssociations::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 8
rs 10
c 0
b 0
f 0
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