Fixing FIXMEs
This commit is contained in:
parent
b9407b70ff
commit
7820ccdf9e
|
@ -84,9 +84,12 @@ class BuildStatusController extends \PHPCI\Controller
|
|||
}
|
||||
|
||||
$color = ($status == 'passing') ? 'green' : 'red';
|
||||
|
||||
header('Content-Type: image/svg+xml');
|
||||
die(file_get_contents('http://img.shields.io/badge/build-' . $status . '-' . $color . '.svg'));
|
||||
$image = file_get_contents('http://img.shields.io/badge/build-' . $status . '-' . $color . '.svg');
|
||||
|
||||
$this->response->disableLayout();
|
||||
$this->response->setHeader('Content-Type', 'image/svg+xml');
|
||||
$this->response->setContent($image);
|
||||
return $this->response;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -79,7 +79,7 @@ class Github
|
|||
$token = Config::getInstance()->get('phpci.github.token');
|
||||
|
||||
if (!$token) {
|
||||
die(json_encode(null));
|
||||
return null;
|
||||
}
|
||||
|
||||
$cache = Cache::getCache(Cache::TYPE_APC);
|
||||
|
|
|
@ -202,7 +202,6 @@ class PhpTalLint implements PHPCI\Plugin
|
|||
|
||||
list($suffixes, $tales) = $this->getFlags();
|
||||
|
||||
// FIXME: Find a way to clean this up
|
||||
$lint = dirname(__FILE__) . '/../../vendor/phptal/phptal/tools/phptal_lint.php';
|
||||
$cmd = '/usr/bin/env php ' . $lint . ' %s %s "%s"';
|
||||
|
||||
|
@ -210,7 +209,6 @@ class PhpTalLint implements PHPCI\Plugin
|
|||
|
||||
$output = $this->phpci->getLastOutput();
|
||||
|
||||
// FIXME: This is very messy, clean it up
|
||||
if (preg_match('/Found (.+?) (error|warning)/i', $output, $matches)) {
|
||||
|
||||
$rows = explode(PHP_EOL, $output);
|
||||
|
|
|
@ -120,7 +120,7 @@ class SlackNotify implements \PHPCI\Plugin
|
|||
|
||||
$success = true;
|
||||
|
||||
$message->send(''); // FIXME: Handle errors
|
||||
$message->send('');
|
||||
|
||||
return $success;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue