@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | |
30 | 30 | private $config; |
31 | 31 | |
32 | - public function __construct($config=null) |
|
32 | + public function __construct($config = null) |
|
33 | 33 | { |
34 | 34 | umask(0000); |
35 | 35 | if (is_null($config)) { |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | public function iSetMainWindowName() |
180 | 180 | { |
181 | 181 | $window_name = 'main_window'; |
182 | - $script = 'window.name = "' . $window_name . '"'; |
|
182 | + $script = 'window.name = "'.$window_name.'"'; |
|
183 | 183 | $this->getSession()->executeScript($script); |
184 | 184 | } |
185 | 185 | |
@@ -238,14 +238,14 @@ discard block |
||
238 | 238 | break; |
239 | 239 | |
240 | 240 | default: |
241 | - throw new \Exception(__METHOD__ . ' Couldn\'t find selector: ' . $selector . ' - Allowed selectors: #id, .className, //xpath'); |
|
241 | + throw new \Exception(__METHOD__.' Couldn\'t find selector: '.$selector.' - Allowed selectors: #id, .className, //xpath'); |
|
242 | 242 | break; |
243 | 243 | } |
244 | 244 | |
245 | 245 | try { |
246 | 246 | $this->getSession()->executeScript($function); |
247 | 247 | } catch (\Exception $e) { |
248 | - throw new \Exception(__METHOD__ . ' failed'. ' Message: for this locator:"'.$selector.'"'); |
|
248 | + throw new \Exception(__METHOD__.' failed'.' Message: for this locator:"'.$selector.'"'); |
|
249 | 249 | } |
250 | 250 | } |
251 | 251 | |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | * |
266 | 266 | * @return \Behat\Mink\Element\NodeElement|mixed|null |
267 | 267 | */ |
268 | - public function getElement($locator, $selector='css') |
|
268 | + public function getElement($locator, $selector = 'css') |
|
269 | 269 | { |
270 | 270 | $page = $this->minkContext->getSession()->getPage(); |
271 | 271 | $element = $page->find('css', $locator); |
@@ -299,12 +299,12 @@ discard block |
||
299 | 299 | $session = $this->getSession(); |
300 | 300 | $element = $session->getPage()->find( |
301 | 301 | 'xpath', |
302 | - $session->getSelectorsHandler()->selectorToXpath('xpath', '*//*[text()="'. $text .'"]') |
|
302 | + $session->getSelectorsHandler()->selectorToXpath('xpath', '*//*[text()="'.$text.'"]') |
|
303 | 303 | ); |
304 | 304 | if (null === $element) { |
305 | 305 | $element = $session->getPage()->find( |
306 | 306 | 'named', |
307 | - array('id',$text) |
|
307 | + array('id', $text) |
|
308 | 308 | ); |
309 | 309 | } |
310 | 310 | if (null === $element) { |