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

MySQLOtherBindings   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
dl 0
loc 26
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A bValueType() 0 3 1
A bRaw() 0 3 1
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