| Total Complexity | 12 |
| Total Lines | 49 |
| Duplicated Lines | 0 % |
| Coverage | 87.5% |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | final class CommandPDO extends AbstractCommandPDO |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @inheritDoc |
||
| 18 | */ |
||
| 19 | 5 | public function insertEx(string $table, array $columns): bool|array |
|
| 20 | { |
||
| 21 | 5 | $params = []; |
|
| 22 | 5 | $sql = $this->queryBuilder()->insertEx($table, $columns, $params); |
|
| 23 | |||
| 24 | 5 | $this->setSql($sql)->bindValues($params); |
|
| 25 | 5 | $this->prepare(false); |
|
| 26 | |||
| 27 | /** @psalm-var array|bool $result */ |
||
| 28 | 5 | $result = $this->queryOne(); |
|
| 29 | |||
| 30 | 5 | return is_array($result) ? $result : false; |
|
| 31 | } |
||
| 32 | |||
| 33 | 220 | public function queryBuilder(): QueryBuilderInterface |
|
| 34 | { |
||
| 35 | 220 | return $this->db->getQueryBuilder(); |
|
| 36 | } |
||
| 37 | |||
| 38 | 184 | protected function internalExecute(string|null $rawSql): void |
|
| 63 | } |
||
| 64 | } |
||
| 65 | } |
||
| 68 |