Render output from given statistics.

@param  ProjectStatistics $statistics
@return void
1811
public function render(ProjectStatistics $statistics)
    {
        $table = new Table($this->output);

        $table
            ->setHeaders(['Name', 'Classes', 'Methods', 'Methods/Class', 'Lines', 'LoC', 'LoC/Method'])
            ->setRows($statistics->components())
            ->addRow($statistics->other())
            ->addRow(new TableSeparator)
            ->addRow($statistics->total());

        for ($i = 1; $i <= 6; $i++) {
            $table->setColumnStyle($i, (new TableStyle)->setPadType(STR_PAD_LEFT));
        }

        $table->render();

        $metaData = array_merge(
            (new CodeTestRatio($statistics))->summary(),
            ['Number of Routes: '.app(NumberOfRoutes::class)->get()]
        );

        $this->output->text(
            implode('    ', $metaData)
        );
    }
323800
public function saveStatisticsRecord(array $statisticsRecord)
    {
        $queryBuilder = $this->getQueryBuilder();
        $queryBuilder->insert($this->table)->values($statisticsRecord)->execute();
    }
498965
protected function renderForConsole($e, ConsoleOutput $output = null)
    {
        if (is_null($output)) {
            $output = new ConsoleOutput();
        }

        $this->getExceptionHandler()->renderForConsole($output, $e);
    }
1289611
public function display()
    {
        if (OutputInterface::VERBOSITY_QUIET === $this->output->getVerbosity()) {
            return;
        }

        if (null === $this->format) {
            $this->setRealFormat($this->internalFormat ?: $this->determineBestFormat());
        }

        $this->overwrite($this->buildLine());
    }
1119897
private function setCachedStats(Collection $stats)
    {
        $expiresAt = Carbon::now()->addMinutes(15);
        $stats  = $stats->toArray();

        Cache::put(self::CACHE_NAME, $stats, $expiresAt);

        $this->fireEvent('cache_updated', array($stats));
    }
334671
public function output_headers($headers) {
        $this->columns = $headers;
        if (method_exists($this->dataformat, 'write_header')) {
            error_log('The function write_header() does not support multiple sheets. In order to support multiple sheets you ' .
                'must implement start_output() and start_sheet() and remove write_header() in your dataformat.');
            $this->dataformat->write_header($headers);
        } else {
            $this->dataformat->start_sheet($headers);
        }
    }
1003350
public function renderTotalsRow()
    {
        $this->current_row = $this->current_row_html = array();
        if ($this->totals !== false && is_array($this->totals) && $this->totals_t) {
            $this->current_row = $this->totals;

            $this->formatTotalsRow();

            $this->template->appendHTML(
                $this->container_tag,
                $this->rowRender($this->totals_t)
            );
        } else {
            $this->template->tryDel('totals');
        }
    }
414
public function display(): void
    {
        if (null === $this->format) {
            $this->format = self::DEFAULT_FORMAT;
        }

        $this->render($this->buildLine());
    }
64280
public function registerScenarioStat(ScenarioStat $stat)
    {
        if (TestResults::NO_TESTS === $stat->getResultCode()) {
            return;
        }

        $this->scenarioCounters[$stat->getResultCode()]++;

        if (TestResult::FAILED === $stat->getResultCode()) {
            $this->failedScenarioStats[] = $stat;
        }

        if (TestResult::SKIPPED === $stat->getResultCode()) {
            $this->skippedScenarioStats[] = $stat;
        }
    }
171758
public function displayQueries(array $queries = array(), $useColor = false, $useTemplate = false)
    {
        if (!$this->output) {
            throw new \RuntimeException('No output is defined');
        }
        $this->formatQueries($queries, $useColor);

        if ($useTemplate) {
            $content = $this->templateParser->parse($queries)->getContent();
        } else {

            $content = implode('', $queries);
        }

        $this->output->write($content);
    }
1287810
public function stats($range, $project = null)
    {
        if ($project !== null) {
            $project = "?project={$project}";
        }

        return $this->makeRequest("users/current/stats/{$range}" . $project);
    }
543129
protected function renderFile($template, $target, $parameters)
    {
        $this->fs->dumpFile(
            $target,
            $this->render($template, $parameters)
        );
    }
310081
protected function renderContents($output, array $matches, &$start): void
    {
        foreach ($matches[0] as $i => $match) {
            $end = $match[1] - $start;
            $contentType = $matches[2][$i][0];
            echo substr($output, $start, $end);
            $this->doRenderTags($contentType);
            $start = $match[1] + \strlen($match[0]);
        }
        echo substr($output, $start);
    }
1105095
public function renderHeader(array $comments = []) : void
    {
        if ($this->isSilent()) {
            return;
        }

        $this->logger->debug('rendering comments');

        fwrite($this->file, '<comments>' . PHP_EOL);

        foreach ($comments as $text) {
            fwrite($this->file, '<comment><![CDATA[' . $text . ']]></comment>' . PHP_EOL);
        }

        fwrite($this->file, '</comments>' . PHP_EOL);
    }
67781
public function statsAction()
    {
        $om = $this->getObjectManager();
        $repository = $om->getRepository('TamagoTipsManagerBundle:TamagoTransUnitMeta');
        $stats = $repository->stats();

        return $this->render('TamagoTipsManagerBundle:Default:stats.html.twig', ['stats' => $stats]);
    }
1185750
function render($context = null, $vars = array())
    {
        $directives = $this->getDirectives();

        foreach ($directives as $directive) {
            list($i, $name, $argv) = $directive;
            $this->executeDirective($name, $context, $argv);
        }

        return $this->getProcessedSource();
    }
49644
protected function _renderCoverage($metrics)
    {
        $stats = $metrics->data();
        foreach ($stats['files'] as $file) {
            $this->write("File: {$file}" . "\n\n");

            $lines = file($file);

            $coverage = $this->_collector->export($file);

            if (isset($stats['line'])) {
                $start = $stats['line']['start'];
                $stop = $stats['line']['stop'];
            } else {
                $start = 0;
                $stop = count($lines) - 1;
            }

            for ($i = $start; $i <= $stop; $i++) {
                $value = isset($coverage[$i]) ? $coverage[$i] : null;
                $line = str_pad($i + 1, 6, ' ', STR_PAD_LEFT);
                $line .= ':' . str_pad($value, 6, ' ');
                $line .= $lines[$i];
                if ($value) {
                    $this->write($line, 'n;green');
                } elseif ($value === 0) {
                    $this->write($line, 'n;red');
                } else {
                    $this->write($line);
                }
            }
            $this->write("\n\n");
        }
    }