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
Push — master ( c032ab...c5117f )
by Erico
02:37
created

Charge   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 75%

Importance

Changes 5
Bugs 2 Features 0
Metric Value
wmc 4
c 5
b 2
f 0
lcom 1
cbo 1
dl 0
loc 50
ccs 6
cts 8
cp 0.75
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A endpoint() 0 4 1
A reissue() 0 4 1
A charge() 0 4 1
A refund() 0 4 1
1
<?php
2
3
namespace Vindi;
4
5
class Charge extends Resource
6
{
7
    /**
8
     * The endpoint that will hit the API.
9
     *
10
     * @return string
11
     */
12 20
    public function endpoint()
13
    {
14 20
        return 'charges';
15
    }
16
17
    /**
18
     * Make a POST request to charges/{id}/reissue.
19
     *
20
     * @param int   $id The resource's id.
21
     * @param array $form_params
22
     *
23
     * @return mixed
24
     */
25 2
    public function reissue($id, array $form_params = [])
26
    {
27 2
        return $this->post($id, 'reissue', $form_params);
28
    }
29
30
    /**
31
     * Make a POST request to charges/{id}/charge.
32
     *
33
     * @param int   $id The resource's id.
34
     * @param array $form_params
35
     *
36
     * @return mixed
37
     */
38 2
    public function charge($id, array $form_params = [])
0 ignored issues
show
Coding Style Best Practice introduced by
Please use __construct() instead of a PHP4-style constructor that is named after the class.
Loading history...
39
    {
40 2
        return $this->post($id, 'charge', $form_params);
41
    }
42
43
    /**
44
     * Make a POST request to charges/{id}/refund.
45
     *
46
     * @param int   $id The resource's id.
47
     *
48
     * @return mixed
49
     */
50
    public function refund($id)
51
    {
52
        return $this->post($id, 'refund');
53
    }
54
}
55