Code Duplication    Length = 46-55 lines in 2 locations

app/Containers/Authentication/UI/WEB/Requests/LogoutRequest.php 1 location

@@ 12-66 (lines=55) @@
9
 *
10
 * @author Mahmoud Zalt <[email protected]>
11
 */
12
class LogoutRequest extends Request
13
{
14
15
    /**
16
     * Define which Roles and/or Permissions has access to this request.
17
     *
18
     * @var  array
19
     */
20
    protected $access = [
21
        'permissions' => null
22
    ];
23
24
    /**
25
     * Id's that needs decoding before applying the validation rules.
26
     *
27
     * @var  array
28
     */
29
    protected $decode = [
30
31
    ];
32
33
    /**
34
     * Defining the URL parameters (`/stores/999/items`) allows applying
35
     * validation rules on them and allows accessing them like request data.
36
     *
37
     * @var  array
38
     */
39
    protected $urlParameters = [
40
41
    ];
42
43
    /**
44
     * Get the validation rules that apply to the request.
45
     *
46
     * @return array
47
     */
48
    public function rules()
49
    {
50
        return [
51
52
        ];
53
    }
54
55
    /**
56
     * Determine if the user is authorized to make this request.
57
     *
58
     * @return bool
59
     */
60
    public function authorize()
61
    {
62
        return $this->check([
63
            'hasAccess',
64
        ]);
65
    }
66
}
67

app/Containers/SocialAuth/UI/API/Requests/ApiAuthenticateRequest.php 1 location

@@ 12-57 (lines=46) @@
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