| Conditions | 3 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | 10 | public function rules() |
|
| 39 | { |
||
| 40 | 10 | if ($this->isMethod('post') || $this->isMethod('patch')) { |
|
| 41 | return [ |
||
| 42 | 'employee_id' => [ |
||
| 43 | 10 | 'required', |
|
| 44 | 10 | 'unique_with:employee_supervisors,supervisor_id', |
|
| 45 | 10 | ], |
|
| 46 | 'supervisor_id' => [ |
||
| 47 | 10 | 'required', |
|
| 48 | 10 | 'unique_with:employee_supervisors,employee_id', |
|
| 49 | 10 | 'different:employee_id', |
|
| 50 | 10 | ], |
|
| 51 | 10 | ]; |
|
| 52 | } |
||
| 53 | |||
| 54 | 2 | return []; |
|
| 55 | } |
||
| 56 | |||
| 71 |