Skip to content

Commit 581b1f2

Browse files
committed
rename webDriverElement() to makeElement()
1 parent 8a66320 commit 581b1f2

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

lib/WebDriver/Container.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function element($using = null, $value = null)
8484
);
8585
}
8686

87-
$element = $this->webDriverElement($result['value']);
87+
$element = $this->makeElement($result['value']);
8888

8989
if ($element === null) {
9090
throw WebDriverException::factory(
@@ -128,7 +128,7 @@ public function elements($using = null, $value = null)
128128

129129
return array_filter(
130130
array_map(
131-
array($this, 'webDriverElement'),
131+
array($this, 'makeElement'),
132132
$result['value']
133133
)
134134
);
@@ -201,13 +201,13 @@ public function locate($using, $value)
201201
}
202202

203203
/**
204-
* Return WebDriver\Element wrapper for $value
204+
* Factory method for elements
205205
*
206206
* @param mixed $value
207207
*
208208
* @return \WebDriver\Element|null
209209
*/
210-
protected function webDriverElement($value)
210+
protected function makeElement($value)
211211
{
212212
if (array_key_exists(LegacyElement::LEGACY_ELEMENT_ID, (array) $value)) {
213213
$identifier = $value[LegacyElement::LEGACY_ELEMENT_ID];

lib/WebDriver/Execute.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ protected function serializeArguments(array $arguments)
112112
*/
113113
protected function unserializeResult($result)
114114
{
115-
$element = is_array($result) ? $this->webDriverElement($result) : null;
115+
$element = is_array($result) ? $this->makeElement($result) : null;
116116

117117
if ($element !== null) {
118118
return $element;
@@ -128,13 +128,13 @@ protected function unserializeResult($result)
128128
}
129129

130130
/**
131-
* Return WebDriver\Element wrapper for $value
131+
* Factory method for elements
132132
*
133133
* @param array $value
134134
*
135135
* @return \WebDriver\Element|\WebDriver\Shadow|null
136136
*/
137-
protected function webDriverElement($value)
137+
protected function makeElement($value)
138138
{
139139
if (array_key_exists(LegacyElement::LEGACY_ELEMENT_ID, $value)) {
140140
$identifier = $value[LegacyElement::LEGACY_ELEMENT_ID];

lib/WebDriver/Session.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ public function activeElement()
378378
{
379379
$result = $this->curl('POST', '/element/active');
380380

381-
return $this->webDriverElement($result['value']);
381+
return $this->makeElement($result['value']);
382382
}
383383

384384
/**

0 commit comments

Comments
 (0)