array( 'type' => 'array' ), 'count' => array( 'type' => 'integer' ), ); } protected function annotations(): array { return array( 'readonly' => true, 'destructive' => false, 'idempotent' => true, ); } /** * @param array $input Input. * @return array */ protected function run( array $input ) { $rows = Toolbox_Repository::backups(); return array( 'backups' => $rows, 'count' => count( $rows ), 'message' => array() === $rows ? __( 'No preset backups yet — one is taken automatically the first time a preset is applied.', 'acrossai-abilities-manager' ) : sprintf( /* translators: %d: number of backups */ _n( '%d backup.', '%d backups.', count( $rows ), 'acrossai-abilities-manager' ), count( $rows ) ), ); } }