You are here

public function CallbackToken::scoreArgument in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php \Prophecy\Argument\Token\CallbackToken::scoreArgument()

Scores 7 if callback returns true, false otherwise.

Parameters

$argument:

Return value

bool|int

Overrides TokenInterface::scoreArgument

File

vendor/phpspec/prophecy/src/Prophecy/Argument/Token/CallbackToken.php, line 51

Class

CallbackToken
Callback-verified token.

Namespace

Prophecy\Argument\Token

Code

public function scoreArgument($argument) {
  return call_user_func($this->callback, $argument) ? 7 : false;
}