private function printWarning(IOInterface $io, $message, PuliRunnerException $exception = null) { if (!$exception) { $reasonPhrase = ''; } elseif ($io->isVerbose()) { $reasonPhrase = $exception->getFullError(); } else { $reasonPhrase = $exception->getShortError(); } $io->writeError(sprintf('<warning>Warning: %s%s</warning>', $message, $reasonPhrase ? ': ' . $reasonPhrase : '.')); }