SuccessPlugin   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A login() 0 3 1
A verify() 0 3 1
A logout() 0 3 1
1
<?php
2
3
namespace Vectorface\Auth\Plugin;
4
5
use Vectorface\Auth\Auth;
6
7
/**
8
 * An auth plugin that always succeeds. Useful in development.
9
 */
10
class SuccessPlugin extends BaseAuthPlugin
11
{
12
    /**
13
     * Auth plugin hook to be fired on login.
14
     *
15
     * @param string $username
16
     * @param string $password
17
     * @return int
18
     */
19 5
    public function login($username, $password)
20
    {
21 5
        return Auth::RESULT_SUCCESS;
22
    }
23
24
    /**
25
     * Auth plugin hook to be fired on auth verification.
26
     *
27
     * @return int
28
     */
29 2
    public function verify()
30
    {
31 2
        return Auth::RESULT_SUCCESS;
32
    }
33
34
    /**
35
     * Auth plugin hook to be fired on logout.
36
     *
37
     * @return int
38
     */
39 1
    public function logout()
40
    {
41 1
        return Auth::RESULT_SUCCESS;
42
    }
43
}
44