BaseVerificationController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 7
c 0
b 0
f 0
dl 0
loc 25
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 1
1
<?php
2
3
namespace Fouladgar\MobileVerification\Http\Controllers;
4
5
use Fouladgar\MobileVerification\Concerns\VerifiesMobiles;
6
use Fouladgar\MobileVerification\Tokens\TokenBrokerInterface;
7
use Illuminate\Routing\Controller;
8
9
abstract class BaseVerificationController extends Controller implements BaseVerificationControllerInterface
10
{
11
    use VerifiesMobiles;
0 ignored issues
show
introduced by
The trait Fouladgar\MobileVerifica...oncerns\VerifiesMobiles requires some properties which are not provided by Fouladgar\MobileVerifica...eVerificationController: $token, $redirectTo
Loading history...
12
13
    /**
14
     * @var TokenBrokerInterface
15
     */
16
    protected $tokenBroker;
17
18
    /**
19
     * Create a new controller instance.
20
     *
21
     * @param TokenBrokerInterface $tokenBroker
22
     *
23
     * @return void
24
     */
25
    public function __construct(TokenBrokerInterface $tokenBroker)
26
    {
27
        $this->middleware(config('mobile_verifier.middleware', ['web', 'auth']));
28
29
        $throttle = config('mobile_verifier.throttle', 10);
30
31
        $this->middleware("throttle:$throttle,1")->only('verify', 'resend');
32
33
        $this->tokenBroker = $tokenBroker;
34
    }
35
}
36