Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Commit 5c724f1

Browse files
committed
Remove invalid phpDoc return tags
1 parent e51fad6 commit 5c724f1

File tree

1 file changed

+26
-32
lines changed

1 file changed

+26
-32
lines changed

lib/WebDriverExpectedCondition.php

Lines changed: 26 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function getApply()
5151
* An expectation for checking the title of a page.
5252
*
5353
* @param string $title The expected title, which must be an exact match.
54-
* @return WebDriverExpectedCondition<bool> Condition returns whether current page title equals given string.
54+
* @return static Condition returns whether current page title equals given string.
5555
*/
5656
public static function titleIs($title)
5757
{
@@ -66,7 +66,7 @@ function (WebDriver $driver) use ($title) {
6666
* An expectation for checking substring of a page Title.
6767
*
6868
* @param string $title The expected substring of Title.
69-
* @return WebDriverExpectedCondition<bool> Condition returns whether current page title contains given string.
69+
* @return static Condition returns whether current page title contains given string.
7070
*/
7171
public static function titleContains($title)
7272
{
@@ -81,8 +81,7 @@ function (WebDriver $driver) use ($title) {
8181
* An expectation for checking current page title matches the given regular expression.
8282
*
8383
* @param string $titleRegexp The regular expression to test against.
84-
* @return WebDriverExpectedCondition<bool> Condition returns whether current page title matches the regular
85-
* expression.
84+
* @return static Condition returns whether current page title matches the regular expression.
8685
*/
8786
public static function titleMatches($titleRegexp)
8887
{
@@ -97,7 +96,7 @@ function (WebDriver $driver) use ($titleRegexp) {
9796
* An expectation for checking the URL of a page.
9897
*
9998
* @param string $url The expected URL, which must be an exact match.
100-
* @return WebDriverExpectedCondition<bool> Condition returns whether current URL equals given one.
99+
* @return static Condition returns whether current URL equals given one.
101100
*/
102101
public static function urlIs($url)
103102
{
@@ -112,7 +111,7 @@ function (WebDriver $driver) use ($url) {
112111
* An expectation for checking substring of the URL of a page.
113112
*
114113
* @param string $url The expected substring of the URL
115-
* @return WebDriverExpectedCondition<bool> Condition returns whether current URL contains given string.
114+
* @return static Condition returns whether current URL contains given string.
116115
*/
117116
public static function urlContains($url)
118117
{
@@ -127,7 +126,7 @@ function (WebDriver $driver) use ($url) {
127126
* An expectation for checking current page URL matches the given regular expression.
128127
*
129128
* @param string $urlRegexp The regular expression to test against.
130-
* @return WebDriverExpectedCondition<bool> Condition returns whether current URL matches the regular expression.
129+
* @return static Condition returns whether current URL matches the regular expression.
131130
*/
132131
public static function urlMatches($urlRegexp)
133132
{
@@ -143,7 +142,7 @@ function (WebDriver $driver) use ($urlRegexp) {
143142
* This does not necessarily mean that the element is visible.
144143
*
145144
* @param WebDriverBy $by The locator used to find the element.
146-
* @return WebDriverExpectedCondition<WebDriverElement> Condition returns the element which is located.
145+
* @return static Condition returns the WebDriverElement which is located.
147146
*/
148147
public static function presenceOfElementLocated(WebDriverBy $by)
149148
{
@@ -158,7 +157,7 @@ function (WebDriver $driver) use ($by) {
158157
* An expectation for checking that there is at least one element present on a web page.
159158
*
160159
* @param WebDriverBy $by The locator used to find the element.
161-
* @return WebDriverExpectedCondition<array> Condition returns an array of WebDriverElements once they are located.
160+
* @return static Condition return an array of WebDriverElement once they are located.
162161
*/
163162
public static function presenceOfAllElementsLocatedBy(WebDriverBy $by)
164163
{
@@ -176,7 +175,7 @@ function (WebDriver $driver) use ($by) {
176175
* Visibility means that the element is not only displayed but also has a height and width that is greater than 0.
177176
*
178177
* @param WebDriverBy $by The locator used to find the element.
179-
* @return WebDriverExpectedCondition<WebDriverElement> Condition returns the element which is located and visible.
178+
* @return static Condition returns the WebDriverElement which is located and visible.
180179
*/
181180
public static function visibilityOfElementLocated(WebDriverBy $by)
182181
{
@@ -199,7 +198,7 @@ function (WebDriver $driver) use ($by) {
199198
* Visibility means that the element is not only displayed but also has a height and width that is greater than 0.
200199
*
201200
* @param WebDriverBy $by The located used to find the element.
202-
* @return WebDriverExpectedCondition<WebDriverElement> Condition returns the elements that are located and visible.
201+
* @return static Condition returns the array of WebDriverElement that are located and visible.
203202
*/
204203
public static function visibilityOfAnyElementLocated(WebDriverBy $by)
205204
{
@@ -227,8 +226,7 @@ function (WebDriver $driver) use ($by) {
227226
* Visibility means that the element is not only displayed but also has a height and width that is greater than 0.
228227
*
229228
* @param WebDriverElement $element The element to be checked.
230-
* @return WebDriverExpectedCondition<WebDriverElement> Condition returns the same WebDriverElement once it is
231-
* visible.
229+
* @return static Condition returns the same WebDriverElement once it is visible.
232230
*/
233231
public static function visibilityOf(WebDriverElement $element)
234232
{
@@ -247,7 +245,7 @@ function () use ($element) {
247245
* @deprecated Use WebDriverExpectedCondition::elementTextContains() instead
248246
* @param WebDriverBy $by The locator used to find the element.
249247
* @param string $text The text to be presented in the element.
250-
* @return WebDriverExpectedCondition<bool> Condition returns whether the text is present in the element.
248+
* @return static Condition returns whether the text is present in the element.
251249
*/
252250
public static function textToBePresentInElement(WebDriverBy $by, $text)
253251
{
@@ -260,7 +258,7 @@ public static function textToBePresentInElement(WebDriverBy $by, $text)
260258
*
261259
* @param WebDriverBy $by The locator used to find the element.
262260
* @param string $text The text to be presented in the element.
263-
* @return WebDriverExpectedCondition<bool> Condition returns whether the partial text is present in the element.
261+
* @return static Condition returns whether the partial text is present in the element.
264262
*/
265263
public static function elementTextContains(WebDriverBy $by, $text)
266264
{
@@ -283,7 +281,7 @@ function (WebDriver $driver) use ($by, $text) {
283281
*
284282
* @param WebDriverBy $by The locator used to find the element.
285283
* @param string $text The expected text of the element.
286-
* @return WebDriverExpectedCondition<bool> Condition returns whether the element has text value equal to given one.
284+
* @return static Condition returns whether the element has text value equal to given one.
287285
*/
288286
public static function elementTextIs(WebDriverBy $by, $text)
289287
{
@@ -303,7 +301,7 @@ function (WebDriver $driver) use ($by, $text) {
303301
*
304302
* @param WebDriverBy $by The locator used to find the element.
305303
* @param string $regexp The regular expression to test against.
306-
* @return WebDriverExpectedCondition<bool> Condition returns whether the element has text value equal to given one.
304+
* @return static Condition returns whether the element has text value equal to given one.
307305
*/
308306
public static function elementTextMatches(WebDriverBy $by, $regexp)
309307
{
@@ -325,7 +323,7 @@ function (WebDriver $driver) use ($by, $regexp) {
325323
* @deprecated Use WebDriverExpectedCondition::elementValueContains() instead
326324
* @param WebDriverBy $by The locator used to find the element.
327325
* @param string $text The text to be presented in the element value.
328-
* @return WebDriverExpectedCondition<bool> Condition returns whether the text is present in value attribute.
326+
* @return static Condition returns whether the text is present in value attribute.
329327
*/
330328
public static function textToBePresentInElementValue(WebDriverBy $by, $text)
331329
{
@@ -337,7 +335,7 @@ public static function textToBePresentInElementValue(WebDriverBy $by, $text)
337335
*
338336
* @param WebDriverBy $by The locator used to find the element.
339337
* @param string $text The text to be presented in the element value.
340-
* @return WebDriverExpectedCondition<bool> Condition returns whether the text is present in value attribute.
338+
* @return static Condition returns whether the text is present in value attribute.
341339
*/
342340
public static function elementValueContains(WebDriverBy $by, $text)
343341
{
@@ -359,8 +357,7 @@ function (WebDriver $driver) use ($by, $text) {
359357
*
360358
* @param string $frame_locator The locator used to find the iFrame
361359
* expected to be either the id or name value of the i/frame
362-
* @return WebDriverExpectedCondition<WebDriver|bool> Condition returns object focused on new frame when frame is
363-
* found, false otherwise.
360+
* @return static Condition returns object focused on new frame when frame is found, false otherwise.
364361
*/
365362
public static function frameToBeAvailableAndSwitchToIt($frame_locator)
366363
{
@@ -379,7 +376,7 @@ function (WebDriver $driver) use ($frame_locator) {
379376
* An expectation for checking that an element is either invisible or not present on the DOM.
380377
*
381378
* @param WebDriverBy $by The locator used to find the element.
382-
* @return WebDriverExpectedCondition<bool> Condition returns whether no visible element located.
379+
* @return static Condition returns whether no visible element located.
383380
*/
384381
public static function invisibilityOfElementLocated(WebDriverBy $by)
385382
{
@@ -401,7 +398,7 @@ function (WebDriver $driver) use ($by) {
401398
*
402399
* @param WebDriverBy $by The locator used to find the element.
403400
* @param string $text The text of the element.
404-
* @return WebDriverExpectedCondition<bool> Condition returns whether the text is found in the element located.
401+
* @return static Condition returns whether the text is found in the element located.
405402
*/
406403
public static function invisibilityOfElementWithText(WebDriverBy $by, $text)
407404
{
@@ -422,8 +419,7 @@ function (WebDriver $driver) use ($by, $text) {
422419
* An expectation for checking an element is visible and enabled such that you can click it.
423420
*
424421
* @param WebDriverBy $by The locator used to find the element
425-
* @return WebDriverExpectedCondition<WebDriverElement> Condition return the WebDriverElement once it is located,
426-
* visible and clickable.
422+
* @return static Condition return the WebDriverElement once it is located, visible and clickable.
427423
*/
428424
public static function elementToBeClickable(WebDriverBy $by)
429425
{
@@ -453,7 +449,7 @@ function (WebDriver $driver) use ($visibility_of_element_located) {
453449
* Wait until an element is no longer attached to the DOM.
454450
*
455451
* @param WebDriverElement $element The element to wait for.
456-
* @return WebDriverExpectedCondition<bool> Condition returns whether the element is still attached to the DOM.
452+
* @return static Condition returns whether the element is still attached to the DOM.
457453
*/
458454
public static function stalenessOf(WebDriverElement $element)
459455
{
@@ -479,8 +475,7 @@ function () use ($element) {
479475
* the condition is checked.
480476
*
481477
* @param WebDriverExpectedCondition $condition The condition wrapped.
482-
* @return WebDriverExpectedCondition<mixed> Condition returns the return value of the getApply() of the given
483-
* condition.
478+
* @return static Condition returns the return value of the getApply() of the given condition.
484479
*/
485480
public static function refreshed(self $condition)
486481
{
@@ -499,7 +494,7 @@ function (WebDriver $driver) use ($condition) {
499494
* An expectation for checking if the given element is selected.
500495
*
501496
* @param mixed $element_or_by Either the element or the locator.
502-
* @return WebDriverExpectedCondition<bool> Condition returns whether the element is selected.
497+
* @return static Condition returns whether the element is selected.
503498
*/
504499
public static function elementToBeSelected($element_or_by)
505500
{
@@ -514,7 +509,7 @@ public static function elementToBeSelected($element_or_by)
514509
*
515510
* @param mixed $element_or_by Either the element or the locator.
516511
* @param bool $selected The required state.
517-
* @return WebDriverExpectedCondition<bool> Condition returns whether the element is selected.
512+
* @return static Condition returns whether the element is selected.
518513
*/
519514
public static function elementSelectionStateToBe($element_or_by, $selected)
520515
{
@@ -544,8 +539,7 @@ function (WebDriver $driver) use ($element_or_by, $selected) {
544539
/**
545540
* An expectation for whether an alert() box is present.
546541
*
547-
* @return WebDriverExpectedCondition<?WebDriverAlert> Condition returns WebDriverAlert if alert() is present,
548-
* null otherwise.
542+
* @return static Condition returns WebDriverAlert if alert() is present, null otherwise.
549543
*/
550544
public static function alertIsPresent()
551545
{

0 commit comments

Comments
 (0)