Test Failed
Pull Request — master (#87)
by Dmitriy
02:46
created

Request   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getUser() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Infrastructure\IO\Http\Auth\PostLogout\Request;
6
7
use App\Application\User\Entity\User;
8
use Yiisoft\Auth\Middleware\Authentication;
9
use Yiisoft\RequestModel\RequestModel;
10
11
final class Request extends RequestModel
12
{
13
    public function getUser(): User
14
    {
15
        /**
16
         * @var User $identity
17
         */
18
        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\Application\User\Entity\User. Consider adding an additional type-check to rule them out.
Loading history...
19
    }
20
}
21