Passed
Push — develop ( abefc0...4cf285 )
by Kenneth
02:21
created

MySQLOtherBindings::bValueType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace GeekLab\GLPDO2\Bindings\MySQL;
4
5
use GeekLab\GLPDO2\Bindings\OtherBindingInterface;
6
7
class MySQLOtherBindings implements OtherBindingInterface
8
{
9
    /**
10
     * Bind a string to the PDO data type.
11
     *
12
     * @param string|int|float|bool|null $value
13
     * @param int $type
14
     *
15
     * @return array
16
     */
17 1
    public function bValueType($value, int $type = \PDO::PARAM_STR): array
18
    {
19 1
        return [$value, $type];
20
    }
21
22
    /**
23
     * !!!DANGER!!!
24
     * Bind a raw value.
25
     *
26
     * @param string|int|float|bool $value
27
     *
28
     * @return array
29
     */
30 17
    public function bRaw($value): array
31
    {
32 17
        return [$value];
33
    }
34
}
35