Completed
Push — master ( 5c113c...7ad456 )
by Vitaly
04:40 queued 02:19
created
src/GenericFeatureContext.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace samsonframework\behatextension;
6 6
 
@@ -70,8 +70,8 @@  discard block
 block discarded – undo
70 70
         $backtrace = debug_backtrace();
71 71
 
72 72
         throw new \Exception(
73
-            'Timeout thrown by '.$backtrace[1]['class'].'::'.$backtrace[1]['function']."()\n".
74
-            $backtrace[1]['file'].', line '.$backtrace[1]['line']
73
+            'Timeout thrown by ' . $backtrace[1]['class'] . '::' . $backtrace[1]['function'] . "()\n" .
74
+            $backtrace[1]['file'] . ', line ' . $backtrace[1]['line']
75 75
         );
76 76
     }
77 77
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
             }
91 91
 
92 92
             $step = $scope->getStep();
93
-            $fileName = 'Fail.'.preg_replace('/[^a-zA-Z0-9-_\.]/', '_', $scope->getName().'-'.$step->getText()).'.jpg';
93
+            $fileName = 'Fail.' . preg_replace('/[^a-zA-Z0-9-_\.]/', '_', $scope->getName() . '-' . $step->getText()) . '.jpg';
94 94
             file_put_contents($fileName, $driver->getScreenshot());
95 95
         }
96 96
     }
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
      */
141 141
     public function iSetBrowserWindowSizeToX($width, $height)
142 142
     {
143
-        $this->getSession()->resizeWindow((int) $width, (int) $height, 'current');
143
+        $this->getSession()->resizeWindow((int)$width, (int)$height, 'current');
144 144
     }
145 145
 
146 146
     /**
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      */
151 151
     public function iWaitMillisecondsForResponse($delay = self::DELAY)
152 152
     {
153
-        $this->getSession()->wait((int) $delay);
153
+        $this->getSession()->wait((int)$delay);
154 154
     }
155 155
 
156 156
     /**
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
      */
203 203
     public function iScrollVerticallyToPx($yPos)
204 204
     {
205
-        $this->getSession()->executeScript('window.scrollTo(0, Math.min(document.documentElement.scrollHeight, document.body.scrollHeight, '.((int) $yPos).'));');
205
+        $this->getSession()->executeScript('window.scrollTo(0, Math.min(document.documentElement.scrollHeight, document.body.scrollHeight, ' . ((int)$yPos) . '));');
206 206
     }
207 207
 
208 208
     /**
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
      */
213 213
     public function iScrollHorizontallyToPx($xPos)
214 214
     {
215
-        $this->getSession()->executeScript('window.scrollTo('.((int) $xPos).', 0);');
215
+        $this->getSession()->executeScript('window.scrollTo(' . ((int)$xPos) . ', 0);');
216 216
     }
217 217
 
218 218
     /**
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
     {
226 226
         // TODO: Change to Mink implementation
227 227
         $this->getSession()->executeScript("
228
-            $('input[name=".$field."]').val('".$value."');
228
+            $('input[name=".$field . "]').val('" . $value . "');
229 229
         ");
230 230
     }
231 231
 
@@ -275,6 +275,6 @@  discard block
 block discarded – undo
275 275
      */
276 276
     public function iFillInTheElementUsingJs(string $selector, string $value)
277 277
     {
278
-        $this->getSession()->executeScript('document.querySelectorAll("'.$selector.'")[0].value="'.$value.'";');
278
+        $this->getSession()->executeScript('document.querySelectorAll("' . $selector . '")[0].value="' . $value . '";');
279 279
     }
280 280
 }
Please login to merge, or discard this patch.