Passed
Push — dev6 ( 3fa4bc...200ba5 )
by Ron
18:44
created

CustomerBookmarkRequest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
eloc 5
c 2
b 0
f 0
dl 0
loc 18
ccs 3
cts 3
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A authorize() 0 3 2
A rules() 0 5 1
1
<?php
2
3
namespace App\Http\Requests\Customers;
4
5
use Illuminate\Foundation\Http\FormRequest;
6
7
class CustomerBookmarkRequest extends FormRequest
8
{
9
    /**
10
     * Determine if the user is authorized to make this request
11
     */
12
    public function authorize()
13
    {
14 2
        return $this->user() ? true : false;
15
    }
16 2
17
    /**
18
     * Get the validation rules that apply to the request
19
     */
20
    public function rules()
21
    {
22
        return [
23
            'cust_id' => 'required|exists:customers',
24 2
            'state'   => 'required|boolean',
25
        ];
26
    }
27
}
28