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.
Completed
Push — master ( b88bc4...2341f0 )
by Benjamin
02:09
created

PDOConnection::query()   A

Complexity

Conditions 5
Paths 8

Size

Total Lines 16
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 30

Importance

Changes 0
Metric Value
cc 5
eloc 11
nc 8
nop 4
dl 0
loc 16
ccs 0
cts 11
cp 0
crap 30
rs 9.6111
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: benjamin
5
 * Date: 13/01/19
6
 * Time: 22:49
7
 */
8
9
namespace Lib\DB\DBAL\Connection;
10
11
use Lib\DB\DBAL\FetchMode;
12
use PDO;
13
14
class PDOConnection extends PDO implements ConnectionInterface
15
{
16
    /**
17
     * {@inheritdoc}
18
     */
19
    public function prepare($prepareString, $driverOptions = null)
20
    {
21
        try {
22
            parent::prepare($prepareString, $driverOptions);
23
        } catch (\PDOException $e) {
24
            throw new \PDOException($e);
25
        }
26
    }
27
28
    /**
29
     * {@inheritdoc}
30
     */
31
    public function query($query, $mode = FetchMode::DEFAULT, $arg3 = null, array $ctorargs = [])
32
    {
33
        $argsCount = \count(func_get_args());
34
        try {
35
            if ($argsCount === 4) {
36
                return parent::query($query, $mode, $arg3, $ctorargs);
37
            }
38
            if ($argsCount === 3) {
39
                return parent::query($query, $mode, $arg3);
40
            }
41
            if ($argsCount === 2) {
42
                return parent::query($query, $mode);
43
            }
44
            return parent::query($query);
45
        } catch (\PDOException $e) {
46
            throw new \PDOException($e);
47
        }
48
    }
49
50
    /**
51
     * {@inheritdoc}
52
     */
53
    public function exec($statement)
54
    {
55
        try {
56
            parent::exec($statement);
57
        } catch (\PDOException $e) {
58
            throw new \PDOException($e);
59
        }
60
    }
61
62
    /**
63
     * {@inheritdoc}
64
     */
65
    public function lastInsertId($name = null)
66
    {
67
        try {
68
            parent::lastInsertId($name);
69
        } catch (\PDOException $e) {
70
            throw new \PDOException($e);
71
        }
72
    }
73
74
    /**
75
     * {@inheritdoc}
76
     */
77
    public function beginTransaction()
78
    {
79
        try {
80
            parent::beginTransaction();
81
        } catch (\PDOException $e) {
82
            throw new \PDOException($e);
83
        }
84
    }
85
86
    /**
87
     * {@inheritdoc}
88
     */
89
    public function commit()
90
    {
91
        try {
92
            parent::commit();
93
        } catch (\PDOException $e) {
94
            throw new \PDOException($e);
95
        }
96
    }
97
98
    /**
99
     * {@inheritdoc}
100
     */
101
    public function rollBack()
102
    {
103
        try {
104
            parent::rollBack();
105
        } catch (\PDOException $e) {
106
            throw new \PDOException($e);
107
        }
108
    }
109
}
110