You are here

class AnyValuesToken in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php \Prophecy\Argument\Token\AnyValuesToken

Any values token.

@author Konstantin Kudryashov <ever.zet@gmail.com>

Hierarchy

Expanded class hierarchy of AnyValuesToken

2 files declare their use of AnyValuesToken
CallPrediction.php in vendor/phpspec/prophecy/src/Prophecy/Prediction/CallPrediction.php
CallTimesPrediction.php in vendor/phpspec/prophecy/src/Prophecy/Prediction/CallTimesPrediction.php

File

vendor/phpspec/prophecy/src/Prophecy/Argument/Token/AnyValuesToken.php, line 19

Namespace

Prophecy\Argument\Token
View source
class AnyValuesToken implements TokenInterface {

  /**
   * Always scores 2 for any argument.
   *
   * @param $argument
   *
   * @return int
   */
  public function scoreArgument($argument) {
    return 2;
  }

  /**
   * Returns true to stop wildcard from processing other tokens.
   *
   * @return bool
   */
  public function isLast() {
    return true;
  }

  /**
   * Returns string representation for token.
   *
   * @return string
   */
  public function __toString() {
    return '* [, ...]';
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AnyValuesToken::isLast public function Returns true to stop wildcard from processing other tokens. Overrides TokenInterface::isLast
AnyValuesToken::scoreArgument public function Always scores 2 for any argument. Overrides TokenInterface::scoreArgument
AnyValuesToken::__toString public function Returns string representation for token. Overrides TokenInterface::__toString