class LogicalNotToken in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalNotToken.php \Prophecy\Argument\Token\LogicalNotToken
Logical NOT token.
@author Boris Mikhaylov <kaguxmail@gmail.com>
Hierarchy
- class \Prophecy\Argument\Token\LogicalNotToken implements TokenInterface
Expanded class hierarchy of LogicalNotToken
File
- vendor/
phpspec/ prophecy/ src/ Prophecy/ Argument/ Token/ LogicalNotToken.php, line 19
Namespace
Prophecy\Argument\TokenView source
class LogicalNotToken implements TokenInterface {
/** @var \Prophecy\Argument\Token\TokenInterface */
private $token;
/**
* @param mixed $value exact value or token
*/
public function __construct($value) {
$this->token = $value instanceof TokenInterface ? $value : new ExactValueToken($value);
}
/**
* Scores 4 when preset token does not match the argument.
*
* @param $argument
*
* @return bool|int
*/
public function scoreArgument($argument) {
return false === $this->token
->scoreArgument($argument) ? 4 : false;
}
/**
* Returns true if preset token is last.
*
* @return bool|int
*/
public function isLast() {
return $this->token
->isLast();
}
/**
* Returns originating token.
*
* @return TokenInterface
*/
public function getOriginatingToken() {
return $this->token;
}
/**
* Returns string representation for token.
*
* @return string
*/
public function __toString() {
return sprintf('not(%s)', $this->token);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LogicalNotToken:: |
private | property | @var \Prophecy\Argument\Token\TokenInterface | |
LogicalNotToken:: |
public | function | Returns originating token. | |
LogicalNotToken:: |
public | function |
Returns true if preset token is last. Overrides TokenInterface:: |
|
LogicalNotToken:: |
public | function |
Scores 4 when preset token does not match the argument. Overrides TokenInterface:: |
|
LogicalNotToken:: |
public | function | ||
LogicalNotToken:: |
public | function |
Returns string representation for token. Overrides TokenInterface:: |