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 ( 1d0edd...441033 )
by Richard
24:14
created

Sqlite::fetchSetting()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 8
Ratio 100 %

Importance

Changes 0
Metric Value
dl 8
loc 8
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: wechsler
5
 * Date: 04/10/15
6
 * Time: 21:09
7
 */
8
9
namespace Phase\TakeATicket\DataSource;
10
11
class Sqlite extends AbstractSql
12
{
13
    /**
14
     * @param array $fields
15
     *
16
     * @return string
17
     */
18
    protected function concatenateEscapedFields($fields)
19
    {
20
        return implode('||', $fields);
21
    }
22
23
    /**
24
     * Get current value of a named setting, NULL if missing
25
     *
26
     * @param  $key
27
     * @return mixed|null
28
     */
29 View Code Duplication
    public function fetchSetting($key)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
30
    {
31
        $conn = $this->getDbConn();
32
        $row = $conn->fetchAssoc('SELECT settingValue FROM settings WHERE settingKey=:key', ['key' => $key]);
33
34
        return $row ? $row['settingValue'] : null;
35
        // rowCount seems to not work on sqlite: http://php.net/manual/en/pdostatement.rowcount.php
36
    }
37
}
38