@@ -124,7 +124,7 @@ public function _conflicts(): string
124
124
return \Codeception \Lib \Interfaces \Web::class;
125
125
}
126
126
127
- public function _findElements ($ locator )
127
+ public function _findElements (mixed $ locator ): iterable
128
128
{
129
129
return $ this ->match ($ locator );
130
130
}
@@ -633,7 +633,7 @@ public function dontSeeCurrentUrlMatches(string $uri): void
633
633
$ this ->assertNotRegExp ($ uri , $ this ->_getCurrentUri ());
634
634
}
635
635
636
- public function grabFromCurrentUrl ($ uri = null )
636
+ public function grabFromCurrentUrl (string $ uri = null ): mixed
637
637
{
638
638
if (!$ uri ) {
639
639
return $ this ->_getCurrentUri ();
@@ -1475,7 +1475,7 @@ protected function filterByAttributes(Crawler $nodes, array $attributes)
1475
1475
return $ nodes ;
1476
1476
}
1477
1477
1478
- public function grabTextFrom ($ cssOrXPathOrRegex )
1478
+ public function grabTextFrom ($ cssOrXPathOrRegex ): mixed
1479
1479
{
1480
1480
if (is_string ($ cssOrXPathOrRegex ) && @preg_match ($ cssOrXPathOrRegex , $ this ->client ->getInternalResponse ()->getContent (), $ matches )) {
1481
1481
return $ matches [1 ];
@@ -1489,7 +1489,7 @@ public function grabTextFrom($cssOrXPathOrRegex)
1489
1489
throw new ElementNotFound ($ cssOrXPathOrRegex , 'Element that matches CSS or XPath or Regex ' );
1490
1490
}
1491
1491
1492
- public function grabAttributeFrom ($ cssOrXpath , $ attribute )
1492
+ public function grabAttributeFrom ($ cssOrXpath , string $ attribute ): mixed
1493
1493
{
1494
1494
$ nodes = $ this ->match ($ cssOrXpath );
1495
1495
if ($ nodes ->count () === 0 ) {
@@ -1511,7 +1511,7 @@ public function grabMultiple($cssOrXpath, string $attribute = null): array
1511
1511
return $ result ;
1512
1512
}
1513
1513
1514
- public function grabValueFrom ($ field )
1514
+ public function grabValueFrom ($ field ): mixed
1515
1515
{
1516
1516
$ nodes = $ this ->match ($ field );
1517
1517
if ($ nodes ->count () === 0 ) {
@@ -1566,7 +1566,7 @@ public function setCookie($name, $val, $params = [])
1566
1566
$ this ->debugCookieJar ();
1567
1567
}
1568
1568
1569
- public function grabCookie ($ cookie , $ params = [])
1569
+ public function grabCookie (string $ cookie , array $ params = []): mixed
1570
1570
{
1571
1571
$ params = array_merge ($ this ->defaultCookieParameters , $ params );
1572
1572
$ this ->debugCookieJar ();
0 commit comments