Authenticator::authenticate()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 5
ccs 0
cts 4
cp 0
rs 10
cc 1
nc 1
nop 3
crap 2
1
<?php
2
namespace App\Http\Filter\Auth;
3
4
use yii\filters\auth\CompositeAuth;
5
6
class Authenticator extends CompositeAuth
7
{
8
    public function authenticate($user, $request, $response)
9
    {
10
        $identity = $user->getIdentity();
11
12
        return $identity ?? parent::authenticate($user, $request, $response);
13
    }
14
}
15