public function LogicalAndToken::scoreArgument in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpspec/prophecy/src/Prophecy/Argument/Token/LogicalAndToken.php \Prophecy\Argument\Token\LogicalAndToken::scoreArgument()
Scores maximum score from scores returned by tokens for this argument if all of them score.
Parameters
$argument:
Return value
bool|int
Overrides TokenInterface::scoreArgument
File
- vendor/
phpspec/ prophecy/ src/ Prophecy/ Argument/ Token/ LogicalAndToken.php, line 43
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;
}