Prints Results.
@access		protected
@param		array		$invalid		Array of Invalid Files and Errors
@param		int			$counter		Number of checked Files
@param		double		$time			Time needed to check Folder in Seconds
@return		void
483636
protected function printResults( $invalid, $counter, $time )
	{
		remark( str_repeat( "-", 79 ) );
		if( count( $invalid ) )
		{
			remark( "valid Files: ".( $counter - count( $invalid ) ) );
			remark( "invalid Files: ".count( $invalid ) );
			foreach( $invalid as $fileName => $error )
				remark( "1. ".$fileName.": ".$error );
		}
		else
		{
			remark( "All ".$counter." Files are valid." );;
		}
		remark( "Time: ".$time." sec" );
	}
841786
void printCounters() {
    System.out.printf("New Job:\n", counters);
    for (String groupName : counters.getGroupNames()) {
      Counters.Group group = counters.getGroup(groupName);
      System.out.printf("\t%s[%s]\n", groupName, group.getDisplayName());

      for (Counters.Counter counter : group) {
        System.out.printf("\t\t%s: %s\n", counter.getDisplayName(),
                                          counter.getCounter());
      }
    }
    System.out.printf("\n");
  }
177399
private function printStat(OutputPrinter $printer, $name, $path, $style, $stdOut, $error)
    {
        $path = $this->relativizePaths($path);
        $printer->writeln(sprintf('    {+%s}%s{-%s} {+comment}# %s{-comment}', $style, $name, $style, $path));

        $pad = function ($line) { return '      ' . $line; };

        if (null !== $stdOut) {
            $padText = function ($line) { return '      │ ' . $line; };
            $stdOutString = array_map($padText, explode("\n", $stdOut));
            $printer->writeln(implode("\n", $stdOutString));
        }

        if ($error) {
            $exceptionString = implode("\n", array_map($pad, explode("\n", $error)));
            $printer->writeln(sprintf('{+%s}%s{-%s}', $style, $exceptionString, $style));
        }

        $printer->writeln();
    }
1061132
private function printErrors(iterable $errors): void
    {
        $hasErrors = false;

        foreach ($errors as $error) {
            $hasErrors = true;

            /** @var ErrorInterface $error */
            $paramName  = $error->getParameterName();
            $entry      = empty($paramName) ? 'Validation' : "Param `$paramName`";
            $paramValue = $error->getParameterValue();
            $errorMsg   = $error->getMessageTemplate();
            $context    = $error->getMessageParameters();
            $errorMsg   = MessageFormatter::formatMessage('en', $errorMsg, $context !== null ? $context : []);

            $this->console("$entry failed for `$paramValue` with: $errorMsg" . PHP_EOL);
        }

        if ($hasErrors === false) {
            $this->console('No errors' . PHP_EOL);
        }
    }
1178626
protected function printLegend(bool $errors, bool $warnings): void
    {
        if ($errors) {
            $this->output->write('<fg=red>F</>');
        } elseif ($warnings) {
            $this->output->write('<fg=yellow>W</>');
        } else {
            $this->output->write('<info>.</info>');
        }
    }
774781
public function counterCommand(): int
    {
        $total = 120;
        $ctt   = Show::counterTxt('handling ...', 'handled.');
        $this->write('Counter:');

        while ($total - 1) {
            $ctt->send(1);
            usleep(30000);
            $total--;
        }

        // end of the counter.
        $ctt->send(-1);

        // $this->output->aList($data, 'runtime profile');

        return 0;
    }
462070
public function printResults()
    {
        echo $this->getHeader();
        echo $this->getErrors();
        echo $this->getFailures();
        echo $this->getWarnings();
        echo $this->getFooter();
    }
870719
public static function repeatMinutelyForTotalCount($count, $minutes = 1)
    {
        if($count < 1) {
            throw new \InvalidArgumentException(sprintf('Total count of firings must be at least one! Given count: "%s"', $count));
        }

        return static::simpleSchedule()
            ->withIntervalInMinutes($minutes)
            ->withRepeatCount($count - 1);
    }
587493
public function errorInTabs($counters) {
		if (empty($this->current_tab) || empty($counters)) {
			return;
		}
		if (!isset($this->errors['tabs'])) {
			$this->errors['tabs'] = [];
		}
		// we need to process errors in a special way
		foreach ($counters as $type => $counter) {
			$current_tab = $this->current_tab;
			do {
				$key = implode('__', $current_tab) . '__' . $type;
				$current_value = array_key_get($this->errors['tabs'], $key);
				if (is_null($current_value)) {
					$current_value = 0;
				}
				array_key_set($this->errors['tabs'], $key, $current_value + $counter);
				array_pop($current_tab);
			} while (count($current_tab) > 0 && $type != 'records');
		}
	}
1220903
private function checkFiles(array $files) : void
    {
        foreach ($files as $value) {
            if (is_array($value)) {
                $this->checkFiles($value);
            } elseif (! $value instanceof UploadedFile) {
                $type = is_object($value) ? get_class($value) : gettype($value);

                throw new \InvalidArgumentException('Expected ' . UploadedFile::class . ' or array, got ' . $type);
            }
        }
    }
