Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
50.00% |
2 / 4 |
|
50.00% |
1 / 2 |
CRAP | |
0.00% |
0 / 1 |
| UserRole | |
50.00% |
2 / 4 |
|
50.00% |
1 / 2 |
2.50 | |
0.00% |
0 / 1 |
| addConditionUserId | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
2 | |||
| addConditionRoleId | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace BO\Zmsdb\Query; |
| 4 | |
| 5 | class UserRole extends Base |
| 6 | { |
| 7 | /** |
| 8 | * @var string TABLE mysql table reference |
| 9 | */ |
| 10 | const TABLE = 'user_role'; |
| 11 | |
| 12 | public function addConditionUserId(int $userId): self |
| 13 | { |
| 14 | $this->query->where('user_id', '=', $userId); |
| 15 | return $this; |
| 16 | } |
| 17 | |
| 18 | public function addConditionRoleId(int $roleId): self |
| 19 | { |
| 20 | $this->query->where('role_id', '=', $roleId); |
| 21 | return $this; |
| 22 | } |
| 23 | } |