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

VerifyGdaemonCreateToken::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 9
rs 10
c 0
b 0
f 0
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
}