Test Failed
Push — develop ( be09b7...539e03 )
by Kenneth
05:14
created

MySQLOtherBindings::bValueType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 2
dl 0
loc 3
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
    public function bValueType($value, int $type = \PDO::PARAM_STR): array
18
    {
19
        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
    public function bRaw($value): array
31
    {
32
        return [$value];
33
    }
34
}
35