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.

Connector   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
connect() 0 1 ?
A options() 0 6 2
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
 * Abstract class for connections and connection management.
13
 *
14
 * @package Database
15
 * @author  Gjero Krsteski <[email protected]>
16
 */
17
abstract class Connector
18
{
19
    /**
20
     * The PDO connection options.
21
     *
22
     * @var array
23
     */
24
    protected $options = array(
25
        \PDO::ATTR_ERRMODE           => \PDO::ERRMODE_EXCEPTION,
26
        \PDO::ATTR_ORACLE_NULLS      => \PDO::NULL_NATURAL,
27
        \PDO::ATTR_STRINGIFY_FETCHES => false,
28
        \PDO::ATTR_EMULATE_PREPARES  => false,
29
    );
30
31
    /**
32
     * Establish a PDO database connection.
33
     *
34
     * @param array $config
35
     *
36
     * @return \PDO
37
     */
38
    abstract public function connect(array $config);
39
40
    /**
41
     * Get the PDO connection options for the configuration.
42
     * Developer specified options will override the default connection options.
43
     *
44
     * @param array $config
45
     *
46
     * @return array
47
     */
48
    protected function options($config)
49
    {
50
        $options = (isset($config['options'])) ? $config['options'] : array();
51
52
        return $this->options + (array)$options;
53
    }
54
}
55