function LogicalAndToken::scoreArgument
Scores maximum score from scores returned by tokens for this argument if all of them score.
Parameters
mixed $argument:
Return value
false|int
Overrides TokenInterface::scoreArgument
File
-
vendor/
phpspec/ prophecy/ src/ Prophecy/ Argument/ Token/ LogicalAndToken.php, line 46
Class
- LogicalAndToken
- Logical AND token.
Namespace
Prophecy\Argument\TokenCode
public function scoreArgument($argument) {
if (0 === count($this->tokens)) {
return false;
}
$maxScore = 0;
foreach ($this->tokens as $token) {
$score = $token->scoreArgument($argument);
if (false === $score) {
return false;
}
$maxScore = max($score, $maxScore);
}
return $maxScore;
}