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.
Passed
Pull Request — master (#85)
by
unknown
05:08
created

Sections::create()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
/**
3
 * Copyright 2015 Dirk Groenen
4
 *
5
 * (c) Dirk Groenen <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace DirkGroenen\Pinterest\Endpoints;
12
13
use DirkGroenen\Pinterest\Models\Section;
14
15
class Sections extends Endpoint {
16
17
    public function get($section_id, array $data = [])
0 ignored issues
show
Unused Code introduced by
The parameter $section_id is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
18
    {
19
        $response = $this->request->get(sprintf("boards/%s", $board_id), $data);
0 ignored issues
show
Bug introduced by
The variable $board_id does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
20
        return new Section($this->master, $response);
21
    }
22
23
    public function create($board_id, array $data)
24
    {
25
        $response = $this->request->post("boards/$board_id/sections", $data);
26
        return new Section($this->master, $response);
27
    }
28
29
    public function delete($section_id)
30
    {
31
        $this->request->delete(sprintf("boards/sectionis/%s", $section_id));
32
        return true;
33
    }
34
}