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.

ReplaceIntoRule::replaceInto()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
namespace PhpBoot\DB\rules\replace;
3
4
use PhpBoot\DB\rules\basic\BasicRule;
5
use PhpBoot\DB\rules\basic\ExecRule;
6
use PhpBoot\DB\impls\ReplaceImpl;
7
use PhpBoot\DB\impls\ValuesImpl;
8
9
require_once dirname(__DIR__).'/impls.php';
10
require_once __DIR__.'/basic.php';
11
12
class ReplaceIntoRule extends BasicRule
13
{
14
    /**
15
     * replaceInto('table')->values([1,2]) => "REPLACE INTO table VALUES(1,2)"
16
     * @param string $table
17
     * @return \PhpBoot\DB\rules\replace\ValuesRule
18
     */
19 2
    public function replaceInto($table) {
20 2
        ReplaceImpl::replaceInto($this->context, $table);
21 2
        return new ValuesRule($this->context);
22
    }
23
}
24
class ValuesRule extends BasicRule
25
{
26
    /**
27
     * replaceInto('table')->values([1,2]) => "REPLACE INTO table VALUES(1,2)"
28
     * replaceInto('table')->values(['a'=>1, 'b'=>Sql::raw('now()')]) => "REPLACE INTO table(a,b) VALUES(1,now())"
29
     * @param array $values
30
     * @return \PhpBoot\DB\rules\basic\ExecRule
31
     */
32 2
    public function values($values) {
33 2
        ValuesImpl::values($this->context, $values);
34 2
        return new ExecRule($this->context);
35
    }
36
}