Exemple #1
0
 private function warnXdebug()
 {
     if (ini_get('xdebug.profiler_enabled')) {
         $this->stdio->warn("xdebug and its profiler is enabled. Formatting will be a lot slower.");
     } elseif (extension_loaded('xdebug')) {
         $this->stdio->warn("xdebug is enabled. Formatting would be faster with xdebug disabled.");
     }
     $this->stdio->outln();
 }
Exemple #2
0
 private function showSummary($microseconds)
 {
     $statusFileMap = $this->getFilesGroupedByStatus();
     $changedCount = 0;
     if (isset($statusFileMap[FormatJobFile::STATUS_CHANGED])) {
         $changedCount = count($statusFileMap[FormatJobFile::STATUS_CHANGED]);
     }
     $duration = Duration::create()->format((int) $microseconds) . ' ';
     if ($microseconds < 10) {
         if ($microseconds < 1) {
             $duration = '';
         }
         $duration .= round(($microseconds - (int) $microseconds) * 1000) . 'ms';
     }
     $this->stdio->success(sprintf('Formatted %d file%s in %s.', $changedCount, Quantity::format('(s)', $changedCount), $duration));
 }