ImportTranslationsRequest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 21
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A authorize() 0 4 1
A rules() 0 6 1
A messages() 0 6 1
1
<?php namespace Modules\Translation\Http\Requests;
2
3
use Illuminate\Foundation\Http\FormRequest;
4
5
class ImportTranslationsRequest extends FormRequest
6
{
7
    public function rules()
8
    {
9
        return [
10
            'file' => ['required', 'extensions:csv'],
11
        ];
12
    }
13
14
    public function authorize()
15
    {
16
        return true;
17
    }
18
19
    public function messages()
20
    {
21
        return [
22
            'file.extensions' => trans('translation::translations.csv only allowed'),
23
        ];
24
    }
25
}
26