Conditions | 3 |
Paths | 3 |
Total Lines | 11 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3.0416 |
Changes | 0 |
1 | <?php |
||
15 | 10 | public function insertWithReturningPks(string $table, array $columns): bool|array |
|
16 | { |
||
17 | 10 | if (empty($this->db->getSchema()->getTableSchema($table)?->getPrimaryKey())) { |
|
18 | 1 | if (parent::insert($table, $columns)->execute() === 0) { |
|
19 | return false; |
||
20 | } |
||
21 | |||
22 | 1 | return []; |
|
23 | } |
||
24 | |||
25 | 9 | return parent::insertWithReturningPks($table, $columns); |
|
26 | } |
||
37 |