CreateFooterRequest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 38
rs 10
c 0
b 0
f 0
ccs 0
cts 17
cp 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A authorize() 0 4 1
A rules() 0 15 1
1
<?php namespace Arcanesoft\Seo\Http\Requests\Admin\Footers;
2
3
/**
4
 * Class     CreateFooterRequest
5
 *
6
 * @package  Arcanesoft\Seo\Http\Requests\Admin\Footers
7
 * @author   ARCANEDEV <[email protected]>
8
 */
9
class CreateFooterRequest extends FooterFormRequest
10
{
11
    /* -----------------------------------------------------------------
12
     |  Main Methods
13
     | -----------------------------------------------------------------
14
     */
15
16
    /**
17
     * Determine if the user is authorized to make this request.
18
     *
19
     * @return bool
20
     */
21
    public function authorize()
22
    {
23
        return true;
24
    }
25
26
    /**
27
     * Get the validation rules that apply to the request.
28
     *
29
     * @return array
30
     */
31
    public function rules()
32
    {
33
        return [
34
            // Footer Rules
35
            'name'            => ['required', 'string'],
36
            'localization'    => ['required', 'string'],
37
            'uri'             => ['required', 'string', $this->getUniqueUriRule()],
38
            'locale'          => $this->getLocaleRule(),
39
            'page'            => $this->getPageRule(),
40
            // SEO Rules
41
            'seo_title'       => ['required', 'string'],
42
            'seo_description' => ['required', 'string'],
43
            'seo_keywords'    => ['required', 'array', 'min:1'],
44
        ];
45
    }
46
}
47