WebhookEventRequest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 36
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A rules() 0 4 1
A authorize() 0 3 1
A messages() 0 4 1
1
<?php
2
3
namespace SquareetLabs\LaravelOpenVidu\Http\Requests;
4
5
use Illuminate\Foundation\Http\FormRequest;
6
7
/**
8
 * Class WebhookEventRequest
9
 * @package SquareetLabs\LaravelOpenVidu\Http\Requests
10
 */
11
class WebhookEventRequest extends /** @scrutinizer ignore-call */
12
    FormRequest
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
            'event' => 'string|required'
35
        ];
36
    }
37
38
    /**
39
     * Get the error messages for the defined validation rules.
40
     *
41
     * @return array
42
     */
43
    public function messages()
44
    {
45
        return [
46
            'event.required' => /** @scrutinizer ignore-call */ __('validation.webhook_event.required'),
47
        ];
48
    }
49
}
50