GetAllPaymentAccountsRequest::authorize()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 6
Ratio 100 %

Importance

Changes 0
Metric Value
dl 6
loc 6
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace App\Containers\Payment\UI\API\Requests;
4
5
use App\Ship\Parents\Requests\Request;
6
7
/**
8
 * Class GetAllPaymentAccountsRequest.
9
 *
10
 * @author  Johannes Schobel <[email protected]>
11
 * @author  Mahmoud Zalt  <[email protected]>
12
 */
13 View Code Duplication
class GetAllPaymentAccountsRequest extends Request
0 ignored issues
show
Duplication introduced by Mahmoud Zalt
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
14
{
15
    /**
16
     * Define which Roles and/or Permissions has access to this request.
17
     *
18
     * @var  array
19
     */
20
    protected $access = [
21
        'permissions' => '',
22
        'roles'       => '',
23
    ];
24
25
    /**
26
     * Id's that needs decoding before applying the validation rules.
27
     *
28
     * @var  array
29
     */
30
    protected $decode = [
31
        // 'id',
32
    ];
33
34
    /**
35
     * Defining the URL parameters (e.g, `/user/{id}`) allows applying
36
     * validation rules on them and allows accessing them like request data.
37
     *
38
     * @var  array
39
     */
40
    protected $urlParameters = [
41
        //'id',
42
    ];
43
44
    /**
45
     * @return  array
46
     */
47
    public function rules()
48
    {
49
        return [
50
            // put your rules here
51
            // 'name' => 'required|max:255'
52
        ];
53
    }
54
55
    /**
56
     * @return  bool
57
     */
58
    public function authorize()
59
    {
60
        return $this->check([
61
            'hasAccess',
62
        ]);
63
    }
64
}
65