Skip to content

Commit

Permalink
Normalize and colorize status.
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuswilms committed May 22, 2012
1 parent 589d8ba commit 2f90730
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions extensions/command/Syntax.php
Expand Up @@ -132,24 +132,24 @@ public function showProgress($file, Result $result, Application $application) {
};

if ($result->wasSkipped($file)) {
$this->out("[Skipped] {$message}");
$this->out("[{:cyan}skip{:end} ] {$message}");
} elseif ($result->hasLintError($file)) {
$this->out("[Error ] {$message}");
$this->out("[{:purple}exception{:end}] {$message}");
$this->out($format($result->getLintError($file)));
} elseif ($result->hasRuleError($file)) {
$this->out("[Error ] {$message}");
$this->out("[{:purple}exception{:end}] {$message}");

foreach ($result->getRuleErrors($file) as $error) {
$this->out($format($error));
}
} elseif ($result->hasViolations($file)) {
$this->out("[Failed ] {$message}");
$this->out("[{:red}fail{:end} ] {$message}");

foreach ($result->getViolations($file) as $violation) {
$this->out($format($violation));
}
} else {
$this->out("[Passed ] {$message}");
$this->out("[{:green}pass{:end} ] {$message}");
}
}

Expand Down

0 comments on commit 2f90730

Please sign in to comment.