62002
public synchronized void printStatistics() {
        // quickly memoize and update counters, get the time, record update time, etc...
        long nowSuccesses = incrementCount.get();
        long nowFailures = failureCount.get();
        long prevSuccesss = lastPeriod.getAndSet(nowSuccesses);
        long endTime = System.currentTimeMillis();
        long startTime = lastStatsReportTS;
        lastStatsReportTS = endTime;

        // do math with as much safety as possible
        long invocationsCompleted = Math.max(nowSuccesses - prevSuccesss, 0);
        long periodDurationMs = Math.max(endTime - startTime, 1);
        long cumulativeDurationMs = Math.max(endTime - benchmarkStartTS, 1);
        long periodThroughput = (long) (invocationsCompleted / (periodDurationMs / 1000.0));
        long cumulativeThroughput = (long) (nowSuccesses / (cumulativeDurationMs / 1000.0));
        long time = (long) (Math.round(endTime - benchmarkStartTS) / 1000.0);

        // print out periodic report
        System.out.printf("%02d:%02d:%02d ", time / 3600, (time / 60) % 60, time % 60);
        System.out.printf("Period Throughput %10d/s, ", periodThroughput);
        System.out.printf("Cumulative Throughput %10d/s, ", cumulativeThroughput);
        System.out.printf("Total Failures %10d", nowFailures);
        System.out.printf("\n");
    }
861920
public function hotp($secret, $counter)
    {
        if (!is_numeric($counter) || $counter < 0) {
            throw new \InvalidArgumentException('Invalid counter supplied');
        }
        
        $hash = hash_hmac(
                $this->algorithm,
                $this->getBinaryCounter($counter),
                $secret,
                true
        );
    
        return str_pad($this->truncate($hash), $this->digits, '0', STR_PAD_LEFT);
    }
12884
public function validateDateformats($file, $key, $validate_language)
	{
		if (empty($validate_language))
		{
			$this->output->addMessage(Output::FATAL, 'Array must not be empty', $file, $key);
			return;
		}

		foreach ($validate_language as $dateformat => $example_time)
		{
			$this->validateString($file, $key . '.' . $dateformat, '', $dateformat);
			$this->validateString($file, $key . '.' . $dateformat, '', $example_time);
		}
	}
801532
public function clear_indexes($invalid)
    {
        if (empty($invalid)) {
            return;
        }
        $this->get_index();
        foreach ($invalid as $collection => $key) {
            // Clear all indexes per collection
            if (isset($this->indexes[$collection])) {
                if ($key === true) {
                    foreach ($this->indexes[$collection] as $cache_key => $size) {
                        $cache_path = $this->get_path($cache_key, 'result');
                        $this->clear_cache($cache_path);
                        unset($this->indexes[$collection][$cache_key]);
                    }
                }
                // Clear a single index element by key
                else if ($key && isset($this->indexes[$collection][$key])) {
                    $cache_path = $this->get_path($key, 'result');
                    $this->clear_cache($cache_path);
                    unset($this->indexes[$collection][$key]);
                }
            }
        }
        $index_path = $this->get_path('index');
        $this->write_cache($index_path, $this->indexes);
    }
366315
public function checkDirectory($dir, $validationSpec)
    {
        $exists    = file_exists($dir);
        $writable  = $exists && is_writable($dir);
        $missing   = !$exists;
        $creatable = $missing && is_writable(dirname($dir));

        $return = array(
            'exists'    => $exists,
            'writable'  => $writable,
            'missing'   => $missing,
            'creatable' => $creatable
        );

        $return['valid'] = $this->validateDirectory($return, $validationSpec);

        return $return;
    }
955259
public function printBenchmarkSummary(Benchmark $benchmark, array $results)
    {
        $averagedResults = array_map(function ($result) {
                return array_sum($result) / count($result);
            }, $results);

        $template = "%s | %s | %s | %s | %s\n";
        asort($averagedResults);
        reset($averagedResults);
        $fastestResult = each($averagedResults);
        printf($template, "Test Name", "Results", "Time", "+ Interval", "Change");
        printf($template, "---------", "-------", "----", "----------", "------");
        foreach ($averagedResults as $name => $result) {
            $interval = $result - $fastestResult["value"];
            $change   = round((1 - $result / $fastestResult["value"]) * 100, 0);
            if ($change == 0) {
                $change = 'baseline';
            } else {
                $faster = true; // Cant really ever be faster, now can it
                if ($change < 0) {
                    $faster = false;
                    $change *= -1;
                }
                $change .= '% ' . ($faster ? 'faster' : 'slower');
            }
            printf(
                $template,
                $name,
                number_format(count($results[$name])),
                sprintf("%.10f", $result),
                "+" . sprintf("%.10f", $interval),
                $change
            );
        }
    }
294156
protected function print_debug_time() {
        if (!$this->get_debug()) {
            return;
        }
        $time = $this->query_time();
        $message = "Query took: {$time} seconds.\n";
        if (CLI_SCRIPT) {
            echo $message;
            echo "--------------------------------\n";
        } else if (AJAX_SCRIPT) {
            error_log($message);
            error_log("--------------------------------");
        } else {
            echo s($message);
            echo "<hr />\n";
        }
    }