Completed
Push — master ( 20a6e3...887da8 )
by Abdelrahman
04:09 queued 02:12
created

EmailVerificationProcessRequest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A rules() 0 9 1
A getRedirectUrl() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Cortex\Auth\Http\Requests\Adminarea;
6
7
class EmailVerificationProcessRequest extends EmailVerificationRequest
8
{
9
    /**
10
     * Get the validation rules that apply to the request.
11
     *
12
     * @return array
13
     */
14
    public function rules(): array
15
    {
16
        return [
17
            // Do not validate `token` here since at this stage we can NOT generate viewable error,
18
            // and it is been processed in the controller through EmailVerificationBroker anyway
19
            //'token' => 'required|regex:/^([0-9a-f]*)$/',
0 ignored issues
show
Unused Code Comprehensibility introduced by
67% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
20
            'email' => 'required|email|min:3|max:150|exists:'.config('cortex.auth.tables.admins').',email',
21
        ];
22
    }
23
24
    /**
25
     * {@inheritdoc}
26
     */
27
    protected function getRedirectUrl()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
28
    {
29
        return $this->redirector->getUrlGenerator()->route('adminarea.verification.email.request');
30
    }
31
}
32