NotificationRequest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A authorize() 0 4 1
A rules() 0 8 1
1
<?php
2
3
namespace BRKFun\NotificationOptions\Requests;
4
5
use Illuminate\Contracts\Validation\ValidatesWhenResolved;
6
use Illuminate\Http\Request;
7
use Illuminate\Validation\ValidatesWhenResolvedTrait;
8
9
class NotificationRequest extends Request implements ValidatesWhenResolved
10
{
11
    use ValidatesWhenResolvedTrait;
12
13
    /**
14
     * Determine if the user is authorized to make this request.
15
     *
16
     * @return bool
17
     */
18
    public function authorize(): bool
19
    {
20
        return false;
21
    }
22
23
    public function rules(): array
24
    {
25
        return [
26
            'email'             => 'required|string',
27
            'token'             => 'required',
28
            'notification_name' => 'required',
29
        ];
30
    }
31
}
32