VerifyCsrfToken::tokensMatch()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
dl 0
loc 10
ccs 0
cts 7
cp 0
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 1
crap 6
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