Tiqr_UserStorage_File   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 5
c 1
b 0
f 0
dl 0
loc 15
ccs 3
cts 3
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 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 Ivo Jansch <[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
 * This user storage implementation implements a simple user storage using json files.
24
 * This is mostly for demonstration and development purposes. In a production environment
25
 * please supply your own implementation that hosts the data in your user database OR
26
 * in a secure (e.g. hardware encrypted) storage.
27
 * @author ivo
28
 *
29
 * @see Tiqr_UserStorage::getStorage()
30
 * @see Tiqr_UserStorage_Interface
31
 *
32
 * Supported options:
33
 * path : Path to the directory where the user data is stored
34
 */
35
36
class Tiqr_UserStorage_File extends Tiqr_UserStorage_GenericStore
37
{
38
    use FileTrait;
39
40
    protected $path;
41
42
    /**
43
     * Create an instance
44
     * @param array $config
45
     * @param LoggerInterface $logger
46
     */
47 5
    public function __construct(array $config, LoggerInterface $logger)
48
    {
49 5
        parent::__construct($config, $logger);
50 5
        $this->path = $config["path"];
51
    }
52
}
53