TestAuthenticationPlugin   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 19
rs 10
c 0
b 0
f 0
wmc 1
lcom 1
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A getCredentials() 0 4 1
1
<?php
2
3
namespace Vectorface\SnappyRouterTests\Plugin\Authentication;
4
5
use Vectorface\SnappyRouter\Plugin\Authentication\AbstractAuthenticationPlugin;
6
7
/**
8
 * A plugin to allow testing the abstract AbstractAuthencationPlugin class.
9
 *
10
 * @copyright Copyright (c) 2014, VectorFace, Inc.
11
 * @author J. Anderson <[email protected]>
12
 */
13
class TestAuthenticationPlugin extends AbstractAuthenticationPlugin
14
{
15
    /**
16
     * The "credentials" returned by getCredentials for testing.
17
     *
18
     * @var mixed
19
     */
20
    public $credentials = array('ignored', 'ignored');
21
22
    /**
23
     * Extract credentials from the "request"... Or the hard-coded test values above.
24
     *
25
     * @return mixed An array of credentials; A username and password pair, or false if credentials aren't available
26
     */
27
    public function getCredentials()
28
    {
29
        return $this->set('credentials', $this->credentials)->get('credentials');
30
    }
31
}
32