Total Complexity | 4 |
Total Lines | 74 |
Duplicated Lines | 0 % |
Coverage | 66.67% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class Users extends Orm implements IOrm |
||
10 | { |
||
11 | |||
12 | /** |
||
13 | * table name |
||
14 | * @var string |
||
15 | */ |
||
16 | protected $tablename = 'users'; |
||
17 | |||
18 | /** |
||
19 | * table primary key |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $primary = 'id'; |
||
23 | |||
24 | /** |
||
25 | * database name |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $database = 'nymfonya'; |
||
29 | |||
30 | /** |
||
31 | * pool name |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $slot = 'test'; |
||
35 | |||
36 | /** |
||
37 | * instanciate |
||
38 | * |
||
39 | * @param Container $container |
||
40 | * @return self |
||
41 | */ |
||
42 | 4 | public function __construct(Container $container) |
|
45 | } |
||
46 | |||
47 | /** |
||
48 | * find a user for a given id |
||
49 | * |
||
50 | * @param integer $uid |
||
51 | * @return Users |
||
52 | */ |
||
53 | 1 | public function getById(int $uid): Users |
|
57 | } |
||
58 | |||
59 | /** |
||
60 | * find a user for a given email |
||
61 | * |
||
62 | * @param integer $uid |
||
63 | * @return Users |
||
64 | */ |
||
65 | 1 | public function getByEmail(string $email): Users |
|
69 | } |
||
70 | |||
71 | /** |
||
72 | * auth from username and password |
||
73 | * |
||
74 | * @param string $email |
||
75 | * @param string $password |
||
76 | * @return array |
||
77 | */ |
||
78 | public function auth(string $email, string $password): Users |
||
85 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.