function TokenInterface::scoreArgument
Calculates token match score for provided argument.
Parameters
mixed $argument:
Return value
false|int
16 methods override TokenInterface::scoreArgument()
- AnyValuesToken::scoreArgument in vendor/
phpspec/ prophecy/ src/ Prophecy/ Argument/ Token/ AnyValuesToken.php - Always scores 2 for any argument.
- AnyValueToken::scoreArgument in vendor/
phpspec/ prophecy/ src/ Prophecy/ Argument/ Token/ AnyValueToken.php - Always scores 3 for any argument.
- ApproximateValueToken::scoreArgument in vendor/
phpspec/ prophecy/ src/ Prophecy/ Argument/ Token/ ApproximateValueToken.php - Calculates token match score for provided argument.
- ArrayCountToken::scoreArgument in vendor/
phpspec/ prophecy/ src/ Prophecy/ Argument/ Token/ ArrayCountToken.php - Scores 6 when argument has preset number of elements.
- ArrayEntryToken::scoreArgument in vendor/
phpspec/ prophecy/ src/ Prophecy/ Argument/ Token/ ArrayEntryToken.php - Scores half of combined scores from key and value tokens for same entry. Capped at 8. If argument implements \ArrayAccess without \Traversable, then key token is restricted to ExactValueToken.
File
-
vendor/
phpspec/ prophecy/ src/ Prophecy/ Argument/ Token/ TokenInterface.php, line 28
Class
- TokenInterface
- Argument token interface.
Namespace
Prophecy\Argument\TokenCode
public function scoreArgument($argument);