Completed
Pull Request — master (#167)
by
unknown
01:40
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
namespace SevenShores\Hubspot\Resources;
3
4
use SevenShores\Hubspot\Exceptions\HubspotException;
5
6
class CrmAssociations extends Resource
7
{
8
    /**
9
     * @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...
10
     * @return mixed
11
     * @throws \SevenShores\Hubspot\Exceptions\BadRequest
12
     */
13
    function create(array $data)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
14
    {
15
        $endpoint = "https://api.hubapi.com/crm-associations/v1/associations";
16
17
        $options['json'] = $data;
18
19
        return $this->client->request('put', $endpoint, $options);
20
    }
21
22
    /**
23
     * @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...
24
     * @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...
25
     * @return mixed
26
     */
27
    function delete(array $data)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

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