SuccessPlugin::logout()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 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