| Total Complexity | 4 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class FormStepRequest extends FormRequest |
||
| 10 | { |
||
| 11 | public function authorize() |
||
| 12 | { |
||
| 13 | return backpack_auth()->check(); |
||
| 14 | } |
||
| 15 | |||
| 16 | public function rules() |
||
| 17 | { |
||
| 18 | $locale = locale(); |
||
| 19 | $id = request()->id; |
||
| 20 | return [ |
||
| 21 | $locale . '.title' => 'required|min:3|max:255', |
||
| 22 | $locale . '.description' => 'nullable', |
||
| 23 | 'is_active' => 'required|boolean', |
||
| 24 | 'order' => [ |
||
| 25 | 'required', |
||
| 26 | 'integer', |
||
| 27 | Rule::unique('med_form_steps', 'order')->where(function ($query) { |
||
| 28 | return $query->where('form_id', request()->form_id); |
||
| 29 | })->ignore($id), |
||
| 30 | ], |
||
| 31 | |||
| 32 | 'form_id' => 'required|integer|exists:med_forms,id', |
||
| 33 | ]; |
||
| 34 | |||
| 35 | } |
||
| 36 | |||
| 37 | public function attributes() |
||
| 43 | } |
||
| 44 | public function messages() |
||
| 47 | } |
||
| 48 | } |
||
| 49 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths