| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | public function tweet($text) |
||
| 27 | { |
||
| 28 | |||
| 29 | $element = $this->webDriver->byXpath($this->theme->getTweetBoxXpath()); |
||
| 30 | $element->click(); |
||
| 31 | |||
| 32 | $this->webDriver->getKeyboard()->sendKeys($text); |
||
| 33 | |||
| 34 | $this->webDriver->wait(5)->until(ExpectedCondition::elementExists($this->theme->getTweetButton(), WebDriver::BY_XPATH)); |
||
|
|
|||
| 35 | $element = $this->webDriver->byXpath($this->theme->getTweetButton()); |
||
| 36 | |||
| 37 | $this->webDriver->wait(5)->until(ExpectedCondition::visibilityOf($element)); |
||
| 38 | $element->click(); |
||
| 39 | |||
| 40 | } |
||
| 41 | |||
| 42 | } |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: