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.

Connection::createPdoInstance()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 5
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * @link http://is74.ru/
4
 * @copyright Copyright (c) 2014 Интерсвязь
5
 */
6
7
namespace Intersvyaz\ExtDb;
8
9
/**
10
 * @inheritdoc
11
 */
12
class Connection extends \yii\db\Connection
13
{
14
    /**
15
     * @event [[yii\base\Event|Event]] an event that is triggered before a DB connection is established
16
     */
17
    const EVENT_BEFORE_OPEN = 'beforeOpen';
18
19
    /**
20
     * @inheritdoc
21
     */
22
    protected function createPdoInstance()
23
    {
24
        $this->trigger(self::EVENT_BEFORE_OPEN);
25
        return parent::createPdoInstance();
26
    }
27
28
    /**
29
     * @inheritdoc
30
     */
31 1
    public function createCommand($sql = null, $params = [])
32
    {
33 1
        $this->open();
34 1
        $command = new Command([
35 1
            'db' => $this,
36 1
        ]);
37
38 1
        $command->setSql($sql, $params);
39
40 1
        return $command->bindValues($params);
41
    }
42
}
43