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

Breadcrumb

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

function InArrayToken::scoreArgument

Return scores 8 score if argument is in array.

Parameters

$argument:

Return value

bool|int

Overrides TokenInterface::scoreArgument

File

vendor/phpspec/prophecy/src/Prophecy/Argument/Token/InArrayToken.php, line 41

Class

InArrayToken
Check if values is in array

Namespace

Prophecy\Argument\Token

Code

public function scoreArgument($argument) {
    if (count($this->token) === 0) {
        return false;
    }
    if (\in_array($argument, $this->token, $this->strict)) {
        return 8;
    }
    return false;
}

API Navigation

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