Completed
Push — master ( e8eaa8...b17f45 )
by Antonio Carlos
06:15
created

Input   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 1
cbo 0
dl 0
loc 21
rs 10
c 1
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A inputHasOneTimePassword() 0 4 1
getRequest() 0 1 ?
config() 0 1 ?
A getInputOneTimePassword() 0 4 1
1
<?php
2
3
namespace PragmaRX\Google2FALaravel\Support;
4
5
trait Input
6
{
7
    /**
8
     * Check if the request input has the OTP.
9
     *
10
     * @return mixed
11
     */
12
    protected function inputHasOneTimePassword()
13
    {
14
        return $this->getRequest()->has($this->config('otp_input'));
15
    }
16
17
    protected function getInputOneTimePassword()
18
    {
19
        return $this->getRequest()->input($this->config('otp_input'));
20
    }
21
22
    abstract public function getRequest();
23
24
    abstract protected function config($string, $children = []);
25
}
26