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

Breadcrumb

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

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\Token

Code

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;
}

API Navigation

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