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.

UserUserTagController::destroy()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 2
crap 1
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
namespace BristolSU\ControlDB\Http\Controllers\User;
4
5
use BristolSU\ControlDB\Http\Controllers\Controller;
6
use BristolSU\ControlDB\Contracts\Models\User;
7
use BristolSU\ControlDB\Contracts\Models\Tags\UserTag;
8
9
/**
10
 * Handle the tagging and untagging of users
11
 */
0 ignored issues
show
Coding Style introduced by
Missing @category tag in class comment
Loading history...
Coding Style introduced by
Missing @package tag in class comment
Loading history...
Coding Style introduced by
Missing @author tag in class comment
Loading history...
Coding Style introduced by
Missing @license tag in class comment
Loading history...
Coding Style introduced by
Missing @link tag in class comment
Loading history...
12
class UserUserTagController extends Controller
13
{
14
15
    /**
16
     * Get all tags belonging to the current user
17
     *
18
     * @param User $user
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
19
     * @return \Illuminate\Pagination\LengthAwarePaginator
0 ignored issues
show
Coding Style introduced by
Tag @return cannot be grouped with parameter tags in a doc comment
Loading history...
20
     */
21 1
    public function index(User $user)
22
    {
23 1
        return $this->paginate($user->tags());
24
        
25
    }
26
27
    /**
28
     * Tag a user
29
     *
30
     * @param User $user
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
Coding Style introduced by
Expected 4 spaces after parameter type; 1 found
Loading history...
31
     * @param UserTag $userTag
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
32
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
33 1
    public function update(User $user, UserTag $userTag)
34
    {
35 1
        $user->addTag($userTag);
36 1
    }
37
38
    /**
39
     * Untag user
40
     *
41
     * @param User $user
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
Coding Style introduced by
Expected 4 spaces after parameter type; 1 found
Loading history...
42
     * @param UserTag $userTag
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
43
     */
0 ignored issues
show
Coding Style introduced by
Missing @return tag in function comment
Loading history...
44 1
    public function destroy(User $user, UserTag $userTag)
45
    {
46 1
        $user->removeTag($userTag);
47 1
    }
48
49
}
50