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