Passed
Push — develop ( 69e663...ab572c )
by Nikita
05:33
created

VerifyGdaemonCreateToken   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 11
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handle() 0 9 1
1
<?php
2
3
namespace Gameap\Http\Middleware;
4
5
use Closure;
6
use Illuminate\Support\Facades\Cache;
7
use Symfony\Component\HttpKernel\Exception\HttpException;
8
9
class VerifyGdaemonCreateToken
10
{
11
    public function handle($request, Closure $next)
12
    {
13
        $autoCreateToken = Cache::get('gdaemonAutoCreateToken');
0 ignored issues
show
Unused Code introduced by
The assignment to $autoCreateToken is dead and can be removed.
Loading history...
14
15
//        if ($request->route('token') != $autoCreateToken) {
16
//            throw new HttpException(401, "Invalid token");
17
//        }
18
19
        return $next($request);
20
    }
21
}