Passed
Pull Request — main (#31)
by Seth
01:27
created

DynamicSettingIndexRequest::getEndpointName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace SaasReady\Http\Requests\DynamicSetting;
4
5
use Illuminate\Foundation\Http\FormRequest;
0 ignored issues
show
Bug introduced by
The type Illuminate\Foundation\Http\FormRequest was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use SaasReady\Rules\ClassExistsRule;
7
8
class DynamicSettingIndexRequest extends FormRequest
9
{
10
    protected function getEndpointName(): string
11
    {
12
        return 'dynamic-settings.index';
13
    }
14
15
    public function rules(): array
16
    {
17
        return [
18
            'limit' => 'required|int|max:100',
19
            'page' => 'required|int|min:1',
20
            'source_type' => [
21
                'nullable',
22
                'string',
23
                new ClassExistsRule(),
24
            ],
25
        ];
26
    }
27
}
28