Passed
Pull Request — master (#62)
by
unknown
03:33
created

Method   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getLoginHandler() 0 3 1
A getRegisterHandler() 0 3 1
1
<?php
2
namespace SilverStripe\MFA\BasicMath;
3
4
use SilverStripe\MFA\Method\Handler\RegisterHandlerInterface;
5
use SilverStripe\MFA\Method\Handler\LoginHandlerInterface;
6
use SilverStripe\MFA\Method\MethodInterface;
7
use SilverStripe\MFA\MethodRegisterHandler;
8
9
class Method implements MethodInterface
10
{
11
    /**
12
     * Return the LoginHandler that is used to start and verify login attempts with this method
13
     *
14
     * @return LoginHandlerInterface
15
     */
16
    public function getLoginHandler()
17
    {
18
        return new MethodLoginHandler();
19
    }
20
21
    /**
22
     * Return the RegisterHandler that is used to perform registrations with this method
23
     *
24
     * @return RegisterHandlerInterface
25
     */
26
    public function getRegisterHandler()
27
    {
28
        return new MethodRegisterHandler();
29
    }
30
}
31