Finish step.

@param  mixed $results
@return bool
175167
public function finish($results)
    {
        $table = $results['__table'];
        unset($results['__table']);

        return \DB::table($table)->insert($results);
    }
734352
public function afterFind($results = array(), $primary = false) {
        if ($results) {
            foreach ($results as &$result) {
                if (isset($result['date'])) {
                    if ($time = DateTime::createFromFormat(DateTime::RFC822, $result['date'] . 'C')) {
                        $result['date'] = $time->format('Y-m-d H:i:s');
                    }
                }
            }
        }

        return $results;
    }
630906
protected function finishCloneOrderCheckout(array $result)
    {
        if (!empty($result['order']['order_id'])) {

            $log = array(
                'user_id' => $this->uid,
                'order_id' => $this->data_order['order_id'],
                'text' => $this->text('Cloned into order #@num', array('@num' => $result['order']['order_id']))
            );

            $this->order_history->add($log);

            $vars = array(
                '@num' => $this->data_order['order_id'],
                '@url' => $this->url("admin/sale/order/{$this->order_id}"),
                '@status' => $this->order->getStatusName($result['order']['status'])
            );

            $message = $this->text('Order has been cloned from order <a href="@url">@num</a>. Order status: @status', $vars);
            $this->redirect("admin/sale/order/{$result['order']['order_id']}", $message, 'success');
        }
    }
494996
protected function saveFile($results)
    {
        $file = fopen($this->envFilePath('.env'), 'w+');
        foreach ($results as $variable => $value)
        {
            fwrite($file, $variable . '=' . $value . PHP_EOL);
        }

        return fclose($file);
    }
207599
public function postProcess($result)
    {
        // determine whether there is anything to process
        if (    is_null($result)
            ||  is_a($result, Collection::class) && $result->isEmpty()
        ) {
            return $result;
        }

        // check if there is anything to do process it through
        if ($this->postProcessors->isEmpty()) return $result;


        // for each Model, instantiate and apply the processors
        if (is_a($result, Collection::class)) {

            $result->transform(function ($model) {
                return $this->applyPostProcessorsToModel($model);
            });

        } elseif (is_a($result, AbstractPaginator::class)) {
            // result is paginate() result
            // do not apply postprocessing for now (how would we even do it?)
            return $result;

        } else {
            // result is a model
            $result = $this->applyPostProcessorsToModel($result);
        }

        return $result;
    }
5109
public static function finishBatch($success, $results, $operations) {
    if ($success) {
      if (!empty($results['errors'])) {
        foreach ($results['errors'] as $error) {
          drupal_set_message($error, 'error');
          \Drupal::logger('config_sync')->error($error);
        }
        drupal_set_message(t('The configuration was imported with errors.'), 'warning');
      }
      else {
        drupal_set_message(t('The configuration was imported successfully.'));
      }
    }
    else {
      // An error occurred.
      // $operations contains the operations that remained unprocessed.
      $error_operation = reset($operations);
      $message = t('An error occurred while processing %error_operation with arguments: @arguments', [
        '%error_operation' => $error_operation[0],
        '@arguments' => print_r($error_operation[1], TRUE),
      ]);
      drupal_set_message($message, 'error');
    }

    $redirect_url = Url::fromRoute(self::DASHBOARD)
      ->setAbsolute()
      ->toString();
    return new RedirectResponse($redirect_url);
  }
120962
public function processColumnListing($results)
    {
        return array_values(array_map(function ($result)
        {
            $result = (object) $result;

            return $result->name;

        }, $results));
    }
394948
public function finish() {
        $this->hr(1);
        $this->out('Admin installation complete!');
        $this->out('Please read the documentation for further instructions:');
        $this->out('http://milesj.me/code/cakephp/admin');
        $this->hr(1);

        return true;
    }
666357
protected function query_end($result) {
        // reset original debug level
        error_reporting($this->last_error_reporting);
        try {
            parent::query_end($result);
            if ($this->savepointpresent and $this->last_type != SQL_QUERY_AUX and $this->last_type != SQL_QUERY_SELECT) {
                $res = @pg_query($this->pgsql, "RELEASE SAVEPOINT moodle_pg_savepoint; SAVEPOINT moodle_pg_savepoint");
                if ($res) {
                    pg_free_result($res);
                }
            }
        } catch (Exception $e) {
            if ($this->savepointpresent) {
                $res = @pg_query($this->pgsql, "ROLLBACK TO SAVEPOINT moodle_pg_savepoint; SAVEPOINT moodle_pg_savepoint");
                if ($res) {
                    pg_free_result($res);
                }
            }
            throw $e;
        }
    }
209890
public function finish(): void
    {
        if (!$this->max) {
            $this->max = $this->step;
        }

        if ($this->step === $this->max && !$this->overwrite) {
            // prevent double 100% output
            return;
        }

        $this->setProgress($this->max);
    }
1223902
private function getFormattedResults(&$results) {
    return implode('', array(
        $this->getReportInfo($results),
        $this->getPaginationInfo($results),
        $this->getProfileInformation($results),
        $this->getQueryParameters($results),
        $this->getColumnHeaders($results),
        $this->getTotalsForAllResults($results),
        $this->getRows($results)
    ));
    
  }
1018423
protected function checkStrategiesResults($results)
    {
        $results = array_filter($results, function ($value) {
            return $value !== false && (!is_string($value) || mb_strpos($value, 'not found') === false);
        });

        return count($results) === count($this->strategies);
    }
582127
public function results()
    {
        // Finish all
        $this->finishLastPoint();

        // Finish all multiple points
        $this->finishAllMultiplePoints();

        // Add results to presenter
        $this->presenter->displayResultsTrigger($this->pointStack);

        // Return export
        return $this->export();
    }
589494
public function setResults($results)
    {
        // hydrate model
        foreach ($results as $entry) {
            /** @var EntityDataModel $model */
            $model = $this->getModel();
            $model->setEntityManager($this->getEntityManager());

            // check for json
            if (array_key_exists('[json]', $entry)) {
                $entry = json_decode($entry['[json]']);
            }

            $model = $this->populate($entry, $model);

            $this->collection[] = $model;
        }

        $this->setCount(count($this->collection));

        return $this;
    }
1323627
private function mergeAfterSave($result)
    {
        $this->applyOperations($this->operationSet, $this->serverData);
        $this->mergeFromServer($result);
        $this->operationSet = array();
        $this->rebuildEstimatedData();
    }
147765
public function processColumnListing($results)
	{
		return array_map(function ($result) {
			return is_object($result) ? $result->column_name : $result['column_name'];
		}, $results);
	}
489374
public function finish($graceful = false)
    {
        $this->disable();

        if (!$this->finished) {
            $this->finished = true;
            $this->onFinish();
        }

        $result = true;

        foreach ($this as $conn) {
            if ($graceful) {
                if (!$conn->gracefulShutdown()) {
                    $result = false;
                }
            } else {
                $conn->finish();
            }
        }

        return $result;
    }