Total Complexity | 4 |
Total Lines | 32 |
Duplicated Lines | 0 % |
Coverage | 80% |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | class BindExpression extends LiteralExpression implements ExpressionInterface |
||
13 | { |
||
14 | protected string $bindVariable; |
||
15 | |||
16 | protected mixed $data = null; |
||
17 | |||
18 | 2 | public function __construct(string $bindVariable, mixed $data = null) |
|
19 | { |
||
20 | 2 | $this->bindVariable = $bindVariable; |
|
21 | |||
22 | 2 | $this->data = $data; |
|
23 | 2 | } |
|
24 | |||
25 | /** |
||
26 | * Compile expression output. |
||
27 | * |
||
28 | * @param QueryBuilder $queryBuilder |
||
29 | * @return string |
||
30 | */ |
||
31 | 2 | public function compile(QueryBuilder $queryBuilder): string |
|
32 | { |
||
33 | 2 | return $this->bindVariable; |
|
34 | } |
||
35 | |||
36 | 1 | public function getBindVariable(): string |
|
39 | } |
||
40 | |||
41 | public function getData(): mixed |
||
44 | } |
||
45 | } |
||
46 |