Merge branch 'master' into dc/workers

This commit is contained in:
Dan Cryer 2015-10-05 14:17:23 +01:00
commit 2858ce506a
5 changed files with 5 additions and 8 deletions

View file

@ -41,8 +41,7 @@ class BuildFactory
*/ */
public static function getBuild(Build $base) public static function getBuild(Build $base)
{ {
switch($base->getProject()->getType()) switch ($base->getProject()->getType()) {
{
case 'remote': case 'remote':
$type = 'RemoteGitBuild'; $type = 'RemoteGitBuild';
break; break;

View file

@ -71,7 +71,7 @@ class MailerFactory
} else { } else {
// Check defaults // Check defaults
switch($configName) { switch ($configName) {
case 'smtp_address': case 'smtp_address':
return "localhost"; return "localhost";
case 'default_mailto_address': case 'default_mailto_address':

View file

@ -54,8 +54,7 @@ class GithubBuild extends RemoteGitBuild
$url = 'https://api.github.com/repos/'.$project->getReference().'/statuses/'.$this->getCommitId(); $url = 'https://api.github.com/repos/'.$project->getReference().'/statuses/'.$this->getCommitId();
$http = new \b8\HttpClient(); $http = new \b8\HttpClient();
switch($this->getStatus()) switch ($this->getStatus()) {
{
case 0: case 0:
case 1: case 1:
$status = 'pending'; $status = 'pending';

View file

@ -69,8 +69,7 @@ class PackageBuild implements \PHPCI\Plugin
} }
foreach ($this->format as $format) { foreach ($this->format as $format) {
switch($format) switch ($format) {
{
case 'tar': case 'tar':
$cmd = 'tar cfz "%s/%s.tar.gz" ./*'; $cmd = 'tar cfz "%s/%s.tar.gz" ./*';
break; break;

View file

@ -47,7 +47,7 @@ class Factory
*/ */
public static function createProcessControl() public static function createProcessControl()
{ {
switch(true) { switch (true) {
case PosixProcessControl::isAvailable(): case PosixProcessControl::isAvailable():
return new PosixProcessControl(); return new PosixProcessControl();