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
Push — master ( b27400...746a7b )
by Toby
06:28
created

ButtonController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
dl 0
loc 17
c 1
b 0
f 0
ccs 7
cts 7
cp 1
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A store() 0 6 1
A index() 0 5 1
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
namespace BristolSU\Module\StaticPage\Http\Controllers\Api\Participant;
4
5
use BristolSU\Module\StaticPage\Http\Controllers\Controller;
6
use BristolSU\Module\StaticPage\Models\ButtonClick;
7
use BristolSU\Support\Authentication\Contracts\Authentication;
8
9
class ButtonController extends Controller
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class ButtonController
Loading history...
10
{
11
12 2
    public function store(Authentication $authentication)
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function store()
Loading history...
13
    {
14 2
        $this->authorize('click-button');
15
        
16 2
        return ButtonClick::create([
0 ignored issues
show
Coding Style introduced by
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
17 2
            'clicked_by' => $authentication->getUser()->id()
18
        ]);
0 ignored issues
show
Coding Style introduced by
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
19
    }
20
21 2
    public function index()
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function index()
Loading history...
22
    {
23 2
        $this->authorize('view-page');
24
25 2
        return ButtonClick::forResource()->get();
26
    }
27
    
28
}