ApiAuthenticateRequest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A rules() 0 6 1
A authorize() 0 6 1
1
<?php
2
3
namespace App\Containers\SocialAuth\UI\API\Requests;
4
5
use App\Ship\Request\Abstracts\Request;
6
7
/**
8
 * Class ApiAuthenticateRequest.
9
 *
10
 * @author Mahmoud Zalt <[email protected]>
11
 */
12
class ApiAuthenticateRequest extends Request
13
{
14
15
16
    /**
17
     * Define which Roles and/or Permissions has access to this request.
18
     *
19
     * @var  array
20
     */
21
    protected $access = [
22
        'permissions' => null
23
    ];
24
25
    /**
26
     * Id's that needs decoding before applying the validation rules.
27
     *
28
     * @var  array
29
     */
30
    protected $decode = [
31
32
    ];
33
34
    /**
35
     * Get the validation rules that apply to the request.
36
     *
37
     * @return array
38
     */
39
    public function rules()
40
    {
41
        return [
42
43
        ];
44
    }
45
46
    /**
47
     * Determine if the user is authorized to make this request.
48
     *
49
     * @return bool
50
     */
51
    public function authorize()
52
    {
53
        return $this->check([
54
            'hasAccess',
55
        ]);
56
    }
57
}
58