@@ -57,7 +57,8 @@ |
||
57 | 57 | */ |
58 | 58 | class E5xx_NotImplemented extends E5xx_ProseException |
59 | 59 | { |
60 | - public function __construct($methodName) { |
|
60 | + public function __construct($methodName) |
|
61 | + { |
|
61 | 62 | $msg = "Method '{$methodName}' has not been implemented yet"; |
62 | 63 | parent::__construct(500, $msg, $msg); |
63 | 64 | } |
@@ -55,7 +55,8 @@ |
||
55 | 55 | */ |
56 | 56 | class E5xx_ActionFailed extends E5xx_ProseException |
57 | 57 | { |
58 | - public function __construct($actionName, $reason = '', $params = array()) { |
|
58 | + public function __construct($actionName, $reason = '', $params = array()) |
|
59 | + { |
|
59 | 60 | $msg = "Action '$actionName' failed"; |
60 | 61 | if (strlen($reason) > 0) { |
61 | 62 | $msg .= "; reason is '{$reason}'"; |
@@ -57,7 +57,8 @@ |
||
57 | 57 | */ |
58 | 58 | class E4xx_StoryShouldFail extends Exxx_Exception |
59 | 59 | { |
60 | - public function __construct() { |
|
60 | + public function __construct() |
|
61 | + { |
|
61 | 62 | $msg = "Story should fail"; |
62 | 63 | parent::__construct(400, $msg, $msg); |
63 | 64 | } |
@@ -55,7 +55,8 @@ |
||
55 | 55 | */ |
56 | 56 | class E5xx_ExpectFailed extends E5xx_ProseException |
57 | 57 | { |
58 | - public function __construct($actionName, $expected, $found) { |
|
58 | + public function __construct($actionName, $expected, $found) |
|
59 | + { |
|
59 | 60 | $msg = "Action '$actionName' failed; expected '$expected', found '$found'"; |
60 | 61 | parent::__construct(500, $msg, $msg); |
61 | 62 | } |
@@ -116,6 +116,9 @@ |
||
116 | 116 | return $result; |
117 | 117 | } |
118 | 118 | |
119 | + /** |
|
120 | + * @param string $command |
|
121 | + */ |
|
119 | 122 | public function runCommandAndIgnoreErrors($command) |
120 | 123 | { |
121 | 124 | // what are we doing? |
@@ -242,7 +242,7 @@ |
||
242 | 242 | |
243 | 243 | // has this worked? |
244 | 244 | $isStopped = $log->addStep("wait for process to terminate", function() use($pid, $grace, $log) { |
245 | - for($i = 0; $i < $grace; $i++) { |
|
245 | + for ($i = 0; $i < $grace; $i++) { |
|
246 | 246 | if (!fromHost($this->args[0])->getPidIsRunning($pid)) { |
247 | 247 | return true; |
248 | 248 | } |
@@ -61,14 +61,14 @@ |
||
61 | 61 | // get the hosts table, if we have one |
62 | 62 | $hostsTable = $this->getTable(); |
63 | 63 | if (!$hostsTable) { |
64 | - return; |
|
64 | + return; |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | // remove any empty test environments |
68 | 68 | foreach ($hostsTable as $testEnv => $hosts) { |
69 | - if (count(get_object_vars($hosts)) == 0) { |
|
70 | - unset($hostsTable->$testEnv); |
|
71 | - } |
|
69 | + if (count(get_object_vars($hosts)) == 0) { |
|
70 | + unset($hostsTable->$testEnv); |
|
71 | + } |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | // cleanup the tables |
@@ -501,7 +501,7 @@ discard block |
||
501 | 501 | $data = $hostDetails->appSettings->getData($path); |
502 | 502 | |
503 | 503 | // all done |
504 | - $log->endAction([ "setting is", $data ]); |
|
504 | + $log->endAction(["setting is", $data]); |
|
505 | 505 | return $data; |
506 | 506 | } |
507 | 507 | |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | $data = $hostDetails->storySettings->getData($path); |
574 | 574 | |
575 | 575 | // all done |
576 | - $log->endAction([ "setting is", $data ]); |
|
576 | + $log->endAction(["setting is", $data]); |
|
577 | 577 | return $data; |
578 | 578 | } |
579 | 579 |