Passed
Pull Request — master (#10)
by
unknown
01:49
created

Method::getURLSegment()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
namespace SilverStripe\MFA\Tests\Stub\BasicMath;
3
4
use SilverStripe\Dev\TestOnly;
5
use SilverStripe\MFA\Method\Handler\LoginHandlerInterface;
6
use SilverStripe\MFA\Method\Handler\RegisterHandlerInterface;
7
use SilverStripe\MFA\Method\MethodInterface;
8
9
class Method implements MethodInterface, TestOnly
10
{
11
    /**
12
     * Get a URL segment for this method. This will be used in URL paths for performing authentication by this method
13
     *
14
     * @return string
15
     */
16
    public function getURLSegment()
17
    {
18
        return 'basic-math';
19
    }
20
21
    /**
22
     * Return the LoginHandler that is used to start and verify login attempts with this method
23
     *
24
     * @return LoginHandlerInterface
25
     */
26
    public function getLoginHandler()
27
    {
28
        return new MethodLoginHandler();
29
    }
30
31
    /**
32
     * Return the RegisterHandler that is used to perform registrations with this method
33
     *
34
     * @return RegisterHandlerInterface
35
     */
36
    public function getRegisterHandler()
37
    {
38
        return new MethodRegisterHandler();
39
    }
40
}
41