Skip to content

Commit 7dcd370

Browse files
committed
Alignment of methods with parent lib interfaces
1 parent 17a740e commit 7dcd370

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Codeception/Lib/InnerBrowser.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function _conflicts(): string
124124
return \Codeception\Lib\Interfaces\Web::class;
125125
}
126126

127-
public function _findElements($locator)
127+
public function _findElements(mixed $locator): iterable
128128
{
129129
return $this->match($locator);
130130
}
@@ -633,7 +633,7 @@ public function dontSeeCurrentUrlMatches(string $uri): void
633633
$this->assertNotRegExp($uri, $this->_getCurrentUri());
634634
}
635635

636-
public function grabFromCurrentUrl($uri = null)
636+
public function grabFromCurrentUrl(string $uri = null): mixed
637637
{
638638
if (!$uri) {
639639
return $this->_getCurrentUri();
@@ -1475,7 +1475,7 @@ protected function filterByAttributes(Crawler $nodes, array $attributes)
14751475
return $nodes;
14761476
}
14771477

1478-
public function grabTextFrom($cssOrXPathOrRegex)
1478+
public function grabTextFrom($cssOrXPathOrRegex): mixed
14791479
{
14801480
if (is_string($cssOrXPathOrRegex) && @preg_match($cssOrXPathOrRegex, $this->client->getInternalResponse()->getContent(), $matches)) {
14811481
return $matches[1];
@@ -1489,7 +1489,7 @@ public function grabTextFrom($cssOrXPathOrRegex)
14891489
throw new ElementNotFound($cssOrXPathOrRegex, 'Element that matches CSS or XPath or Regex');
14901490
}
14911491

1492-
public function grabAttributeFrom($cssOrXpath, $attribute)
1492+
public function grabAttributeFrom($cssOrXpath, string $attribute): mixed
14931493
{
14941494
$nodes = $this->match($cssOrXpath);
14951495
if ($nodes->count() === 0) {
@@ -1511,7 +1511,7 @@ public function grabMultiple($cssOrXpath, string $attribute = null): array
15111511
return $result;
15121512
}
15131513

1514-
public function grabValueFrom($field)
1514+
public function grabValueFrom($field): mixed
15151515
{
15161516
$nodes = $this->match($field);
15171517
if ($nodes->count() === 0) {
@@ -1566,7 +1566,7 @@ public function setCookie($name, $val, $params = [])
15661566
$this->debugCookieJar();
15671567
}
15681568

1569-
public function grabCookie($cookie, $params = [])
1569+
public function grabCookie(string $cookie, array $params = []): mixed
15701570
{
15711571
$params = array_merge($this->defaultCookieParameters, $params);
15721572
$this->debugCookieJar();

0 commit comments

Comments
 (0)