| Conditions | 2 | 
| Paths | 2 | 
| Total Lines | 16 | 
| Code Lines | 8 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 28 | public function run(?bool $verbose = false) | ||
| 29 |     { | ||
| 30 | // remove drafts keeping `keep_drafts` | ||
| 31 |         if ($this->keepCount > 0) { | ||
| 32 | $query = $this->getBaseQuery(['WasPublished']) | ||
| 33 | ->addWhere( | ||
| 34 | [ | ||
| 35 | 'RecordID = ' . $this->object->ID, | ||
| 36 | ] | ||
| 37 | ) | ||
| 38 | ->setLimit($this->normaliseLimit(), $this->normaliseOffset($this->keepCount)) | ||
| 39 | ; | ||
| 40 | |||
| 41 | $this->toDelete[$this->getUniqueKey()] += $this->addVersionNumberToArray( | ||
| 42 | $this->toDelete[$this->getUniqueKey()], | ||
| 43 | $query->execute() | ||
| 44 | ); | ||
| 48 |