CreateWebhookRequest::rules()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace Mpociot\CaptainHook\Http\Requests;
4
5
use Illuminate\Foundation\Http\FormRequest;
6
7
class CreateWebhookRequest extends FormRequest
8
{
9
    /**
10
     * Determine if the user is authorized to make this request.
11
     *
12
     * @return bool
13
     */
14
    public function authorize()
15
    {
16
        return true;
17
    }
18
19
    /**
20
     * @return array
21
     */
22
    public function rules()
23
    {
24
        return [
25
            'url' => 'required|url',
26
            'event' => 'required',
27
        ];
28
    }
29
}
30