| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 15 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 30 | 1 | public function handle(AirTable $airTable) |
|
| 31 | { |
||
| 32 | 1 | $airTable->setApiKey($this->apiKey); |
|
| 33 | 1 | $airTable->setBaseId($this->baseId); |
|
| 34 | 1 | $airTable->setTableName($this->tableName); |
|
| 35 | 1 | $this->log('Retrieving IDs'); |
|
| 36 | 1 | $ids = $airTable->getIdsFromTable(); |
|
| 37 | 1 | $this->log('Retrieved IDs'); |
|
| 38 | 1 | $this->log('Deleting Rows'); |
|
| 39 | 1 | foreach(array_chunk($ids, 50) as $idsToDelete) { |
|
| 40 | 1 | dispatch((new DeleteRows( |
|
| 41 | 1 | $idsToDelete, |
|
| 42 | 1 | $this->apiKey, |
|
| 43 | 1 | $this->baseId, |
|
| 44 | 1 | $this->tableName) |
|
| 45 | 1 | )->withDebug($this->debug)); |
|
| 46 | } |
||
| 61 | } |