| Total Complexity | 3 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class CountryUpdateRequest extends BaseFormRequest |
||
| 10 | { |
||
| 11 | protected function getEndpointName(): string |
||
| 12 | { |
||
| 13 | return 'countries.update'; |
||
| 14 | } |
||
| 15 | |||
| 16 | public function rules(): array |
||
| 17 | { |
||
| 18 | return [ |
||
| 19 | 'code' => [ |
||
| 20 | 'nullable', |
||
| 21 | 'string', |
||
| 22 | 'min:2', |
||
| 23 | 'max:2', |
||
| 24 | Rule::unique((new Country())->getTable(), 'code') |
||
| 25 | ->whereNot('code', $this->getCountry()->code->value), |
||
| 26 | ], |
||
| 27 | 'name' => 'nullable|string', |
||
| 28 | 'continent' => 'nullable|string', |
||
| 29 | 'dial_code' => 'nullable|string|starts_with:+', |
||
| 30 | ]; |
||
| 31 | } |
||
| 32 | |||
| 33 | public function getCountry(): Country |
||
| 36 | } |
||
| 37 | } |
||
| 38 |
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