Completed
Push — master ( 26e5d7...1c251e )
by claudio
03:46
created

VerifyCsrfToken::tokensMatch()   A

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 6
Bugs 1 Features 0
Metric Value
c 6
b 1
f 0
dl 0
loc 10
ccs 0
cts 7
cp 0
rs 9.4286
cc 2
eloc 4
nc 2
nop 1
crap 6
1
<?php
2
3
namespace plunner\Http\Middleware;
4
5
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;
6
use Illuminate\Support\Str;
7
use Illuminate\Contracts\Encryption\Encrypter;
8
use Log;
9
10
class VerifyCsrfToken extends BaseVerifier
11
{
12
    /**
13
     * The URIs that should be excluded from CSRF verification.
14
     *
15
     * @var array
16
     */
17
    protected $except = [
18
        //
19
    ];
20
21
    protected function tokensMatch($request)
22
    {
23
24
        // Don't validate CSRF when testing.
25
        if(env('APP_ENV') === 'testing') {
26
            return true;
27
        }
28
29
        return parent::tokensMatch($request);
30
    }
31
}
32