@@ -106,7 +106,6 @@ discard block |
||
106 | 106 | |
107 | 107 | /** |
108 | 108 | * @param $name |
109 | - * @param array $params |
|
110 | 109 | * |
111 | 110 | * @return string |
112 | 111 | */ |
@@ -117,6 +116,7 @@ discard block |
||
117 | 116 | |
118 | 117 | /** |
119 | 118 | * @When /^I hover over the element "([^"]*)"$/ |
119 | + * @param string $locator |
|
120 | 120 | */ |
121 | 121 | public function iHoverOverTheElement($locator) |
122 | 122 | { |
@@ -261,10 +261,10 @@ discard block |
||
261 | 261 | } |
262 | 262 | |
263 | 263 | /** |
264 | - * @param $locator |
|
264 | + * @param string $locator |
|
265 | 265 | * @param string $selector |
266 | 266 | * |
267 | - * @return \Behat\Mink\Element\NodeElement|mixed|null |
|
267 | + * @return \Behat\Mink\Element\NodeElement|null |
|
268 | 268 | */ |
269 | 269 | public function getElement($locator, $selector='css') |
270 | 270 | { |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | public function iSetMainWindowName() |
168 | 168 | { |
169 | 169 | $window_name = 'main_window'; |
170 | - $script = 'window.name = "' . $window_name . '"'; |
|
170 | + $script = 'window.name = "'.$window_name.'"'; |
|
171 | 171 | $this->getSession()->executeScript($script); |
172 | 172 | } |
173 | 173 | |
@@ -226,14 +226,14 @@ discard block |
||
226 | 226 | break; |
227 | 227 | |
228 | 228 | default: |
229 | - throw new \Exception(__METHOD__ . ' Couldn\'t find selector: ' . $selector . ' - Allowed selectors: #id, .className, //xpath'); |
|
229 | + throw new \Exception(__METHOD__.' Couldn\'t find selector: '.$selector.' - Allowed selectors: #id, .className, //xpath'); |
|
230 | 230 | break; |
231 | 231 | } |
232 | 232 | |
233 | 233 | try { |
234 | 234 | $this->getSession()->executeScript($function); |
235 | 235 | } catch (\Exception $e) { |
236 | - throw new \Exception(__METHOD__ . ' failed'. ' Message: for this locator:"'.$selector.'"'); |
|
236 | + throw new \Exception(__METHOD__.' failed'.' Message: for this locator:"'.$selector.'"'); |
|
237 | 237 | } |
238 | 238 | } |
239 | 239 | |
@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | * |
254 | 254 | * @return \Behat\Mink\Element\NodeElement|mixed|null |
255 | 255 | */ |
256 | - public function getElement($locator, $selector='css') |
|
256 | + public function getElement($locator, $selector = 'css') |
|
257 | 257 | { |
258 | 258 | $page = $this->minkContext->getSession()->getPage(); |
259 | 259 | $element = $page->find('css', $locator); |
@@ -287,12 +287,12 @@ discard block |
||
287 | 287 | $session = $this->getSession(); |
288 | 288 | $element = $session->getPage()->find( |
289 | 289 | 'xpath', |
290 | - $session->getSelectorsHandler()->selectorToXpath('xpath', '*//*[text()="'. $text .'"]') |
|
290 | + $session->getSelectorsHandler()->selectorToXpath('xpath', '*//*[text()="'.$text.'"]') |
|
291 | 291 | ); |
292 | 292 | if (null === $element) { |
293 | 293 | $element = $session->getPage()->find( |
294 | 294 | 'named', |
295 | - array('id',$text) |
|
295 | + array('id', $text) |
|
296 | 296 | ); |
297 | 297 | } |
298 | 298 | if (null === $element) { |
@@ -156,6 +156,9 @@ |
||
156 | 156 | } |
157 | 157 | } |
158 | 158 | |
159 | + /** |
|
160 | + * @param string $message |
|
161 | + */ |
|
159 | 162 | private function log($message) |
160 | 163 | { |
161 | 164 | $io = $this->io; |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | * @param array $loadModules |
96 | 96 | * @return array |
97 | 97 | */ |
98 | - public static function generateModuleConfiguration($loadModules=[]) |
|
98 | + public static function generateModuleConfiguration($loadModules = []) |
|
99 | 99 | { |
100 | 100 | $modules = ArrayUtils::merge( |
101 | 101 | static::getRequiredModules(), |
@@ -184,15 +184,15 @@ discard block |
||
184 | 184 | public static function setupCliServerEnv() |
185 | 185 | { |
186 | 186 | $parseUrl = parse_url(substr($_SERVER["REQUEST_URI"], 1)); |
187 | - $route = isset($parseUrl['path']) ? $parseUrl['path']:null; |
|
188 | - if (is_file(__DIR__ . '/' . $route)) { |
|
187 | + $route = isset($parseUrl['path']) ? $parseUrl['path'] : null; |
|
188 | + if (is_file(__DIR__.'/'.$route)) { |
|
189 | 189 | if (substr($route, -4) == ".php") { |
190 | - require __DIR__ . '/' . $route; // Include requested script files |
|
190 | + require __DIR__.'/'.$route; // Include requested script files |
|
191 | 191 | exit; |
192 | 192 | } |
193 | - return false; // Serve file as is |
|
193 | + return false; // Serve file as is |
|
194 | 194 | } else { // Fallback to index.php |
195 | - $_GET["q"] = $route; // Try to emulate the behaviour of a .htaccess here. |
|
195 | + $_GET["q"] = $route; // Try to emulate the behaviour of a .htaccess here. |
|
196 | 196 | } |
197 | 197 | return true; |
198 | 198 | } |
@@ -202,7 +202,7 @@ discard block |
||
202 | 202 | */ |
203 | 203 | public static function loadDotEnv() |
204 | 204 | { |
205 | - static $isLoaded=false; |
|
205 | + static $isLoaded = false; |
|
206 | 206 | if ($isLoaded) { |
207 | 207 | return; |
208 | 208 | } |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | } |
315 | 315 | |
316 | 316 | // setup docker environment |
317 | - if (getenv('DOCKER_ENV')=='yes') { |
|
317 | + if (getenv('DOCKER_ENV') == 'yes') { |
|
318 | 318 | $configuration = ArrayUtils::merge($configuration, static::getDockerEnv($configuration)); |
319 | 319 | } |
320 | 320 | return $configuration; |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | |
381 | 381 | //$exp = explode("@", $info); |
382 | 382 | $version = $info->getVersion(); |
383 | - static::$version = substr($version, 0, strlen($version)-10); |
|
383 | + static::$version = substr($version, 0, strlen($version) - 10); |
|
384 | 384 | static::$revision = substr($version, 10); |
385 | 385 | } |
386 | 386 | } |