@@ -181,8 +181,7 @@ discard block |
||
| 181 | 181 | // yes it did!! |
| 182 | 182 | |
| 183 | 183 | // store the details |
| 184 | - foreach($groupDef->details->machines as $hostId => $machine) |
|
| 185 | - { |
|
| 184 | + foreach($groupDef->details->machines as $hostId => $machine) { |
|
| 186 | 185 | // we want all the details from the config file |
| 187 | 186 | $vmDetails = clone $machine; |
| 188 | 187 | |
@@ -418,7 +417,8 @@ discard block |
||
| 418 | 417 | * Set the VAGRANT_BRIDGE_ADAPTER and VIRTUALBOX_BRIDGE_ADAPTER |
| 419 | 418 | * environmental variables. |
| 420 | 419 | */ |
| 421 | - public function setVagrantBridgedInterface() { |
|
| 420 | + public function setVagrantBridgedInterface() |
|
| 421 | + { |
|
| 422 | 422 | $bridgedIface = $this->determineBridgedInterface(); |
| 423 | 423 | putenv('VAGRANT_BRIDGE_ADAPTER='.$bridgedIface); |
| 424 | 424 | putenv('VIRTUALBOX_BRIDGE_ADAPTER='.$bridgedIface); |
@@ -440,7 +440,8 @@ discard block |
||
| 440 | 440 | $log->endAction('Returning configured '.$vagrantSettings->bridgedIface.' interface'); |
| 441 | 441 | return $vagrantSettings->bridgedIface; |
| 442 | 442 | } |
| 443 | - } catch (Exception $e) { |
|
| 443 | + } |
|
| 444 | + catch (Exception $e) { |
|
| 444 | 445 | // ignore errors as this setting may not exist |
| 445 | 446 | } |
| 446 | 447 | |
@@ -503,8 +504,7 @@ discard block |
||
| 503 | 504 | getenv("HOME") . "/.vagrant.d/insecure_private_key" |
| 504 | 505 | ]; |
| 505 | 506 | |
| 506 | - foreach ($keyFilenames as $keyFilename) |
|
| 507 | - { |
|
| 507 | + foreach ($keyFilenames as $keyFilename) { |
|
| 508 | 508 | usingLog()->writeToLog("checking if {$keyFilename} exists"); |
| 509 | 509 | if (file_exists($keyFilename)) { |
| 510 | 510 | $log->endAction($keyFilename); |
@@ -124,16 +124,14 @@ discard block |
||
| 124 | 124 | |
| 125 | 125 | // work through the parts, building up the path to create from |
| 126 | 126 | // the root of the directory |
| 127 | - foreach ($parts as $part) |
|
| 128 | - { |
|
| 127 | + foreach ($parts as $part) { |
|
| 129 | 128 | // expand our path to the next part |
| 130 | 129 | $path .= '/' . $part; |
| 131 | 130 | |
| 132 | 131 | // does this path exist? |
| 133 | 132 | if (!$this->zk->exists($path)) { |
| 134 | 133 | // no - create it |
| 135 | - if (!$this->zk->create($path, 1, $this->default_acl)) |
|
| 136 | - { |
|
| 134 | + if (!$this->zk->create($path, 1, $this->default_acl)) { |
|
| 137 | 135 | // failed to create the entry |
| 138 | 136 | throw Exceptions::newActionFailedException(__METHOD__); |
| 139 | 137 | } |
@@ -151,8 +149,9 @@ discard block |
||
| 151 | 149 | |
| 152 | 150 | // now we can safely set the key itself |
| 153 | 151 | if (!$this->zk->exists($key)) { |
| 154 | - if (!$this->zk->create($key, $value, $this->default_acl)) |
|
| 155 | - throw Exceptions::newActionFailedException(__METHOD__); |
|
| 152 | + if (!$this->zk->create($key, $value, $this->default_acl)) { |
|
| 153 | + throw Exceptions::newActionFailedException(__METHOD__); |
|
| 154 | + } |
|
| 156 | 155 | } |
| 157 | 156 | else if (!$this->zk->set($key, $value)) { |
| 158 | 157 | throw Exceptions::newActionFailedException(__METHOD__); |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | */ |
| 70 | 70 | public function get($url, $params = array(), $headers = array()) |
| 71 | 71 | { |
| 72 | - if (count($headers)){ |
|
| 72 | + if (count($headers)) { |
|
| 73 | 73 | // "FromCurl does not support headers yet" |
| 74 | 74 | throw new E5xx_NotImplemented(__METHOD__); |
| 75 | 75 | } |
@@ -97,14 +97,14 @@ discard block |
||
| 97 | 97 | // close cURL resource, and free up system resources |
| 98 | 98 | curl_close($ch); |
| 99 | 99 | |
| 100 | - if ($error){ |
|
| 101 | - throw Exceptions::newActionFailedException(__METHOD__.': '.$error); |
|
| 100 | + if ($error) { |
|
| 101 | + throw Exceptions::newActionFailedException(__METHOD__ . ': ' . $error); |
|
| 102 | 102 | } |
| 103 | 103 | |
| 104 | 104 | // Try and decode it |
| 105 | 105 | $decoded = json_decode($response); |
| 106 | 106 | |
| 107 | - if ($decoded){ |
|
| 107 | + if ($decoded) { |
|
| 108 | 108 | $response = $decoded; |
| 109 | 109 | } |
| 110 | 110 | |
@@ -57,7 +57,8 @@ |
||
| 57 | 57 | */ |
| 58 | 58 | class ObsoleteModuleException extends RuntimeException |
| 59 | 59 | { |
| 60 | - public function __construct($oldModule, $newModule) { |
|
| 60 | + public function __construct($oldModule, $newModule) |
|
| 61 | + { |
|
| 61 | 62 | $msg = "Support for '$oldModule' has been removed; please use $newModule instead"; |
| 62 | 63 | parent::__construct($msg); |
| 63 | 64 | } |