| Total Complexity | 8 |
| Total Lines | 64 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 11 | class User |
||
| 12 | { |
||
| 13 | private $inject = false; |
||
| 14 | private $model; |
||
| 15 | |||
| 16 | public function __construct(App $app) |
||
| 23 | } |
||
| 24 | } |
||
| 25 | |||
| 26 | public function getConfig() |
||
| 27 | { |
||
| 28 | return $this->app->config->get('jwt.user', []); |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * 是否开启注入. |
||
| 33 | * |
||
| 34 | * @return bool |
||
| 35 | */ |
||
| 36 | public function hasInject() |
||
| 39 | } |
||
| 40 | |||
| 41 | /** |
||
| 42 | * 获取 用户模型文件. |
||
| 43 | * |
||
| 44 | * @return string |
||
| 45 | */ |
||
| 46 | public function getModel() |
||
| 47 | { |
||
| 48 | return $this->model; |
||
| 49 | } |
||
| 50 | |||
| 51 | /** |
||
| 52 | * 获取 具用登录信息的用户模型. |
||
| 53 | * |
||
| 54 | * @return Model |
||
| 55 | */ |
||
| 56 | public function get(): Model |
||
| 75 | } |
||
| 76 | } |
||
| 77 |