Total Complexity | 4 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class SearchBlockerRequest extends FormRequest |
||
8 | { |
||
9 | /** |
||
10 | * Determine if the user is authorized to make this request. |
||
11 | * |
||
12 | * @return bool |
||
13 | */ |
||
14 | public function authorize() |
||
15 | { |
||
16 | if (config('laravelblocker.rolesEnabled')) { |
||
17 | return config('laravelblocker.rolesMiddlware'); |
||
18 | } |
||
19 | |||
20 | return true; |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * Get the validation rules that apply to the request. |
||
25 | * |
||
26 | * @return array |
||
27 | */ |
||
28 | public function rules() |
||
29 | { |
||
30 | return [ |
||
31 | 'blocked_search_box' => 'required|string|max:255', |
||
32 | ]; |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * Get the error messages for the defined validation rules. |
||
37 | * |
||
38 | * @return array |
||
39 | */ |
||
40 | public function messages() |
||
46 | ]; |
||
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