Completed
Push — master ( 857394...4794c5 )
by Mahmoud
03:25
created

ContactUsRequest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 28
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A rules() 0 9 1
A authorize() 0 4 1
1
<?php
2
3
namespace App\Containers\Contact\UI\API\Requests;
4
5
use App\Port\Request\Abstracts\Request;
6
7
/**
8
 * Class ContactUsRequest.
9
 *
10
 * @author Mahmoud Zalt <[email protected]>
11
 */
12
class ContactUsRequest extends Request
13
{
14
15
    /**
16
     * Get the validation rules that apply to the request.
17
     *
18
     * @return array
19
     */
20
    public function rules()
21
    {
22
        return [
23
            'email'   => 'email|required',
24
            'message' => 'min:10|required',
25
            'name'    => 'min:2',
26
            'subject' => 'min:2',
27
        ];
28
    }
29
30
    /**
31
     * Determine if the user is authorized to make this request.
32
     *
33
     * @return bool
34
     */
35
    public function authorize()
36
    {
37
        return true;
38
    }
39
}
40