Code style and other small fixes
This commit is contained in:
parent
17f7dd7f5d
commit
052538e99c
|
@ -53,7 +53,6 @@ class Template extends View
|
|||
|
||||
protected function parse($string)
|
||||
{
|
||||
$lastCond = null;
|
||||
$keywords = ['ifnot', 'if', 'else', 'for', 'loop', '@', '/ifnot', '/if', '/for', '/loop'];
|
||||
|
||||
foreach (self::$templateFunctions as $function => $handler) {
|
||||
|
@ -80,8 +79,7 @@ class Template extends View
|
|||
|
||||
$cond = trim($this->readUntil('}', $string));
|
||||
$item['cond'] = $cond;
|
||||
$lastCond = $cond;
|
||||
$string = substr($string, 1);
|
||||
$string = substr($string, 1);
|
||||
|
||||
if (array_key_exists($keyword, self::$templateFunctions)) {
|
||||
$item['function_name'] = $keyword;
|
||||
|
|
|
@ -80,7 +80,7 @@ class Application extends b8\Application
|
|||
/**
|
||||
* Handle an incoming web request.
|
||||
*
|
||||
* @return b8\b8\Http\Response|Response
|
||||
* @return Response
|
||||
*/
|
||||
public function handleRequest()
|
||||
{
|
||||
|
|
|
@ -285,7 +285,7 @@ class Builder implements LoggerAwareInterface
|
|||
*/
|
||||
public function findBinary($binary, $quiet = false)
|
||||
{
|
||||
return $this->commandExecutor->findBinary($binary, $quiet = false);
|
||||
return $this->commandExecutor->findBinary($binary, $quiet);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -192,7 +192,7 @@ class DaemonCommand extends Command
|
|||
|
||||
$pid = intval(trim(file_get_contents($this->pidFilePath)));
|
||||
|
||||
if($this->processControl->isRunning($pid, true)) {
|
||||
if($this->processControl->isRunning($pid)) {
|
||||
return $pid;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ use Symfony\Component\Console\Input\InputOption;
|
|||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use PHPCI\Service\UserService;
|
||||
use Symfony\Component\Console\Question\ConfirmationQuestion;
|
||||
use Symfony\Component\Yaml\Dumper;
|
||||
|
||||
/**
|
||||
* Install console command - Installs PHPCI.
|
||||
|
@ -359,8 +360,8 @@ class InstallCommand extends Command
|
|||
*/
|
||||
protected function writeConfigFile(array $config)
|
||||
{
|
||||
$dumper = new \Symfony\Component\Yaml\Dumper();
|
||||
$yaml = $dumper->dump($config, 4);
|
||||
$dumper = new Dumper();
|
||||
$yaml = $dumper->dump($config, 4);
|
||||
|
||||
file_put_contents($this->configFilePath, $yaml);
|
||||
}
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
|
||||
namespace PHPCI\Command;
|
||||
|
||||
use b8\Config;
|
||||
use b8\Store\Factory;
|
||||
use Monolog\Logger;
|
||||
use PHPCI\BuildFactory;
|
||||
|
|
|
@ -120,7 +120,7 @@ class RunCommand extends Command
|
|||
|
||||
// After execution we no longer want to record the information
|
||||
// back to this specific build so the handler should be removed.
|
||||
$this->logger->popHandler($buildDbLog);
|
||||
$this->logger->popHandler();
|
||||
} catch (\Exception $ex) {
|
||||
$build->setStatus(Build::STATUS_FAILED);
|
||||
$build->setFinished(new \DateTime());
|
||||
|
|
|
@ -47,7 +47,7 @@ class UpdateCommand extends Command
|
|||
*/
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
if (!$this->verifyInstalled($output)) {
|
||||
if (!$this->verifyInstalled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,7 @@ class UpdateCommand extends Command
|
|||
$output->writeln('<info>'.Lang::get('ok').'</info>');
|
||||
}
|
||||
|
||||
protected function verifyInstalled(OutputInterface $output)
|
||||
protected function verifyInstalled()
|
||||
{
|
||||
$config = Config::getInstance();
|
||||
$phpciUrl = $config->get('phpci.url');
|
||||
|
|
|
@ -85,7 +85,8 @@ class Controller extends \b8\Controller
|
|||
* Handle the incoming request.
|
||||
* @param $action
|
||||
* @param $actionParams
|
||||
* @return \b8\b8\Http\Response|Response
|
||||
*
|
||||
* @return Response
|
||||
*/
|
||||
public function handleAction($action, $actionParams)
|
||||
{
|
||||
|
|
|
@ -18,6 +18,7 @@ use PHPCI\Helper\Lang;
|
|||
use PHPCI\Model\Build;
|
||||
use PHPCI\Model\Project;
|
||||
use PHPCI\Service\BuildService;
|
||||
use PHPCI\Controller;
|
||||
|
||||
/**
|
||||
* Build Controller - Allows users to run and view builds.
|
||||
|
@ -25,7 +26,7 @@ use PHPCI\Service\BuildService;
|
|||
* @package PHPCI
|
||||
* @subpackage Web
|
||||
*/
|
||||
class BuildController extends \PHPCI\Controller
|
||||
class BuildController extends Controller
|
||||
{
|
||||
/**
|
||||
* @var \PHPCI\Store\BuildStore
|
||||
|
|
|
@ -16,6 +16,7 @@ use PHPCI\BuildFactory;
|
|||
use PHPCI\Model\Project;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Service\BuildStatusService;
|
||||
use PHPCI\Controller;
|
||||
|
||||
/**
|
||||
* Build Status Controller - Allows external access to build status information / images.
|
||||
|
@ -23,7 +24,7 @@ use PHPCI\Service\BuildStatusService;
|
|||
* @package PHPCI
|
||||
* @subpackage Web
|
||||
*/
|
||||
class BuildStatusController extends \PHPCI\Controller
|
||||
class BuildStatusController extends Controller
|
||||
{
|
||||
/* @var \PHPCI\Store\ProjectStore */
|
||||
protected $projectStore;
|
||||
|
|
|
@ -13,6 +13,7 @@ use b8;
|
|||
use PHPCI\BuildFactory;
|
||||
use PHPCI\Helper\Lang;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Controller;
|
||||
|
||||
/**
|
||||
* Home Controller - Displays the PHPCI Dashboard.
|
||||
|
@ -20,7 +21,7 @@ use PHPCI\Model\Build;
|
|||
* @package PHPCI
|
||||
* @subpackage Web
|
||||
*/
|
||||
class HomeController extends \PHPCI\Controller
|
||||
class HomeController extends Controller
|
||||
{
|
||||
/**
|
||||
* @var \PHPCI\Store\BuildStore
|
||||
|
|
|
@ -14,6 +14,7 @@ use PHPCI\Helper\Lang;
|
|||
use PHPCI\Plugin\Util\ComposerPluginInformation;
|
||||
use PHPCI\Plugin\Util\FilesPluginInformation;
|
||||
use PHPCI\Plugin\Util\PluginInformationCollection;
|
||||
use PHPCI\Controller;
|
||||
|
||||
/**
|
||||
* Plugin Controller - Provides support for installing Composer packages.
|
||||
|
@ -21,7 +22,7 @@ use PHPCI\Plugin\Util\PluginInformationCollection;
|
|||
* @package PHPCI
|
||||
* @subpackage Web
|
||||
*/
|
||||
class PluginController extends \PHPCI\Controller
|
||||
class PluginController extends Controller
|
||||
{
|
||||
/**
|
||||
* List all enabled plugins, installed and recommend packages.
|
||||
|
|
|
@ -12,6 +12,7 @@ namespace PHPCI\Controller;
|
|||
use b8;
|
||||
use PHPCI\Helper\Email;
|
||||
use PHPCI\Helper\Lang;
|
||||
use PHPCI\Controller;
|
||||
|
||||
/**
|
||||
* Session Controller - Handles user login / logout.
|
||||
|
@ -19,7 +20,7 @@ use PHPCI\Helper\Lang;
|
|||
* @package PHPCI
|
||||
* @subpackage Web
|
||||
*/
|
||||
class SessionController extends \PHPCI\Controller
|
||||
class SessionController extends Controller
|
||||
{
|
||||
/**
|
||||
* @var \PHPCI\Store\UserStore
|
||||
|
|
|
@ -12,11 +12,13 @@ namespace PHPCI\Controller;
|
|||
use b8;
|
||||
use b8\Store;
|
||||
use Exception;
|
||||
use PHPCI\BuildFactory;
|
||||
use PHPCI\Model\Project;
|
||||
use PHPCI\Service\BuildService;
|
||||
use PHPCI\Store\BuildStore;
|
||||
use PHPCI\Store\ProjectStore;
|
||||
use b8\Controller;
|
||||
use b8\Config;
|
||||
use b8\HttpClient;
|
||||
|
||||
/**
|
||||
* Webhook Controller - Processes webhook pings from BitBucket, Github, Gitlab, etc.
|
||||
|
@ -30,7 +32,7 @@ use PHPCI\Store\ProjectStore;
|
|||
*
|
||||
* @SuppressWarnings(PHPMD.ExcessiveClassComplexity)
|
||||
*/
|
||||
class WebhookController extends \b8\Controller
|
||||
class WebhookController extends Controller
|
||||
{
|
||||
/**
|
||||
* @var BuildStore
|
||||
|
@ -170,6 +172,8 @@ class WebhookController extends \b8\Controller
|
|||
* Called by POSTing to /webhook/git/<project_id>?branch=<branch>&commit=<commit>
|
||||
*
|
||||
* @param string $projectId
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function git($projectId)
|
||||
{
|
||||
|
@ -272,9 +276,13 @@ class WebhookController extends \b8\Controller
|
|||
|
||||
/**
|
||||
* Handle the payload when Github sends a Pull Request webhook.
|
||||
*
|
||||
*
|
||||
* @param Project $project
|
||||
* @param array $payload
|
||||
* @param array $payload
|
||||
*
|
||||
* @return array
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function githubPullRequest(Project $project, array $payload)
|
||||
{
|
||||
|
@ -284,18 +292,18 @@ class WebhookController extends \b8\Controller
|
|||
}
|
||||
|
||||
$headers = [];
|
||||
$token = \b8\Config::getInstance()->get('phpci.github.token');
|
||||
$token = Config::getInstance()->get('phpci.github.token');
|
||||
|
||||
if (!empty($token)) {
|
||||
$headers[] = 'Authorization: token ' . $token;
|
||||
}
|
||||
|
||||
$url = $payload['pull_request']['commits_url'];
|
||||
$http = new \b8\HttpClient();
|
||||
$http = new HttpClient();
|
||||
$http->setHeaders($headers);
|
||||
|
||||
//for large pull requests, allow grabbing more then the default number of commits
|
||||
$custom_per_page = \b8\Config::getInstance()->get('phpci.github.per_page');
|
||||
$custom_per_page = Config::getInstance()->get('phpci.github.per_page');
|
||||
$params = [];
|
||||
if ($custom_per_page) {
|
||||
$params["per_page"] = $custom_per_page;
|
||||
|
|
|
@ -68,7 +68,9 @@ abstract class BaseCommandExecutor implements CommandExecutor
|
|||
|
||||
/**
|
||||
* Executes shell commands.
|
||||
*
|
||||
* @param array $args
|
||||
*
|
||||
* @return bool Indicates success
|
||||
*/
|
||||
public function executeCommand($args = [])
|
||||
|
|
|
@ -14,9 +14,12 @@ interface CommandExecutor
|
|||
/**
|
||||
* Executes shell commands. Accepts multiple arguments the first
|
||||
* is the template and everything else is inserted in. c.f. sprintf
|
||||
*
|
||||
* @param array $args
|
||||
*
|
||||
* @return bool Indicates success
|
||||
*/
|
||||
public function executeCommand();
|
||||
public function executeCommand($args = []);
|
||||
|
||||
/**
|
||||
* Returns the output from the last command run.
|
||||
|
@ -25,6 +28,7 @@ interface CommandExecutor
|
|||
|
||||
/**
|
||||
* Find a binary required by a plugin.
|
||||
*
|
||||
* @param string $binary
|
||||
* @param bool $quiet Returns null instead of throwing an execption.
|
||||
*
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
namespace PHPCI\Helper;
|
||||
|
||||
use b8\Config;
|
||||
use PHPCI\Helper\MailerFactory;
|
||||
|
||||
/**
|
||||
* Helper class for sending emails using PHPCI's email configuration.
|
||||
|
|
|
@ -8,6 +8,7 @@ namespace PHPCI\Model\Base;
|
|||
|
||||
use PHPCI\Model;
|
||||
use b8\Store\Factory;
|
||||
use PHPCI\Model\Project;
|
||||
|
||||
/**
|
||||
* Build Base Model
|
||||
|
@ -598,7 +599,7 @@ class BuildBase extends Model
|
|||
public function setProject($value)
|
||||
{
|
||||
// Is this an instance of Project?
|
||||
if ($value instanceof \PHPCI\Model\Project) {
|
||||
if ($value instanceof Project) {
|
||||
return $this->setProjectObject($value);
|
||||
}
|
||||
|
||||
|
@ -614,9 +615,9 @@ class BuildBase extends Model
|
|||
/**
|
||||
* Set Project - Accepts a Project model.
|
||||
*
|
||||
* @param $value \PHPCI\Model\Project
|
||||
* @param $value Project
|
||||
*/
|
||||
public function setProjectObject(\PHPCI\Model\Project $value)
|
||||
public function setProjectObject(Project $value)
|
||||
{
|
||||
return $this->setProjectId($value->getId());
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ namespace PHPCI\Model\Base;
|
|||
|
||||
use PHPCI\Model;
|
||||
use b8\Store\Factory;
|
||||
use PHPCI\Model\Build;
|
||||
|
||||
/**
|
||||
* BuildError Base Model
|
||||
|
@ -478,7 +479,7 @@ class BuildErrorBase extends Model
|
|||
public function setBuild($value)
|
||||
{
|
||||
// Is this an instance of Build?
|
||||
if ($value instanceof \PHPCI\Model\Build) {
|
||||
if ($value instanceof Build) {
|
||||
return $this->setBuildObject($value);
|
||||
}
|
||||
|
||||
|
@ -494,9 +495,9 @@ class BuildErrorBase extends Model
|
|||
/**
|
||||
* Set Build - Accepts a Build model.
|
||||
*
|
||||
* @param $value \PHPCI\Model\Build
|
||||
* @param $value Build
|
||||
*/
|
||||
public function setBuildObject(\PHPCI\Model\Build $value)
|
||||
public function setBuildObject(Build $value)
|
||||
{
|
||||
return $this->setBuildId($value->getId());
|
||||
}
|
||||
|
|
|
@ -8,6 +8,8 @@ namespace PHPCI\Model\Base;
|
|||
|
||||
use PHPCI\Model;
|
||||
use b8\Store\Factory;
|
||||
use PHPCI\Model\Project;
|
||||
use PHPCI\Model\Build;
|
||||
|
||||
/**
|
||||
* BuildMeta Base Model
|
||||
|
@ -325,7 +327,7 @@ class BuildMetaBase extends Model
|
|||
public function setProject($value)
|
||||
{
|
||||
// Is this an instance of Project?
|
||||
if ($value instanceof \PHPCI\Model\Project) {
|
||||
if ($value instanceof Project) {
|
||||
return $this->setProjectObject($value);
|
||||
}
|
||||
|
||||
|
@ -341,9 +343,9 @@ class BuildMetaBase extends Model
|
|||
/**
|
||||
* Set Project - Accepts a Project model.
|
||||
*
|
||||
* @param $value \PHPCI\Model\Project
|
||||
* @param $value Project
|
||||
*/
|
||||
public function setProjectObject(\PHPCI\Model\Project $value)
|
||||
public function setProjectObject(Project $value)
|
||||
{
|
||||
return $this->setProjectId($value->getId());
|
||||
}
|
||||
|
@ -382,7 +384,7 @@ class BuildMetaBase extends Model
|
|||
public function setBuild($value)
|
||||
{
|
||||
// Is this an instance of Build?
|
||||
if ($value instanceof \PHPCI\Model\Build) {
|
||||
if ($value instanceof Build) {
|
||||
return $this->setBuildObject($value);
|
||||
}
|
||||
|
||||
|
@ -398,9 +400,9 @@ class BuildMetaBase extends Model
|
|||
/**
|
||||
* Set Build - Accepts a Build model.
|
||||
*
|
||||
* @param $value \PHPCI\Model\Build
|
||||
* @param $value Build
|
||||
*/
|
||||
public function setBuildObject(\PHPCI\Model\Build $value)
|
||||
public function setBuildObject(Build $value)
|
||||
{
|
||||
return $this->setBuildId($value->getId());
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ namespace PHPCI\Model\Base;
|
|||
|
||||
use PHPCI\Model;
|
||||
use b8\Store\Factory;
|
||||
use PHPCI\Model\ProjectGroup;
|
||||
|
||||
/**
|
||||
* Project Base Model
|
||||
|
@ -628,7 +629,7 @@ class ProjectBase extends Model
|
|||
public function setGroup($value)
|
||||
{
|
||||
// Is this an instance of ProjectGroup?
|
||||
if ($value instanceof \PHPCI\Model\ProjectGroup) {
|
||||
if ($value instanceof ProjectGroup) {
|
||||
return $this->setGroupObject($value);
|
||||
}
|
||||
|
||||
|
@ -644,9 +645,9 @@ class ProjectBase extends Model
|
|||
/**
|
||||
* Set Group - Accepts a ProjectGroup model.
|
||||
*
|
||||
* @param $value \PHPCI\Model\ProjectGroup
|
||||
* @param $value ProjectGroup
|
||||
*/
|
||||
public function setGroupObject(\PHPCI\Model\ProjectGroup $value)
|
||||
public function setGroupObject(ProjectGroup $value)
|
||||
{
|
||||
return $this->setGroupId($value->getId());
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
namespace PHPCI\Model\Base;
|
||||
|
||||
use PHPCI\Model;
|
||||
use b8\Store\Factory;
|
||||
|
||||
/**
|
||||
* User Base Model
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
namespace PHPCI\Model\Build;
|
||||
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Model\Build\RemoteGitBuild;
|
||||
|
||||
/**
|
||||
* BitBucket Build Model
|
||||
|
|
|
@ -12,7 +12,9 @@ namespace PHPCI\Model\Build;
|
|||
use PHPCI\Builder;
|
||||
use PHPCI\Helper\Diff;
|
||||
use PHPCI\Helper\Github;
|
||||
use PHPCI\Model\Build\RemoteGitBuild;
|
||||
use b8\Config;
|
||||
use b8\HttpClient;
|
||||
use PHPCI\Model\BuildError;
|
||||
|
||||
/**
|
||||
* Github Build Model
|
||||
|
@ -43,7 +45,7 @@ class GithubBuild extends RemoteGitBuild
|
|||
*/
|
||||
public function sendStatusPostback()
|
||||
{
|
||||
$token = \b8\Config::getInstance()->get('phpci.github.token');
|
||||
$token = Config::getInstance()->get('phpci.github.token');
|
||||
|
||||
if (empty($token) || empty($this->data['id'])) {
|
||||
return;
|
||||
|
@ -56,7 +58,7 @@ class GithubBuild extends RemoteGitBuild
|
|||
}
|
||||
|
||||
$url = 'https://api.github.com/repos/'.$project->getReference().'/statuses/'.$this->getCommitId();
|
||||
$http = new \b8\HttpClient();
|
||||
$http = new HttpClient();
|
||||
|
||||
switch ($this->getStatus()) {
|
||||
case 0:
|
||||
|
@ -78,7 +80,7 @@ class GithubBuild extends RemoteGitBuild
|
|||
break;
|
||||
}
|
||||
|
||||
$phpciUrl = \b8\Config::getInstance()->get('phpci.url');
|
||||
$phpciUrl = Config::getInstance()->get('phpci.url');
|
||||
|
||||
$params = [
|
||||
'state' => $status,
|
||||
|
@ -112,11 +114,12 @@ class GithubBuild extends RemoteGitBuild
|
|||
|
||||
/**
|
||||
* Get a parsed version of the commit message, with links to issues and commits.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getCommitMessage()
|
||||
{
|
||||
$rtn = parent::getCommitMessage($this->data['commit_message']);
|
||||
$rtn = parent::getCommitMessage();
|
||||
|
||||
$project = $this->getProject();
|
||||
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
|
||||
namespace PHPCI\Model\Build;
|
||||
|
||||
use PHPCI\Model\Build\RemoteGitBuild;
|
||||
|
||||
/**
|
||||
* Gitlab Build Model
|
||||
* @author André Cianfarani <a.cianfarani@c2is.fr>
|
||||
|
|
|
@ -12,12 +12,13 @@ namespace PHPCI\Plugin;
|
|||
use PHPCI\Builder;
|
||||
use PHPCI\Helper\Lang;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* Atoum plugin, runs Atoum tests within a project.
|
||||
* @package PHPCI\Plugin
|
||||
*/
|
||||
class Atoum implements \PHPCI\Plugin
|
||||
class Atoum implements Plugin
|
||||
{
|
||||
private $args;
|
||||
private $config;
|
||||
|
|
|
@ -13,6 +13,7 @@ use PHPCI\Builder;
|
|||
use PHPCI\Helper\Lang;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Model\BuildError;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* Behat BDD Plugin
|
||||
|
@ -20,7 +21,7 @@ use PHPCI\Model\BuildError;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class Behat implements \PHPCI\Plugin
|
||||
class Behat implements Plugin
|
||||
{
|
||||
protected $phpci;
|
||||
protected $build;
|
||||
|
|
|
@ -12,6 +12,7 @@ namespace PHPCI\Plugin;
|
|||
use PHPCI\Builder;
|
||||
use PHPCI\Helper\Lang;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* Campfire Plugin - Allows Campfire API actions.
|
||||
|
@ -20,7 +21,7 @@ use PHPCI\Model\Build;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class Campfire implements \PHPCI\Plugin
|
||||
class Campfire implements Plugin
|
||||
{
|
||||
private $url;
|
||||
private $authToken;
|
||||
|
|
|
@ -11,6 +11,7 @@ namespace PHPCI\Plugin;
|
|||
|
||||
use PHPCI\Builder;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* Clean build removes Composer related files and allows PHPCI users to clean up their build directory.
|
||||
|
@ -19,7 +20,7 @@ use PHPCI\Model\Build;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class CleanBuild implements \PHPCI\Plugin
|
||||
class CleanBuild implements Plugin
|
||||
{
|
||||
protected $remove;
|
||||
protected $phpci;
|
||||
|
|
|
@ -14,6 +14,8 @@ use PHPCI\Helper\Lang;
|
|||
use PHPCI\Model\Build;
|
||||
use PHPCI\Plugin\Util\TestResultParsers\Codeception as Parser;
|
||||
use Psr\Log\LogLevel;
|
||||
use PHPCI\Plugin;
|
||||
use PHPCI\ZeroConfigPlugin;
|
||||
|
||||
/**
|
||||
* Codeception Plugin - Enables full acceptance, unit, and functional testing.
|
||||
|
@ -23,7 +25,7 @@ use Psr\Log\LogLevel;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class Codeception implements \PHPCI\Plugin, \PHPCI\ZeroConfigPlugin
|
||||
class Codeception implements Plugin, ZeroConfigPlugin
|
||||
{
|
||||
/** @var string */
|
||||
protected $args = '';
|
||||
|
|
|
@ -12,7 +12,6 @@ namespace PHPCI\Plugin;
|
|||
use PHPCI;
|
||||
use PHPCI\Builder;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Helper\Lang;
|
||||
|
||||
/**
|
||||
* Composer Plugin - Provides access to Composer functionality.
|
||||
|
|
|
@ -12,6 +12,7 @@ namespace PHPCI\Plugin;
|
|||
use PHPCI\Builder;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Helper\Lang;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* Copy Build Plugin - Copies the entire build to another directory.
|
||||
|
@ -19,7 +20,7 @@ use PHPCI\Helper\Lang;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class CopyBuild implements \PHPCI\Plugin
|
||||
class CopyBuild implements Plugin
|
||||
{
|
||||
protected $directory;
|
||||
protected $ignore;
|
||||
|
|
|
@ -12,6 +12,7 @@ namespace PHPCI\Plugin;
|
|||
use b8\HttpClient;
|
||||
use PHPCI\Builder;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* Integrates PHPCI with Deployer: https://github.com/rebelinblue/deployer
|
||||
|
@ -19,7 +20,7 @@ use PHPCI\Model\Build;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class Deployer implements \PHPCI\Plugin
|
||||
class Deployer implements Plugin
|
||||
{
|
||||
protected $webhookUrl;
|
||||
protected $reason;
|
||||
|
|
|
@ -12,10 +12,10 @@ namespace PHPCI\Plugin;
|
|||
use Exception;
|
||||
use b8\View;
|
||||
use PHPCI\Builder;
|
||||
use PHPCI\Helper\Lang;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Helper\Email as EmailHelper;
|
||||
use Psr\Log\LogLevel;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* Email Plugin - Provides simple email capability to PHPCI.
|
||||
|
@ -23,7 +23,7 @@ use Psr\Log\LogLevel;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class Email implements \PHPCI\Plugin
|
||||
class Email implements Plugin
|
||||
{
|
||||
/**
|
||||
* @var \PHPCI\Builder
|
||||
|
|
|
@ -12,6 +12,7 @@ namespace PHPCI\Plugin;
|
|||
use PHPCI\Builder;
|
||||
use PHPCI\Helper\Lang;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* Environment variable plugin
|
||||
|
@ -19,7 +20,7 @@ use PHPCI\Model\Build;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class Env implements \PHPCI\Plugin
|
||||
class Env implements Plugin
|
||||
{
|
||||
protected $phpci;
|
||||
protected $build;
|
||||
|
|
|
@ -12,6 +12,7 @@ use PHPCI\Builder;
|
|||
use PHPCI\Model\Build;
|
||||
use Mremi\Flowdock\Api\Push\Push;
|
||||
use Mremi\Flowdock\Api\Push\TeamInboxMessage;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* Flowdock Plugin
|
||||
|
@ -19,7 +20,7 @@ use Mremi\Flowdock\Api\Push\TeamInboxMessage;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class FlowdockNotify implements \PHPCI\Plugin
|
||||
class FlowdockNotify implements Plugin
|
||||
{
|
||||
private $api_key;
|
||||
private $email;
|
||||
|
|
|
@ -12,6 +12,7 @@ namespace PHPCI\Plugin;
|
|||
use PHPCI\Builder;
|
||||
use PHPCI\Helper\Lang;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* Git plugin.
|
||||
|
@ -19,7 +20,7 @@ use PHPCI\Model\Build;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class Git implements \PHPCI\Plugin
|
||||
class Git implements Plugin
|
||||
{
|
||||
protected $phpci;
|
||||
protected $build;
|
||||
|
|
|
@ -11,6 +11,7 @@ namespace PHPCI\Plugin;
|
|||
|
||||
use PHPCI\Builder;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* Grunt Plugin - Provides access to grunt functionality.
|
||||
|
@ -18,7 +19,7 @@ use PHPCI\Model\Build;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class Grunt implements \PHPCI\Plugin
|
||||
class Grunt implements Plugin
|
||||
{
|
||||
protected $directory;
|
||||
protected $task;
|
||||
|
|
|
@ -11,6 +11,7 @@ namespace PHPCI\Plugin;
|
|||
|
||||
use PHPCI\Builder;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* Gulp Plugin - Provides access to gulp functionality.
|
||||
|
@ -18,7 +19,7 @@ use PHPCI\Model\Build;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class Gulp implements \PHPCI\Plugin
|
||||
class Gulp implements Plugin
|
||||
{
|
||||
protected $directory;
|
||||
protected $task;
|
||||
|
|
|
@ -12,6 +12,8 @@ namespace PHPCI\Plugin;
|
|||
use PHPCI\Builder;
|
||||
use PHPCI\Helper\Lang;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Plugin;
|
||||
use HipChat\HipChat;
|
||||
|
||||
/**
|
||||
* Hipchat Plugin
|
||||
|
@ -19,7 +21,7 @@ use PHPCI\Model\Build;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class HipchatNotify implements \PHPCI\Plugin
|
||||
class HipchatNotify implements Plugin
|
||||
{
|
||||
protected $authToken;
|
||||
protected $color;
|
||||
|
@ -73,7 +75,7 @@ class HipchatNotify implements \PHPCI\Plugin
|
|||
*/
|
||||
public function execute()
|
||||
{
|
||||
$hipChat = new \HipChat\HipChat($this->authToken);
|
||||
$hipChat = new HipChat($this->authToken);
|
||||
$message = $this->phpci->interpolate($this->message);
|
||||
|
||||
$result = true;
|
||||
|
|
|
@ -12,6 +12,7 @@ namespace PHPCI\Plugin;
|
|||
use PHPCI\Builder;
|
||||
use PHPCI\Helper\Lang;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* IRC Plugin - Sends a notification to an IRC channel
|
||||
|
@ -19,7 +20,7 @@ use PHPCI\Model\Build;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class Irc implements \PHPCI\Plugin
|
||||
class Irc implements Plugin
|
||||
{
|
||||
protected $phpci;
|
||||
protected $build;
|
||||
|
|
|
@ -13,6 +13,8 @@ use PDO;
|
|||
use PHPCI\Builder;
|
||||
use PHPCI\Helper\Lang;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Plugin;
|
||||
use b8\Database;
|
||||
|
||||
/**
|
||||
* MySQL Plugin - Provides access to a MySQL database.
|
||||
|
@ -21,7 +23,7 @@ use PHPCI\Model\Build;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class Mysql implements \PHPCI\Plugin
|
||||
class Mysql implements Plugin
|
||||
{
|
||||
/**
|
||||
* @var \PHPCI\Builder
|
||||
|
@ -65,7 +67,7 @@ class Mysql implements \PHPCI\Plugin
|
|||
|
||||
$this->queries = $options;
|
||||
|
||||
$config = \b8\Database::getConnection('write')->getDetails();
|
||||
$config = Database::getConnection('write')->getDetails();
|
||||
|
||||
$this->host =(defined('PHPCI_DB_HOST')) ? PHPCI_DB_HOST : null;
|
||||
$this->user = $config['user'];
|
||||
|
|
|
@ -11,6 +11,7 @@ namespace PHPCI\Plugin;
|
|||
|
||||
use PHPCI\Builder;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* Create a ZIP or TAR.GZ archive of the entire build.
|
||||
|
@ -18,7 +19,7 @@ use PHPCI\Model\Build;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class PackageBuild implements \PHPCI\Plugin
|
||||
class PackageBuild implements Plugin
|
||||
{
|
||||
protected $directory;
|
||||
protected $filename;
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
namespace PHPCI\Plugin;
|
||||
|
||||
use PHPCI\Builder;
|
||||
use PHPCI\Helper\Lang;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* Pdepend Plugin - Allows Pdepend report
|
||||
|
@ -19,7 +19,7 @@ use PHPCI\Model\Build;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class Pdepend implements \PHPCI\Plugin
|
||||
class Pdepend implements Plugin
|
||||
{
|
||||
protected $args;
|
||||
/**
|
||||
|
|
|
@ -12,6 +12,7 @@ namespace PHPCI\Plugin;
|
|||
use PDO;
|
||||
use PHPCI\Builder;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* PgSQL Plugin - Provides access to a PgSQL database.
|
||||
|
@ -19,7 +20,7 @@ use PHPCI\Model\Build;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class Pgsql implements \PHPCI\Plugin
|
||||
class Pgsql implements Plugin
|
||||
{
|
||||
/**
|
||||
* @var \PHPCI\Builder
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
|
||||
namespace PHPCI\Plugin;
|
||||
|
||||
use Exception;
|
||||
|
@ -6,11 +7,12 @@ use PHPCI\Builder;
|
|||
use PHPCI\Helper\Lang;
|
||||
use PHPCI\Model\Build;
|
||||
use Phar as PHPPhar;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* Phar Plugin
|
||||
*/
|
||||
class Phar implements \PHPCI\Plugin
|
||||
class Phar implements Plugin
|
||||
{
|
||||
/**
|
||||
* PHPCI
|
||||
|
@ -90,7 +92,7 @@ class Phar implements \PHPCI\Plugin
|
|||
/**
|
||||
* Returns PHPCI
|
||||
*
|
||||
* @return PHPCI
|
||||
* @return Builder
|
||||
*/
|
||||
public function getPHPCI()
|
||||
{
|
||||
|
|
|
@ -12,6 +12,7 @@ namespace PHPCI\Plugin;
|
|||
use PHPCI\Builder;
|
||||
use PHPCI\Helper\Lang;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* Phing Plugin - Provides access to Phing functionality.
|
||||
|
@ -20,7 +21,7 @@ use PHPCI\Model\Build;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class Phing implements \PHPCI\Plugin
|
||||
class Phing implements Plugin
|
||||
{
|
||||
|
||||
private $directory;
|
||||
|
|
|
@ -13,6 +13,7 @@ use PHPCI\Builder;
|
|||
use PHPCI\Helper\Lang;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Model\BuildError;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* PHP Copy / Paste Detector - Allows PHP Copy / Paste Detector testing.
|
||||
|
@ -20,7 +21,7 @@ use PHPCI\Model\BuildError;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class PhpCpd implements \PHPCI\Plugin
|
||||
class PhpCpd implements Plugin
|
||||
{
|
||||
protected $directory;
|
||||
protected $args;
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
namespace PHPCI\Plugin;
|
||||
|
||||
use PHPCI\Builder;
|
||||
use PHPCI\Helper\Lang;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* PHP CS Fixer - Works with the PHP Coding Standards Fixer for testing coding standards.
|
||||
|
@ -19,7 +19,7 @@ use PHPCI\Model\Build;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class PhpCsFixer implements \PHPCI\Plugin
|
||||
class PhpCsFixer implements Plugin
|
||||
{
|
||||
/**
|
||||
* @var \PHPCI\Builder
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
namespace PHPCI\Plugin;
|
||||
|
||||
use PHPCI\Builder;
|
||||
use PHPCI\Helper\Lang;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* Php Parallel Lint Plugin - Provides access to PHP lint functionality.
|
||||
|
@ -19,7 +19,7 @@ use PHPCI\Model\Build;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class PhpParallelLint implements \PHPCI\Plugin
|
||||
class PhpParallelLint implements Plugin
|
||||
{
|
||||
/**
|
||||
* @var \PHPCI\Builder
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
namespace PHPCI\Plugin;
|
||||
|
||||
use PHPCI\Builder;
|
||||
use PHPCI\Helper\Lang;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* Shell Plugin - Allows execute shell commands.
|
||||
|
@ -19,7 +19,7 @@ use PHPCI\Model\Build;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class Shell implements \PHPCI\Plugin
|
||||
class Shell implements Plugin
|
||||
{
|
||||
/**
|
||||
* @var \PHPCI\Builder
|
||||
|
|
|
@ -10,6 +10,10 @@ namespace PHPCI\Plugin;
|
|||
|
||||
use PHPCI\Builder;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Plugin;
|
||||
use Maknz\Slack\Client;
|
||||
use Maknz\Slack\Attachment;
|
||||
use Maknz\Slack\AttachmentField;
|
||||
|
||||
/**
|
||||
* Slack Plugin
|
||||
|
@ -17,7 +21,7 @@ use PHPCI\Model\Build;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class SlackNotify implements \PHPCI\Plugin
|
||||
class SlackNotify implements Plugin
|
||||
{
|
||||
private $webHook;
|
||||
private $room;
|
||||
|
@ -83,7 +87,7 @@ class SlackNotify implements \PHPCI\Plugin
|
|||
{
|
||||
$body = $this->phpci->interpolate($this->message);
|
||||
|
||||
$client = new \Maknz\Slack\Client($this->webHook);
|
||||
$client = new Client($this->webHook);
|
||||
|
||||
$message = $client->createMessage();
|
||||
|
||||
|
@ -112,12 +116,12 @@ class SlackNotify implements \PHPCI\Plugin
|
|||
}
|
||||
|
||||
// Build up the attachment data
|
||||
$attachment = new \Maknz\Slack\Attachment([
|
||||
$attachment = new Attachment([
|
||||
'fallback' => $body,
|
||||
'pretext' => $body,
|
||||
'color' => $color,
|
||||
'fields' => [
|
||||
new \Maknz\Slack\AttachmentField([
|
||||
new AttachmentField([
|
||||
'title' => 'Status',
|
||||
'value' => $status,
|
||||
'short' => false
|
||||
|
|
|
@ -12,6 +12,7 @@ namespace PHPCI\Plugin;
|
|||
use PDO;
|
||||
use PHPCI\Builder;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* SQLite Plugin — Provides access to a SQLite database.
|
||||
|
@ -19,7 +20,7 @@ use PHPCI\Model\Build;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class Sqlite implements \PHPCI\Plugin
|
||||
class Sqlite implements Plugin
|
||||
{
|
||||
/**
|
||||
* @var \PHPCI\Builder
|
||||
|
|
|
@ -236,7 +236,7 @@ class Executor
|
|||
/**
|
||||
* Sets the summary data of the current build.
|
||||
*
|
||||
* @param array summary
|
||||
* @param array $summary
|
||||
*/
|
||||
private function setBuildSummary($summary)
|
||||
{
|
||||
|
|
|
@ -11,6 +11,7 @@ namespace PHPCI\Plugin;
|
|||
|
||||
use PHPCI\Builder;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* Wipe Plugin - Wipes a folder
|
||||
|
@ -18,7 +19,7 @@ use PHPCI\Model\Build;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class Wipe implements \PHPCI\Plugin
|
||||
class Wipe implements Plugin
|
||||
{
|
||||
/**
|
||||
* @var \PHPCI\Builder
|
||||
|
|
|
@ -11,6 +11,7 @@ namespace PHPCI\Plugin;
|
|||
|
||||
use PHPCI\Builder;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Plugin;
|
||||
|
||||
/**
|
||||
* XMPP Notification - Send notification for successful or failure build
|
||||
|
@ -18,7 +19,7 @@ use PHPCI\Model\Build;
|
|||
* @package PHPCI
|
||||
* @subpackage Plugins
|
||||
*/
|
||||
class XMPP implements \PHPCI\Plugin
|
||||
class XMPP implements Plugin
|
||||
{
|
||||
protected $directory;
|
||||
protected $phpci;
|
||||
|
|
|
@ -19,7 +19,8 @@ class WindowsProcessControl implements ProcessControlInterface
|
|||
/**
|
||||
* Check if the process is running using the "tasklist" command.
|
||||
*
|
||||
* @param type $pid
|
||||
* @param integer $pid
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isRunning($pid)
|
||||
|
@ -32,7 +33,8 @@ class WindowsProcessControl implements ProcessControlInterface
|
|||
/**
|
||||
* Terminate the process using the "taskkill" command.
|
||||
*
|
||||
* @param type $pid
|
||||
* @param integer $pid
|
||||
*
|
||||
* @param bool $forcefully
|
||||
*/
|
||||
public function kill($pid, $forcefully = false)
|
||||
|
|
|
@ -21,8 +21,9 @@ class BuildMetaStore extends BuildMetaStoreBase
|
|||
{
|
||||
/**
|
||||
* Only used by an upgrade migration to move errors from build_meta to build_error
|
||||
* @param $start
|
||||
*
|
||||
* @param $limit
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getErrorsForUpgrade($limit)
|
||||
|
|
|
@ -47,7 +47,7 @@ class BuildStore extends BuildStoreBase
|
|||
$res = $stmt->fetchAll(\PDO::FETCH_ASSOC);
|
||||
|
||||
$map = function ($item) {
|
||||
return new \PHPCI\Model\Build($item);
|
||||
return new Build($item);
|
||||
};
|
||||
$rtn = array_map($map, $res);
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
<div class="container">
|
||||
<div class="row" style="margin-top: 10%; text-align: center">
|
||||
<a id="phpci-logo" href="https://www.phptesting.org">
|
||||
<img src="<?php print PHPCI_URL; ?>/assets/img/logo-large.png">
|
||||
<img src="<?php print PHPCI_URL; ?>assets/img/logo-large.png">
|
||||
</a>
|
||||
<div class="" id="login-box">
|
||||
<?php print $content; ?>
|
||||
|
|
|
@ -90,22 +90,7 @@ foreach($projects as $project):
|
|||
?>
|
||||
|
||||
<div class="small-box <?php print $containerClass; ?> bg-<?php print $subcls; ?>">
|
||||
|
||||
<?php if (count($projects) > 5): ?>
|
||||
|
||||
<div class="inner">
|
||||
<h4>
|
||||
<strong>
|
||||
<a href="<?php print PHPCI_URL; ?>project/view/<?php print $project->getId(); ?>">
|
||||
<?php print $project->getTitle(); ?>
|
||||
</a>
|
||||
</strong> -
|
||||
<?php print $shortMessage; ?>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
|
||||
<div class="inner">
|
||||
<h3>
|
||||
<a href="<?php print PHPCI_URL; ?>project/view/<?php print $project->getId(); ?>">
|
||||
|
@ -125,8 +110,6 @@ foreach($projects as $project):
|
|||
<?php Lang::out('view_project'); ?> (<?php print $counts[$project->getId()]; ?>) <i class="fa fa-arrow-circle-right"></i>
|
||||
</a>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
<?php for ($idx=0; $idx < 5; $idx++) {
|
||||
if (empty($builds[$project->getId()][$idx])) {
|
||||
echo '<span class="small-box-footer-build small-box-footer bg-blue"><i class="fa fa-minus"></i></span>';
|
||||
|
|
|
@ -116,8 +116,7 @@ class BuildWorker
|
|||
if (!empty($jobData['config'])) {
|
||||
$this->logger->addDebug('Using job-specific config.');
|
||||
$currentConfig = Config::getInstance()->getArray();
|
||||
$config = new Config($jobData['config']);
|
||||
Database::reset($config);
|
||||
Database::reset();
|
||||
}
|
||||
|
||||
try {
|
||||
|
@ -138,7 +137,7 @@ class BuildWorker
|
|||
|
||||
// After execution we no longer want to record the information
|
||||
// back to this specific build so the handler should be removed.
|
||||
$this->logger->popHandler($buildDbLog);
|
||||
$this->logger->popHandler();
|
||||
} catch (\PDOException $ex) {
|
||||
// If we've caught a PDO Exception, it is probably not the fault of the build, but of a failed
|
||||
// connection or similar. Release the job and kill the worker.
|
||||
|
@ -154,8 +153,7 @@ class BuildWorker
|
|||
|
||||
// Reset the config back to how it was prior to running this job:
|
||||
if (!empty($currentConfig)) {
|
||||
$config = new Config($currentConfig);
|
||||
Database::reset($config);
|
||||
Database::reset();
|
||||
}
|
||||
|
||||
// Delete the job when we're done:
|
||||
|
|
|
@ -1 +1 @@
|
|||
<?php print $action . $method; ?>
|
||||
<?= $action . $method; ?>
|
||||
|
|
|
@ -1 +1 @@
|
|||
<?php print $this->Format()->Currency($number, $symbol); ?>
|
||||
<?= $this->Format()->Currency($number, $symbol); ?>
|
||||
|
|
|
@ -11,7 +11,6 @@ namespace PHPCI\Service\Tests;
|
|||
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Model\Project;
|
||||
use PHPCI\Service\BuildService;
|
||||
use PHPCI\Service\BuildStatusService;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue