FormRequest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 27
rs 10
c 0
b 0
f 0
ccs 0
cts 8
cp 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getLocaleRule() 0 4 1
A getTablePrefix() 0 4 1
1
<?php namespace Arcanesoft\Seo\Http\Requests\Admin;
2
3
use Arcanedev\Support\Http\FormRequest as BaseFormRequest;
4
use Arcanesoft\Seo\Entities\Locales;
5
6
/**
7
 * Class     FormRequest
8
 *
9
 * @package  Arcanesoft\Seo\Http\Requests\Admin
10
 * @author   ARCANEDEV <[email protected]>
11
 */
12
abstract class FormRequest extends BaseFormRequest
13
{
14
    /* -----------------------------------------------------------------
15
     |  Other Methods
16
     | -----------------------------------------------------------------
17
     */
18
19
    /**
20
     * Get the local validation rule.
21
     *
22
     * @return array
23
     */
24
    protected function getLocaleRule()
25
    {
26
        return ['required', 'string', 'in:'.Locales::keys()->implode(',')];
27
    }
28
29
    /**
30
     * Get the table prefix.
31
     *
32
     * @return string
33
     */
34
    protected function getTablePrefix()
35
    {
36
        return config('arcanesoft.seo.database.prefix', 'seo_');
37
    }
38
}
39