Total Complexity | 5 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | final class PrepareRequest implements Request |
||
20 | { |
||
21 | /** @var non-empty-array<int, int|string> */ |
||
|
|||
22 | private $body; |
||
23 | |||
24 | /** |
||
25 | * @param non-empty-array<int, int|string> $body |
||
26 | */ |
||
27 | 28 | private function __construct($body) |
|
28 | { |
||
29 | 28 | $this->body = $body; |
|
30 | } |
||
31 | |||
32 | 20 | public static function fromSql(string $sql) : self |
|
33 | { |
||
34 | 20 | return new self([Keys::SQL_TEXT => $sql]); |
|
35 | } |
||
36 | |||
37 | 24 | public static function fromStatementId(int $statementId) : self |
|
38 | { |
||
39 | 24 | return new self([Keys::STMT_ID => $statementId]); |
|
40 | } |
||
41 | |||
42 | 28 | public function getType() : int |
|
45 | } |
||
46 | |||
47 | 28 | public function getBody() : array |
|
50 | } |
||
51 | } |
||
52 |