Completed
Push — develop ( 911e58...200791 )
by Carsten
13s
created
module/Behat/src/CoreContext.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.