@@ -1,13 +1,13 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | /** |
| 5 | 5 | * Created by Vitaly Iegorov <[email protected]> |
| 6 | 6 | * on 04.08.14 at 17:43. |
| 7 | 7 | */ |
| 8 | 8 | |
| 9 | 9 | /** Set composer autoloader */ |
| 10 | -require __DIR__.'/vendor/autoload.php'; |
|
| 10 | +require __DIR__ . '/vendor/autoload.php'; |
|
| 11 | 11 | |
| 12 | 12 | /* Set The Default Timezone */ |
| 13 | 13 | date_default_timezone_set('UTC'); |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | /** |
| 5 | 5 | * Created by Vitaly Iegorov <[email protected]>. |
| 6 | 6 | * on 22.12.16 at 18:16. |
@@ -1,6 +1,6 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -declare(strict_types=1); |
|
| 3 | +declare(strict_types = 1); |
|
| 4 | 4 | |
| 5 | 5 | namespace samsonframework\behatextension; |
| 6 | 6 | |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | $step = $scope->getStep(); |
| 56 | - $fileName = 'Fail.'.preg_replace('/[^a-zA-Z0-9-_\.]/', '_', $scope->getName().'-'.$step->getText()).'.jpg'; |
|
| 56 | + $fileName = 'Fail.' . preg_replace('/[^a-zA-Z0-9-_\.]/', '_', $scope->getName() . '-' . $step->getText()) . '.jpg'; |
|
| 57 | 57 | file_put_contents($fileName, $driver->getScreenshot()); |
| 58 | 58 | } |
| 59 | 59 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | */ |
| 104 | 104 | public function iSetBrowserWindowSizeToX($width, $height) |
| 105 | 105 | { |
| 106 | - $this->getSession()->resizeWindow((int) $width, (int) $height, 'current'); |
|
| 106 | + $this->getSession()->resizeWindow((int)$width, (int)$height, 'current'); |
|
| 107 | 107 | } |
| 108 | 108 | |
| 109 | 109 | /** |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | */ |
| 114 | 114 | public function iWaitMillisecondsForResponse($delay = self::DELAY) |
| 115 | 115 | { |
| 116 | - $this->getSession()->wait((int) $delay); |
|
| 116 | + $this->getSession()->wait((int)$delay); |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | /** |
@@ -165,7 +165,7 @@ discard block |
||
| 165 | 165 | */ |
| 166 | 166 | public function iScrollVerticallyToPx($yPos) |
| 167 | 167 | { |
| 168 | - $this->getSession()->executeScript('window.scrollTo(0, Math.min(document.documentElement.scrollHeight, document.body.scrollHeight, '.((int) $yPos).'));'); |
|
| 168 | + $this->getSession()->executeScript('window.scrollTo(0, Math.min(document.documentElement.scrollHeight, document.body.scrollHeight, ' . ((int)$yPos) . '));'); |
|
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | /** |
@@ -175,7 +175,7 @@ discard block |
||
| 175 | 175 | */ |
| 176 | 176 | public function iScrollHorizontallyToPx($xPos) |
| 177 | 177 | { |
| 178 | - $this->getSession()->executeScript('window.scrollTo('.((int) $xPos).', 0);'); |
|
| 178 | + $this->getSession()->executeScript('window.scrollTo(' . ((int)$xPos) . ', 0);'); |
|
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | /** |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | { |
| 189 | 189 | // TODO: Change to Mink implementation |
| 190 | 190 | $this->getSession()->executeScript(" |
| 191 | - $('input[name=".$field."]').val('".$value."'); |
|
| 191 | + $('input[name=".$field . "]').val('" . $value . "'); |
|
| 192 | 192 | "); |
| 193 | 193 | } |
| 194 | 194 | |
@@ -238,6 +238,6 @@ discard block |
||
| 238 | 238 | */ |
| 239 | 239 | public function iFillInTheElementUsingJs(string $selector, string $value) |
| 240 | 240 | { |
| 241 | - $this->getSession()->executeScript('document.querySelectorAll("'.$selector.'")[0].value="'.$value.'";'); |
|
| 241 | + $this->getSession()->executeScript('document.querySelectorAll("' . $selector . '")[0].value="' . $value . '";'); |
|
| 242 | 242 | } |
| 243 | 243 | } |