Completed
Push — master ( db6658...fecd46 )
by Eric
01:44
created

DestroyUser   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 25
rs 10
wmc 3
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A authorize() 0 5 2
A rules() 0 4 1
1
<?php
2
3
namespace Ergare17\Articles\Http\Requests;
4
5
use Acacha\Events\Http\Requests\Traits\ChecksPermissions;
6
use Illuminate\Foundation\Http\FormRequest;
7
8
/**
9
 * Class DestroyUser
10
 *
11
 * @package App\Http\Requests
12
 */
13
class DestroyUser extends FormRequest
14
{
15
    use ChecksPermissions;
16
17
    /**
18
     * Determine if the user is authorized to make this request.
19
     *
20
     * @return bool
21
     */
22
    public function authorize()
23
    {
24
        if ($this->hasPermissionTo('destroy-user')) return true;
25
        return false;
26
    }
27
28
    /**
29
     * Get the validation rules that apply to the request.
30
     *
31
     * @return array
32
     */
33
    public function rules()
34
    {
35
        return [];
36
    }
37
}
38