AuthenticationProcess   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 22
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A authenticate() 0 5 2
1
<?php
2
3
namespace kalanis\Restful\Security\Process;
4
5
6
use kalanis\Restful\Http\IInput;
7
8
9
/**
10
 * Request AuthenticationProcess template
11
 * @package kalanis\Restful\Security\Process
12
 */
13
abstract class AuthenticationProcess
14
{
15
16
    /**
17
     * Authenticate process
18
     */
19
    public function authenticate(IInput $input): bool
20
    {
21 1
        $r1 = $this->authRequestData($input);
22 1
        $r2 = $this->authRequestTimeout($input);
23 1
        return $r1 && $r2;
24
    }
25
26
    /**
27
     * Authenticate request data
28
     */
29
    abstract protected function authRequestData(IInput $input): bool;
30
31
    /**
32
     * Authenticate request timeout
33
     */
34
    abstract protected function authRequestTimeout(IInput $input): bool;
35
}
36