Total Complexity | 5 |
Total Lines | 59 |
Duplicated Lines | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | abstract class AbstractProxy implements Proxy |
||
10 | { |
||
11 | /** @var array */ |
||
12 | protected $config; |
||
13 | |||
14 | /** @var string */ |
||
15 | protected $usernameField; |
||
16 | |||
17 | /** |
||
18 | * Create a new instance. |
||
19 | * |
||
20 | * @param array $config |
||
21 | */ |
||
22 | public function __construct(array $config) |
||
23 | { |
||
24 | $this->config = $config; |
||
25 | } |
||
26 | |||
27 | /** |
||
28 | * Get the guard. |
||
29 | * |
||
30 | * @return string |
||
31 | */ |
||
32 | protected function getGuard() |
||
33 | { |
||
34 | return Auth::guard(); |
||
35 | } |
||
36 | |||
37 | /** |
||
38 | * Get the user instance. |
||
39 | * |
||
40 | * @return \Illuminate\Contracts\Auth\UserProvider |
||
41 | */ |
||
42 | protected function getUserProvider(): UserProvider |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * Get username field. |
||
49 | * |
||
50 | * @return string |
||
51 | */ |
||
52 | public function getUsernameField(): string |
||
55 | } |
||
56 | |||
57 | /** |
||
58 | * Set the username field. |
||
59 | * |
||
60 | * @param string $username |
||
61 | * @return $this |
||
62 | */ |
||
63 | public function setUsernameField(string $username): self |
||
70 |