@@ -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 | } |
@@ -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 | } |
@@ -104,15 +104,13 @@ |
||
104 | 104 | public function stop() |
105 | 105 | { |
106 | 106 | // stop the web browser |
107 | - if (is_object($this->browserSession)) |
|
108 | - { |
|
107 | + if (is_object($this->browserSession)) { |
|
109 | 108 | $this->browserSession->close(); |
110 | 109 | $this->browserSession = null; |
111 | 110 | } |
112 | 111 | |
113 | 112 | // now stop the proxy |
114 | - if (is_object($this->proxySession)) |
|
115 | - { |
|
113 | + if (is_object($this->proxySession)) { |
|
116 | 114 | try { |
117 | 115 | $this->proxySession->close(); |
118 | 116 | } |
@@ -123,8 +123,7 @@ discard block |
||
123 | 123 | // if it is not, that is NOT our responsibility |
124 | 124 | |
125 | 125 | // store the details |
126 | - foreach($groupDef->details->machines as $hostId => $machine) |
|
127 | - { |
|
126 | + foreach($groupDef->details->machines as $hostId => $machine) { |
|
128 | 127 | // we want all the details from the config file |
129 | 128 | $vmDetails = clone $machine; |
130 | 129 | |
@@ -205,8 +204,7 @@ discard block |
||
205 | 204 | $log = usingLog()->startAction("de-register blackbox(es)"); |
206 | 205 | |
207 | 206 | // de-register all the hosts |
208 | - foreach ($groupDef->details->machines as $hostId => $machine) |
|
209 | - { |
|
207 | + foreach ($groupDef->details->machines as $hostId => $machine) { |
|
210 | 208 | foreach ($machine->roles as $role) { |
211 | 209 | usingRolesTable()->removeHostFromAllRoles($hostId); |
212 | 210 | } |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | public function createHost($groupDef, $provisioningVars = array()) |
89 | 89 | { |
90 | 90 | // what are we doing? |
91 | - $log =Log::usingLog()->startAction('register blackbox(es)'); |
|
91 | + $log = Log::usingLog()->startAction('register blackbox(es)'); |
|
92 | 92 | |
93 | 93 | // make sure we like the provided details |
94 | 94 | if (!isset($groupDef->details)) { |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | if (empty($groupDef->details->machines)) { |
101 | 101 | throw Exceptions::newActionFailedException(__METHOD__, "groupDef->details->machines cannot be empty"); |
102 | 102 | } |
103 | - foreach($groupDef->details->machines as $hostId => $machine) { |
|
103 | + foreach ($groupDef->details->machines as $hostId => $machine) { |
|
104 | 104 | // TODO: it would be great to autodetect this one day |
105 | 105 | if (!isset($machine->roles)) { |
106 | 106 | throw Exceptions::newActionFailedException(__METHOD__, "missing groupDef->details->machines['$hostId']->roles"); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | // if it is not, that is NOT our responsibility |
122 | 122 | |
123 | 123 | // store the details |
124 | - foreach($groupDef->details->machines as $hostId => $machine) |
|
124 | + foreach ($groupDef->details->machines as $hostId => $machine) |
|
125 | 125 | { |
126 | 126 | // we want all the details from the config file |
127 | 127 | $vmDetails = clone $machine; |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | public function destroyHost($groupDef) |
201 | 201 | { |
202 | 202 | // what are we doing? |
203 | - $log =Log::usingLog()->startAction("de-register blackbox(es)"); |
|
203 | + $log = Log::usingLog()->startAction("de-register blackbox(es)"); |
|
204 | 204 | |
205 | 205 | // de-register all the hosts |
206 | 206 | foreach ($groupDef->details->machines as $hostId => $machine) |
@@ -58,7 +58,8 @@ |
||
58 | 58 | */ |
59 | 59 | class E4xx_OutputFilenameIsAReservedName extends Exxx_Exception |
60 | 60 | { |
61 | - public function __construct($filename) { |
|
61 | + public function __construct($filename) |
|
62 | + { |
|
62 | 63 | $msg = "'{$filename}' is reserved for internal use; please use a different filename"; |
63 | 64 | parent::__construct(400, $msg, $msg); |
64 | 65 | } |
@@ -64,7 +64,7 @@ |
||
64 | 64 | public function doPhase($phaseResults) |
65 | 65 | { |
66 | 66 | // shorthand |
67 | - $st = $this->st; |
|
67 | + $st = $this->st; |
|
68 | 68 | |
69 | 69 | // our result object |
70 | 70 | $phaseResult = $this->getNewPhaseResult(); |
@@ -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 | } |
@@ -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 | } |
@@ -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 | } |