Skip to content

Commit

Permalink
TASK: adjust types for codeception 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
andrehoffmann30 committed Feb 2, 2023
1 parent a70b9fc commit 8227f61
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Classes/ActorTraits/Checks.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ public function checkboxIsUnChecked(string $selector)

/**
* @Given I should see :expected :selector elements
* @param int $expected
* @param int|string $expected
* @param string $selector
*/
public function seeNElements(int $expected, string $selector)
public function seeNElements(int|string $expected, string $selector)
{
$this->seeNumberOfElements($selector, $expected);
$this->seeNumberOfElements($selector, (int)$expected);
}

/**
Expand Down
16 changes: 8 additions & 8 deletions Classes/ActorTraits/Controls.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ public function iAmOn(string $page): void
* @Given I wait for the text :text
* @Given I wait for the text :text in :seconds seconds
* @param string $text
* @param int $seconds
* @param int|string $seconds
*/
public function iWaitForTheText(string $text, int $seconds = 10): void
public function iWaitForTheText(string $text, int|string $seconds = 10): void
{
$text = str_replace('\\', '', $text);
$this->waitForText($text);
$this->waitForText($text, (int)$seconds);
}

/**
Expand Down Expand Up @@ -89,9 +89,9 @@ public function iCheckOption(string $option): void

/**
* @Given I wait for :seconds seconds
* @param int $seconds
* @param int|string $seconds
*/
public function iWaitForSeconds(int $seconds): void
public function iWaitForSeconds(int|string $seconds): void
{
$this->wait($seconds);
}
Expand Down Expand Up @@ -175,11 +175,11 @@ public function iSubmitFormWithValues(string $form, array $values): void
/**
* @Then I wait for invisible :selector in :seconds
* @param string $selector
* @param int $seconds
* @param int|string $seconds
*/
public function iWaitForElementNotVisible(string $selector, int $seconds): void
public function iWaitForElementNotVisible(string $selector, int|string $seconds): void
{
$this->waitForElementNotVisible($selector, $seconds);
$this->waitForElementNotVisible($selector, (int)$seconds);
}

}

0 comments on commit 8227f61

Please sign in to comment.