public function setMessage($msg, $code = self::ERROR_CODE)
{
$this->messages[] = ['text' => $msg, 'code' => $code];
$current = $this->getValidationCode();
$map = [DeploymentStrategy::SUCCESS_CODE => 0, DeploymentStrategy::WARNING_CODE => 1, DeploymentStrategy::ERROR_CODE => 2];
if ($map[$current] < $map[$code]) {
$this->setValidationCode($code);
}
}