Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TokenInterface.php

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.

... See full list

File

vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php, line 28

Class

TokenInterface
Argument token interface.

Namespace

Prophecy\Argument\Token

Code

public function scoreArgument($argument);

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal