| Conditions | 3 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 11 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 26 | 12 | public function rules() |
|
| 27 | { |
||
| 28 | 12 | if ($this->isMethod('post') || $this->isMethod('patch')) { |
|
| 29 | return [ |
||
| 30 | 'employee_id' => [ |
||
| 31 | 10 | 'required', |
|
| 32 | 10 | 'unique_with:employee_supervisors,supervisor_id', |
|
| 33 | 10 | ], |
|
| 34 | 'supervisor_id' => [ |
||
| 35 | 10 | 'required', |
|
| 36 | 10 | 'unique_with:employee_supervisors,employee_id', |
|
| 37 | 10 | 'different:employee_id', |
|
| 38 | 10 | ], |
|
| 39 | 10 | ]; |
|
| 40 | } |
||
| 41 | |||
| 42 | 4 | return []; |
|
| 43 | } |
||
| 44 | |||
| 60 |