StartRecordingRequest::authorize()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace SquareetLabs\LaravelOpenVidu\Http\Requests;
4
5
use Illuminate\Foundation\Http\FormRequest;
6
7
/**
8
 * Class StartRecordingRequest
9
 * @package SquareetLabs\LaravelOpenVidu\Http\Requests
10
 */
11
class StartRecordingRequest 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
            'hasAudio' => 'boolean',
35
            'hasVideo' => 'boolean',
36
            'name' => 'string',
37
            'outputMode' => 'string',
38
            'recordingLayout' => 'string',
39
            'customLayout' => 'string',
40
            'resolution' => 'string'
41
        ];
42
    }
43
44
    /**
45
     * Get the error messages for the defined validation rules.
46
     *
47
     * @return array
48
     */
49
    public function messages()
50
    {
51
        return [
52
            'hasAudio.boolean' => /** @scrutinizer ignore-call */ __('validation.recording.hasAudio_boolean'),
53
            'hasVideo.boolean' => /** @scrutinizer ignore-call */ __('validation.recording.hasVideo_boolean'),
54
        ];
55
    }
56
}
57