From d98e85ffc3ec6af6bd8bb2fe430f7475f9d5a4b4 Mon Sep 17 00:00:00 2001 From: Dan Cryer Date: Fri, 2 May 2014 14:58:21 +0000 Subject: [PATCH] Removing success field from Builder as it is only used in one method, see #382 --- PHPCI/Builder.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/PHPCI/Builder.php b/PHPCI/Builder.php index 4547564a..ccb78c6b 100644 --- a/PHPCI/Builder.php +++ b/PHPCI/Builder.php @@ -47,11 +47,6 @@ class Builder implements LoggerAwareInterface */ protected $directory; - /** - * @var bool - */ - protected $success = true; - /** * @var bool */ @@ -192,7 +187,7 @@ class Builder implements LoggerAwareInterface $this->build->setStarted(new \DateTime()); $this->store->save($this->build); $this->build->sendStatusPostback(); - $this->success = true; + $success = true; try { // Set up the build: @@ -200,12 +195,12 @@ class Builder implements LoggerAwareInterface // Run the core plugin stages: foreach (array('setup', 'test') as $stage) { - $this->success &= $this->pluginExecutor->executePlugins($this->config, $stage); + $success &= $this->pluginExecutor->executePlugins($this->config, $stage); } // Set the status so this can be used by complete, success and failure // stages. - if ($this->success) { + if ($success) { $this->build->setStatus(Build::STATUS_SUCCESS); } else { $this->build->setStatus(Build::STATUS_FAILED); @@ -214,7 +209,7 @@ class Builder implements LoggerAwareInterface // Complete stage plugins are always run $this->pluginExecutor->executePlugins($this->config, 'complete'); - if ($this->success) { + if ($success) { $this->pluginExecutor->executePlugins($this->config, 'success'); $this->buildLogger->logSuccess('BUILD SUCCESSFUL!'); } else {