Skip to content

Commit bb2bc96

Browse files
committed
phpcs clean-up
1 parent 0c20707 commit bb2bc96

37 files changed

+78
-41
lines changed

lib/WebDriver/ClassLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public static function autoload($class)
5555
{
5656
try {
5757
self::loadClass($class);
58-
} catch (Exception $e) {
58+
} catch (\Exception $e) {
5959
}
6060
}
6161
}

lib/WebDriver/Container.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function element($using = null, $value = null)
7171
sprintf(
7272
"Element not found with %s, %s\n\n%s",
7373
$locatorJson['using'],
74-
$locatorJson['value'],
74+
$locatorJson['value'],
7575
$e->getMessage()
7676
),
7777
$e
@@ -81,7 +81,8 @@ public function element($using = null, $value = null)
8181
$element = $this->webDriverElement($result['value']);
8282

8383
if ($element === null) {
84-
throw WebDriverException::factory(WebDriverException::NO_SUCH_ELEMENT,
84+
throw WebDriverException::factory(
85+
WebDriverException::NO_SUCH_ELEMENT,
8586
sprintf(
8687
"Element not found with %s, %s\n",
8788
$locatorJson['using'],
@@ -119,9 +120,12 @@ public function elements($using = null, $value = null)
119120
return array();
120121
}
121122

122-
return array_filter(array_map(
123-
array($this, 'webDriverElement'), $result['value']
124-
));
123+
return array_filter(
124+
array_map(
125+
array($this, 'webDriverElement'),
126+
$result['value']
127+
)
128+
);
125129
}
126130

127131
/**
@@ -147,12 +151,14 @@ private function parseArgs($method, $argv)
147151

148152
case 1:
149153
$arg = $argv[0];
154+
150155
if (is_array($arg)) {
151156
$using = $arg['using'];
152157
$value = $arg['value'];
153158
break;
154159
}
155160

161+
// fall through
156162
default:
157163
throw WebDriverException::factory(
158164
WebDriverException::JSON_PARAMETERS_EXPECTED,

lib/WebDriver/Exception/CurlExec.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@
2929
*
3030
* @package WebDriver
3131
*/
32-
final class CurlExec extends BaseException {
32+
final class CurlExec extends BaseException
33+
{
3334
}

lib/WebDriver/Exception/ElementIsNotSelectable.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@
2929
*
3030
* @package WebDriver
3131
*/
32-
final class ElementIsNotSelectable extends BaseException {
32+
final class ElementIsNotSelectable extends BaseException
33+
{
3334
}

lib/WebDriver/Exception/ElementNotVisible.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@
2929
*
3030
* @package WebDriver
3131
*/
32-
final class ElementNotVisible extends BaseException {
32+
final class ElementNotVisible extends BaseException
33+
{
3334
}

lib/WebDriver/Exception/IMEEngineActivationFailed.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@
2929
*
3030
* @package WebDriver
3131
*/
32-
final class IMEEngineActivationFailed extends BaseException {
32+
final class IMEEngineActivationFailed extends BaseException
33+
{
3334
}

lib/WebDriver/Exception/IMENotAvailable.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@
2929
*
3030
* @package WebDriver
3131
*/
32-
final class IMENotAvailable extends BaseException {
32+
final class IMENotAvailable extends BaseException
33+
{
3334
}

lib/WebDriver/Exception/InvalidCookieDomain.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@
2929
*
3030
* @package WebDriver
3131
*/
32-
final class InvalidCookieDomain extends BaseException {
32+
final class InvalidCookieDomain extends BaseException
33+
{
3334
}

lib/WebDriver/Exception/InvalidElementCoordinates.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@
2929
*
3030
* @package WebDriver
3131
*/
32-
final class InvalidElementCoordinates extends BaseException {
32+
final class InvalidElementCoordinates extends BaseException
33+
{
3334
}

lib/WebDriver/Exception/InvalidElementState.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@
2929
*
3030
* @package WebDriver
3131
*/
32-
final class InvalidElementState extends BaseException {
32+
final class InvalidElementState extends BaseException
33+
{
3334
}

0 commit comments

Comments
 (0)