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   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 49
ccs 14
cts 14
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 15 3
A getSql() 0 4 1
A getDbParameters() 0 4 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