Passed
Push — master ( ef89ee...96f6f3 )
by Tobias
02:56
created

Auth0Badge   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getUserInfo() 0 3 1
A __construct() 0 3 1
A isResolved() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Happyr\Auth0Bundle\Security\Passport;
6
7
use Happyr\Auth0Bundle\Model\UserInfo;
8
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\BadgeInterface;
9
10
final class Auth0Badge implements BadgeInterface
11
{
12
    /**
13
     * @var UserInfo
14
     */
15
    private $user;
16
17
    public function __construct(UserInfo $user)
18
    {
19
        $this->user = $user;
20
    }
21
22
    public function getUserInfo(): UserInfo
23
    {
24
        return $this->user;
25
    }
26
27
    public function isResolved(): bool
28
    {
29
        return true;
30
    }
31
}
32