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.

QueryException::getDbParameters()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * Starlit Db.
4
 *
5
 * @copyright Copyright (c) 2016 Starweb AB
6
 * @license   BSD 3-Clause
7
 */
8
9
namespace Starlit\Db\Exception;
10
11
/**
12
 * @author Andreas Nilsson <http://github.com/jandreasn>
13
 */
14
class QueryException extends DbException
15
{
16
    /***
17
     * @var string
18
     */
19
    protected $sql;
20
21
    /**
22
     * @var array
23
     */
24
    protected $dbParameters;
25
26
    /**
27
     * @param \PDOException $e
28
     * @param string        $sql
29
     * @param array         $dbParameters
30
     */
31 4
    public function __construct(\PDOException $e, $sql = '', array $dbParameters = [])
32
    {
33 4
        $this->sql = $sql;
34 4
        $this->dbParameters = $dbParameters;
35
36 4
        $extraMessage = '';
37 4
        if (!empty($this->sql)) {
38 4
            $extraMessage .= " [SQL: {$this->sql}]";
39
        }
40 4
        if (!empty($this->dbParameters)) {
41 3
            $extraMessage .= " [Parameters: " . implode(', ', $this->dbParameters) . "]";
42
        }
43
44 4
        parent::__construct($e, $extraMessage);
45 4
    }
46
47
    /**
48
     * @return string
49
     */
50 1
    public function getSql()
51
    {
52 1
        return $this->sql;
53
    }
54
55
    /**
56
     * @return array
57
     */
58 1
    public function getDbParameters()
59
    {
60 1
        return $this->dbParameters;
61
    }
62
}
63