@@ -9,14 +9,14 @@ |
||
9 | 9 | |
10 | 10 | $group1 = $testEnv->newGroup('vagrant', new Vagrant_GroupAdapter); |
11 | 11 | $group1->newHost('default', new Vagrant_VirtualboxHostAdapter) |
12 | - ->setOperatingSystem(new Ubuntu_1504_HostAdapter) |
|
13 | - ->setRoles([ |
|
12 | + ->setOperatingSystem(new Ubuntu_1504_HostAdapter) |
|
13 | + ->setRoles([ |
|
14 | 14 | "host_target", |
15 | 15 | "upload_target", |
16 | 16 | "ssl_target", |
17 | 17 | "zmq_target", |
18 | 18 | ]) |
19 | - ->setStorySettings((object)[ |
|
19 | + ->setStorySettings((object)[ |
|
20 | 20 | "host" => (object)[ |
21 | 21 | "expected" => "successfully retrieved this storySetting :)", |
22 | 22 | ], |
@@ -59,7 +59,7 @@ |
||
59 | 59 | * __construct |
60 | 60 | * |
61 | 61 | * @param StoryTeller $st The StoryTeller object |
62 | - * @param array $args Any arguments to be used in this Prose module |
|
62 | + * @param string[] $args Any arguments to be used in this Prose module |
|
63 | 63 | * |
64 | 64 | * @return parent::__construct |
65 | 65 | */ |
@@ -67,7 +67,7 @@ |
||
67 | 67 | $this->setLongDescription( |
68 | 68 | "Use this command to get a list of all of the machines (physical or VM)" |
69 | 69 | . " that are currently listed in Storyplayer's hoststable." |
70 | - .PHP_EOL .PHP_EOL |
|
70 | + .PHP_EOL . PHP_EOL |
|
71 | 71 | ."This can help you to identify VMs that have been left running after " |
72 | 72 | ."a test has completed." |
73 | 73 | .PHP_EOL |
@@ -270,8 +270,8 @@ |
||
270 | 270 | public function logCliErrorWithException($msg, $e) |
271 | 271 | { |
272 | 272 | $this->write("*** error: $msg" . PHP_EOL . PHP_EOL |
273 | - . "This was caused by an unexpected exception " . get_class($e) . PHP_EOL . PHP_EOL |
|
274 | - . $e->getTraceAsString() . PHP_EOL); |
|
273 | + . "This was caused by an unexpected exception " . get_class($e) . PHP_EOL . PHP_EOL |
|
274 | + . $e->getTraceAsString() . PHP_EOL); |
|
275 | 275 | } |
276 | 276 | |
277 | 277 | /** |
@@ -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 | } |
@@ -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 | } |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | if (empty($groupDef->details->machines)) { |
100 | 100 | throw new E5xx_ActionFailed(__METHOD__, "groupDef->details->machines cannot be empty"); |
101 | 101 | } |
102 | - foreach($groupDef->details->machines as $hostId => $machine) { |
|
102 | + foreach ($groupDef->details->machines as $hostId => $machine) { |
|
103 | 103 | // TODO: it would be great to autodetect this one day |
104 | 104 | if (!isset($machine->roles)) { |
105 | 105 | throw new E5xx_ActionFailed(__METHOD__, "missing groupDef->details->machines['$hostId']->roles"); |
@@ -123,7 +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) |
|
126 | + foreach ($groupDef->details->machines as $hostId => $machine) |
|
127 | 127 | { |
128 | 128 | // we want all the details from the config file |
129 | 129 | $vmDetails = clone $machine; |
@@ -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 | } |