MassiveDestroyRequest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A authorize() 0 4 1
A rules() 0 6 1
1
<?php
2
3
namespace Acacha\Users\Http\Requests;
4
5
use Auth;
6
use Illuminate\Foundation\Http\FormRequest;
7
8
/**
9
 * Class MassiveDestroyRequest.
10
 *
11
 * @package Acacha\Users\Http\Requests
12
 */
13
class MassiveDestroyRequest extends FormRequest
14
{
15
    /**
16
     * Determine if the user is authorized to make this request.
17
     *
18
     * @return bool
19
     */
20
    public function authorize()
21
    {
22
        return Auth::user()->can('massive-delete-users');
23
    }
24
25
    /**
26
     * Get the validation rules that apply to the request.
27
     *
28
     * @return array
29
     */
30
    public function rules()
31
    {
32
        return [
33
            'ids'     => 'required'
34
        ];
35
    }
36
}
37