GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Sqlite::connect()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
nc 2
nop 1
dl 0
loc 12
rs 9.8666
c 0
b 0
f 0
1
<?php
2
/**
3
 * Database
4
 *
5
 * @copyright Copyright (c)  Gjero Krsteski (http://krsteski.de)
6
 * @license   http://opensource.org/licenses/MIT MIT License
7
 */
8
9
namespace Pimf\Pdo;
10
11
/**
12
 * Connection management to SQLite.
13
 *
14
 * @package Database
15
 * @author  Gjero Krsteski <[email protected]>
16
 */
17
class Sqlite extends Connector
18
{
19
    /**
20
     * @param array $config
21
     *
22
     * @return \Pimf\Database
23
     */
24
    public function connect(array $config)
25
    {
26
        $options = $this->options($config);
27
28
        // SQLite provides supported for "in-memory" databases, which exist only for
29
        // lifetime of the request. These are mainly for tests.
30
        if ($config['database'] == ':memory:') {
31
            return new \Pimf\Database('sqlite::memory:', null, null, $options);
32
        }
33
34
        return new \Pimf\Database('sqlite:' . $config['database'], null, null, $options);
35
    }
36
}
37