Total Complexity | 5 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class Command implements IQueryPart |
||
10 | { |
||
11 | protected string $sql; |
||
12 | |||
13 | /** @var IQueryPart[] */ |
||
14 | protected array $queryParts; |
||
15 | |||
16 | /** |
||
17 | * Command constructor. |
||
18 | * |
||
19 | * @param string $sql |
||
20 | * @param IQueryPart ...$expressions |
||
21 | */ |
||
22 | 2 | public function __construct(string $sql, IQueryPart ...$expressions) |
|
23 | { |
||
24 | 2 | $this->sql = $sql; |
|
25 | 2 | $this->queryParts = $expressions; |
|
26 | 2 | } |
|
27 | |||
28 | /** |
||
29 | * @return string |
||
30 | */ |
||
31 | 2 | public function __toString(): string |
|
39 | } |
||
40 | |||
41 | /** |
||
42 | * @return array |
||
43 | */ |
||
44 | 1 | public function getParams(): array |
|
55 |