| Total Complexity | 4 | 
| Total Lines | 29 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | <?php declare( strict_types=1 );  | 
            ||
| 14 | class CloseOld extends Task { | 
            ||
| 15 | /**  | 
            ||
| 16 | * @inheritDoc  | 
            ||
| 17 | */  | 
            ||
| 18 | 	public function runInternal(): int { | 
            ||
| 19 | $orderedList = [  | 
            ||
| 20 | 'close-pages',  | 
            ||
| 21 | 'archive-pages',  | 
            ||
| 22 | 'simple-updates',  | 
            ||
| 23 | 'failed-updates'  | 
            ||
| 24 | ];  | 
            ||
| 25 | |||
| 26 | $res = new TaskResult( TaskResult::STATUS_NOTHING );  | 
            ||
| 27 | 		do { | 
            ||
| 28 | $res->merge( $this->runSubtask( current( $orderedList ) ) );  | 
            ||
| 29 | } while ( $res->isOK() && next( $orderedList ) );  | 
            ||
| 30 | |||
| 31 | return $res->getStatus();  | 
            ||
| 32 | }  | 
            ||
| 33 | |||
| 34 | /**  | 
            ||
| 35 | * @inheritDoc  | 
            ||
| 36 | */  | 
            ||
| 37 | 	protected function getSubtasksMap(): array { | 
            ||
| 43 | ];  | 
            ||
| 44 | }  | 
            ||
| 46 |