VerifyCsrfToken   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 22
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A tokensMatch() 0 10 2
1
<?php
2
3
namespace plunner\Http\Middleware;
4
5
use Illuminate\Contracts\Encryption\Encrypter;
6
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;
7
use Illuminate\Support\Str;
8
9
class VerifyCsrfToken extends BaseVerifier
10
{
11
    /**
12
     * The URIs that should be excluded from CSRF verification.
13
     *
14
     * @var array
15
     */
16
    protected $except = [
17
        //
18
    ];
19
20
    protected function tokensMatch($request)
21
    {
22
23
        // Don't validate CSRF when testing.
24
        if (env('APP_ENV') === 'testing') {
25
            return true;
26
        }
27
28
        return parent::tokensMatch($request);
29
    }
30
}
31