TestAuthenticationPlugin::getCredentials()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
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