Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
12 | 1 | public static function createRecords(string $tableName, array $records): Request |
|
13 | { |
||
14 | 1 | Assert::thatAll($records) |
|
15 | 1 | ->keyExists('fields'); |
|
16 | |||
17 | 1 | return new self( |
|
18 | 1 | 'POST', |
|
19 | $tableName, |
||
20 | [ |
||
21 | 1 | 'Content-Type' => 'application/json', |
|
22 | ], |
||
23 | 1 | json_encode( |
|
24 | [ |
||
25 | 1 | 'records' => $records |
|
26 | ] |
||
68 |