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 ( 3c14c6...dd6b89 )
by Marc
7s
created

LaravelLocalizationRoutes::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 2 Features 1
Metric Value
c 2
b 2
f 1
dl 0
loc 10
rs 9.4285
cc 1
eloc 5
nc 1
nop 2
1
<?php namespace Mcamara\LaravelLocalization\Middleware;
2
3
use Closure;
4
use Illuminate\Http\Request;
5
6
class LaravelLocalizationRoutes {
7
8
    /**
9
     * Handle an incoming request.
10
     *
11
     * @param  \Illuminate\Http\Request $request
12
     * @param  \Closure $next
13
     * @return mixed
14
     */
15
    public function handle( $request, Closure $next )
16
    {
17
        $app = app();
18
19
        $routeName = $app[ 'laravellocalization' ]->getRouteNameFromAPath($request->getUri());
20
21
        $app[ 'laravellocalization' ]->setRouteName($routeName);
22
23
        return $next($request);
24
    }
25
}