Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type method vars #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 38 additions & 38 deletions src/Driver/CoreDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function reset()
/**
* {@inheritdoc}
*/
public function visit($url)
public function visit(string $url)
{
throw new UnsupportedDriverActionException('Visiting an url is not supported by %s', $this);
}
Expand All @@ -94,7 +94,7 @@ public function getContent()
/**
* {@inheritdoc}
*/
public function find($xpath)
public function find(string $xpath)
{
$elements = array();

Expand All @@ -116,111 +116,111 @@ public function find($xpath)
*
* @throws UnsupportedDriverActionException When operation not supported by the driver
*/
protected function findElementXpaths($xpath)
protected function findElementXpaths(string $xpath)
{
throw new UnsupportedDriverActionException('Finding elements is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function getTagName($xpath)
public function getTagName(string $xpath)
{
throw new UnsupportedDriverActionException('Getting the tag name is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function getText($xpath)
public function getText(string $xpath)
{
throw new UnsupportedDriverActionException('Getting the element text is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function getHtml($xpath)
public function getHtml(string $xpath)
{
throw new UnsupportedDriverActionException('Getting the element inner HTML is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function getOuterHtml($xpath)
public function getOuterHtml(string $xpath)
{
throw new UnsupportedDriverActionException('Getting the element outer HTML is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function getAttribute($xpath, $name)
public function getAttribute(string $xpath, string $name)
{
throw new UnsupportedDriverActionException('Getting the element attribute is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function getValue($xpath)
public function getValue(string $xpath)
{
throw new UnsupportedDriverActionException('Getting the field value is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function setValue($xpath, $value)
public function setValue(string $xpath, string $value)
{
throw new UnsupportedDriverActionException('Setting the field value is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function check($xpath)
public function check(string $xpath)
{
throw new UnsupportedDriverActionException('Checking a checkbox is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function uncheck($xpath)
public function uncheck(string $xpath)
{
throw new UnsupportedDriverActionException('Unchecking a checkbox is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function isChecked($xpath)
public function isChecked(string $xpath)
{
throw new UnsupportedDriverActionException('Getting the state of a checkbox is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function selectOption($xpath, $value, $multiple = false)
public function selectOption(string $xpath, string $value, bool $multiple = false)
{
throw new UnsupportedDriverActionException('Selecting an option is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function click($xpath)
public function click(string $xpath)
{
throw new UnsupportedDriverActionException('Clicking on an element is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function attachFile($xpath, $path)
public function attachFile(string $xpath, string $path)
{
throw new UnsupportedDriverActionException('Attaching a file in an input is not supported by %s', $this);
}
Expand Down Expand Up @@ -260,23 +260,23 @@ public function setBasicAuth($user, $password)
/**
* {@inheritdoc}
*/
public function switchToWindow($name = null)
public function switchToWindow(?string $name = null)
{
throw new UnsupportedDriverActionException('Windows management is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function switchToIFrame($name = null)
public function switchToIFrame(?string $name = null)
{
throw new UnsupportedDriverActionException('iFrames management is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function setRequestHeader($name, $value)
public function setRequestHeader(string $name, string $value)
{
throw new UnsupportedDriverActionException('Request headers manipulation is not supported by %s', $this);
}
Expand All @@ -292,15 +292,15 @@ public function getResponseHeaders()
/**
* {@inheritdoc}
*/
public function setCookie($name, $value = null)
public function setCookie(string $name, ?string $value = null)
{
throw new UnsupportedDriverActionException('Cookies manipulation is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function getCookie($name)
public function getCookie(string $name)
{
throw new UnsupportedDriverActionException('Cookies are not available from %s', $this);
}
Expand Down Expand Up @@ -340,135 +340,135 @@ public function getWindowName()
/**
* {@inheritdoc}
*/
public function doubleClick($xpath)
public function doubleClick(string $xpath)
{
throw new UnsupportedDriverActionException('Double-clicking is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function rightClick($xpath)
public function rightClick(string $xpath)
{
throw new UnsupportedDriverActionException('Right-clicking is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function isVisible($xpath)
public function isVisible(string $xpath)
{
throw new UnsupportedDriverActionException('Element visibility check is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function isSelected($xpath)
public function isSelected(string $xpath)
{
throw new UnsupportedDriverActionException('Element selection check is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function mouseOver($xpath)
public function mouseOver(string $xpath)
{
throw new UnsupportedDriverActionException('Mouse manipulations are not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function focus($xpath)
public function focus(string $xpath)
{
throw new UnsupportedDriverActionException('Mouse manipulations are not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function blur($xpath)
public function blur(string $xpath)
{
throw new UnsupportedDriverActionException('Mouse manipulations are not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function keyPress($xpath, $char, $modifier = null)
public function keyPress(string $xpath, string $char, ?string $modifier = null)
{
throw new UnsupportedDriverActionException('Keyboard manipulations are not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function keyDown($xpath, $char, $modifier = null)
public function keyDown(string $xpath, string $char, ?string $modifier = null)
{
throw new UnsupportedDriverActionException('Keyboard manipulations are not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function keyUp($xpath, $char, $modifier = null)
public function keyUp(string $xpath, string $char, ?string $modifier = null)
{
throw new UnsupportedDriverActionException('Keyboard manipulations are not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function dragTo($sourceXpath, $destinationXpath)
public function dragTo(string $sourceXpath, string $destinationXpath)
{
throw new UnsupportedDriverActionException('Mouse manipulations are not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function executeScript($script)
public function executeScript(string $script)
{
throw new UnsupportedDriverActionException('JS is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function evaluateScript($script)
public function evaluateScript(string $script)
{
throw new UnsupportedDriverActionException('JS is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function wait($timeout, $condition)
public function wait(int $timeout, string $condition)
{
throw new UnsupportedDriverActionException('JS is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function resizeWindow($width, $height, $name = null)
public function resizeWindow(int $width, int $height, ?string $name = null)
{
throw new UnsupportedDriverActionException('Window resizing is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function maximizeWindow($name = null)
public function maximizeWindow(?string $name = null)
{
throw new UnsupportedDriverActionException('Window maximize is not supported by %s', $this);
}

/**
* {@inheritdoc}
*/
public function submitForm($xpath)
public function submitForm(string $xpath)
{
throw new UnsupportedDriverActionException('Form submission is not supported by %s', $this);
}
Expand Down
Loading