@@ -57,7 +57,8 @@ |
||
57 | 57 | */ |
58 | 58 | class E4xx_InvalidArgument extends Exxx_Exception |
59 | 59 | { |
60 | - public function __construct($argumentName, $reason = '', $params = array()) { |
|
60 | + public function __construct($argumentName, $reason = '', $params = array()) |
|
61 | + { |
|
61 | 62 | $msg = "Missing argument '$argumentName'"; |
62 | 63 | if (strlen($reason) > 0) { |
63 | 64 | $msg .= "; reason is '{$reason}'"; |
@@ -57,7 +57,8 @@ |
||
57 | 57 | */ |
58 | 58 | class E4xx_MissingArgument extends Exxx_Exception |
59 | 59 | { |
60 | - public function __construct($method, $reason = '', $params = array()) { |
|
60 | + public function __construct($method, $reason = '', $params = array()) |
|
61 | + { |
|
61 | 62 | $msg = "Missing argument in '$method'"; |
62 | 63 | if (strlen($reason) > 0) { |
63 | 64 | $msg .= "; reason is '{$reason}'"; |
@@ -216,7 +216,7 @@ |
||
216 | 216 | } |
217 | 217 | |
218 | 218 | // what is the average? |
219 | - $average = $total/$count; |
|
219 | + $average = $total / $count; |
|
220 | 220 | |
221 | 221 | // are we happy? |
222 | 222 | assertsDouble($average)->isLessThanOrEqualTo($expectedAverage); |
@@ -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){ |
|
100 | + if ($error) { |
|
101 | 101 | throw new E5xx_ActionFailed(__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 |
@@ -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 |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | * |
67 | 67 | * @return string Access token |
68 | 68 | */ |
69 | - public function getAccessToken($options = array()){ |
|
69 | + public function getAccessToken($options = array()) { |
|
70 | 70 | |
71 | 71 | // Grab the details of our user |
72 | 72 | $user = $this->args[0]; |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $config = $this->st->getRuntimeConfig(); |
79 | 79 | |
80 | 80 | // Check the one in the runtime config if we've not disabled the cache |
81 | - if (isset($config->facebookAccessToken, $config->facebookAccessToken->expires) && $config->facebookAccessToken->expires > time() && !$disableCache){ |
|
81 | + if (isset($config->facebookAccessToken, $config->facebookAccessToken->expires) && $config->facebookAccessToken->expires > time() && !$disableCache) { |
|
82 | 82 | return $config->facebookAccessToken->access_token; |
83 | 83 | } |
84 | 84 |
@@ -66,7 +66,8 @@ discard block |
||
66 | 66 | * |
67 | 67 | * @return string Access token |
68 | 68 | */ |
69 | - public function getAccessToken($options = array()){ |
|
69 | + public function getAccessToken($options = array()) |
|
70 | + { |
|
70 | 71 | |
71 | 72 | // Grab the details of our user |
72 | 73 | $user = $this->args[0]; |
@@ -78,7 +79,7 @@ discard block |
||
78 | 79 | $config = $this->st->getRuntimeConfig(); |
79 | 80 | |
80 | 81 | // Check the one in the runtime config if we've not disabled the cache |
81 | - if (isset($config->facebookAccessToken, $config->facebookAccessToken->expires) && $config->facebookAccessToken->expires > time() && !$disableCache){ |
|
82 | + if (isset($config->facebookAccessToken, $config->facebookAccessToken->expires) && $config->facebookAccessToken->expires > time() && !$disableCache) { |
|
82 | 83 | return $config->facebookAccessToken->access_token; |
83 | 84 | } |
84 | 85 |
@@ -57,7 +57,8 @@ |
||
57 | 57 | */ |
58 | 58 | class IframeContext extends PageContext |
59 | 59 | { |
60 | - public function __construct($iframeId) { |
|
60 | + public function __construct($iframeId) |
|
61 | + { |
|
61 | 62 | $this->pageContextAction = function(Story_Context $context) use($iframeId) { |
62 | 63 | $browser = $context->browserSession; |
63 | 64 |
@@ -96,7 +96,7 @@ |
||
96 | 96 | pcntl_alarm($seconds); |
97 | 97 | }); |
98 | 98 | |
99 | - declare(ticks=1); |
|
99 | + declare(ticks = 1); |
|
100 | 100 | $callback = $this->action; |
101 | 101 | $returnVal = $callback($this); |
102 | 102 |
@@ -85,10 +85,10 @@ |
||
85 | 85 | $vmDetails->keyPairName = $awsSettings->ec2->keyPairName; |
86 | 86 | $vmDetails->sshUsername = $awsSettings->ec2->sshUsername; |
87 | 87 | $vmDetails->sshKeyFile = $awsSettings->ec2->sshKeyFile; |
88 | - $vmDetails->sshOptions = array ( |
|
88 | + $vmDetails->sshOptions = array( |
|
89 | 89 | "-i '" . $awsSettings->ec2->sshKeyFile . "'" |
90 | 90 | ); |
91 | - $vmDetails->scpOptions = array ( |
|
91 | + $vmDetails->scpOptions = array( |
|
92 | 92 | "-i '" . $awsSettings->ec2->sshKeyFile . "'" |
93 | 93 | ); |
94 | 94 |
@@ -92,7 +92,7 @@ |
||
92 | 92 | foreach ($this->instance['BlockDeviceMappings'] as $origEbsVolume) { |
93 | 93 | $ebsVolume = array( |
94 | 94 | 'DeviceName' => $origEbsVolume['DeviceName'], |
95 | - 'Ebs' => array ( |
|
95 | + 'Ebs' => array( |
|
96 | 96 | 'DeleteOnTermination' => true |
97 | 97 | ) |
98 | 98 | ); |