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

VerifyCsrfToken   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A tokensMatch() 0 10 2
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