Code Duplication    Length = 7-7 lines in 2 locations

src/Http/Requests/Role/StoreFormRequest.php 1 location

@@ 25-31 (lines=7) @@
22
     *
23
     * @return array
24
     */
25
    public function rules()
26
    {
27
        return [
28
			'name' => ['required', 'string', 'min:3', 'unique:roles'],
29
			'display_name' => ['required', 'string', 'min:3'],
30
        ];
31
    }
32
33
    /**
34
     * Get custom attributes for validator errors.

src/Http/Requests/Role/UpdateFormRequest.php 1 location

@@ 24-30 (lines=7) @@
21
     *
22
     * @return array
23
     */
24
    public function rules()
25
    {
26
        return [
27
            'name' => ['required', 'string', 'min:3', 'unique:roles,name,' . $this->role->id],
28
            'display_name' => ['required', 'string', 'min:3'],
29
        ];
30
    }
31
32
    /**
33
     * Get custom attributes for validator errors.