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