GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Pull Request — master (#20)
by
unknown
03:21
created

Bill::approve()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Vindi;
4
5
class Bill extends Resource
6
{
7
    /**
8
     * The endpoint that will hit the API.
9
     *
10
     * @return string
11
     */
12 18
    public function endpoint()
13
    {
14 18
        return 'bills';
15
    }
16
17
    /**
18
     * Make a POST request to bills/{id}/approve.
19
     *
20
     * @param int $id The resource's id.
21
     *
22
     * @return mixed
23
     */
24 2
    public function approve($id)
25
    {
26 2
        return $this->post($id, 'approve');
27
    }
28
29
    /**
30
     * Make a POST request to bills/{id}/charge.
31
     *
32
     * @param int $id The resource's id.
33
     * @param array $form_params.
0 ignored issues
show
Documentation introduced by
There is no parameter named $form_params.. Did you maybe mean $form_params?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.

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

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

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

Loading history...
34
     *
35
     * @return mixed
36
     */
37
    public function charge($id, array $form_params = [])
38
    {
39
        return $this->post($id, 'charge', $form_params);
40
    }
41
42
    /**
43
     * Make a POST request to bills/{id}/invoice.
44
     *
45
     * @param int $id The resource's id.
46
     *
47
     * @return mixed
48
     */
49
    public function invoice($id)
50
    {
51
        return $this->post($id, 'invoice');
52
    }
53
}
54