Passed
Pull Request — develop (#53)
by Peter
03:13
created

Tiqr_UserStorage_Abstract   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 2
b 0
f 0
dl 0
loc 18
ccs 2
cts 4
cp 0.5
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getAdditionalAttributes() 0 3 1
A __construct() 0 3 1
1
<?php 
2
/**
3
 * This file is part of the tiqr project.
4
 * 
5
 * The tiqr project aims to provide an open implementation for 
6
 * authentication using mobile devices. It was initiated by 
7
 * SURFnet and developed by Egeniq.
8
 *
9
 * More information: http://www.tiqr.org
10
 *
11
 * @author Peter Verhage <[email protected]>
12
 * 
13
 * @package tiqr
14
 *
15
 * @license New BSD License - See LICENSE file for details.
16
 *
17
 * @copyright (C) 2010-2012 SURFnet BV
18
 */
19
20
use Psr\Log\LoggerInterface;
21
22
/**
23
 * Abstract base implementation for user storage. 
24
 *
25
 * Adds built-in support for encryption of the user secret.
26
 * 
27
 * @author peter
28
 */
29
abstract class Tiqr_UserStorage_Abstract implements Tiqr_UserStorage_Interface
30
{
31
    protected $logger;
32
33 6
    public function __construct(array $config, LoggerInterface $logger)
34
    {
35 6
        $this->logger = $logger;
36
    }
37
38
    /**
39
     * Returns additional attributes for the user.
40
     *
41
     * @param string $userId User identifier.
42
     * @return array additional user attributes
43
     */
44
    public function getAdditionalAttributes(string $userId): array
45
    {
46
        return array();
47
    }
48
}
49