Test Setup Failed
Push — master ( dcfdf2...6863da )
by guillaume
16:18 queued 10:15
created

InMemorySocialiteGateway::add()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
4
namespace App\Src\UseCases\Infra\Gateway\InMemory;
5
6
7
use App\Src\UseCases\Domain\Auth\SocialiteUser;
8
use App\Src\UseCases\Infra\Gateway\Auth\SocialiteGateway;
9
10
class InMemorySocialiteGateway implements SocialiteGateway
11
{
12
    private $users = [];
13
14
    public function user(string $provider): SocialiteUser
15
    {
16
        return $this->users[$provider];
17
    }
18
19
    public function add(SocialiteUser $u, string $provider)
20
    {
21
        $this->users[$provider] = $u;
22
    }
23
24
}
25