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.

LogoutController   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A logout() 0 8 2
1
<?php
2
3
namespace App\Api\V1\Controllers;
4
5
use Auth;
6
use App\Http\Controllers\Controller;
7
use Symfony\Component\HttpKernel\Exception\HttpException;
8
9
class LogoutController extends Controller
10
{
11
    /**
12
     * Log the user out (Invalidate the token).
13
     *
14
     * @return \Illuminate\Http\JsonResponse
15
     */
16
    public function logout()
17
    {
18
        if (! Auth::user()->token()->revoke()) {
19
            throw new HttpException(500);
20
        }
21
22
        return response()
23
            ->json(['message' => 'Successfully logged out']);
24
    }
25
}
26