Test Failed
Push — master ( 09a5f1...c566a2 )
by Alexander
12:51
created

UserRequest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
eloc 2
c 2
b 0
f 0
dl 0
loc 8
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getUser() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\User;
6
7
use Yiisoft\Auth\Middleware\Authentication;
8
use Yiisoft\RequestModel\RequestModel;
9
10
final class UserRequest extends RequestModel
11
{
12
    public function getUser(): User
13
    {
14
        /**
15
         * @var User $identity
16
         */
17
        return $this->getAttributeValue('attributes.' . Authentication::class);
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getAttribu...\Authentication::class) could return the type null which is incompatible with the type-hinted return App\User\User. Consider adding an additional type-check to rule them out.
Loading history...
18
    }
19
}
20