/vendor/phpspec/prophecy/src/Prophecy/Argument/Token/TokenInterface.php

https://bitbucket.org/alan_cordova/api-sb-map · PHP · 43 lines · 8 code · 5 blank · 30 comment · 0 complexity · 941b2cfd84f218da6150a464bdb245f6 MD5 · raw file

  1. <?php
  2. /*
  3. * This file is part of the Prophecy.
  4. * (c) Konstantin Kudryashov <ever.zet@gmail.com>
  5. * Marcello Duarte <marcello.duarte@gmail.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Prophecy\Argument\Token;
  11. /**
  12. * Argument token interface.
  13. *
  14. * @author Konstantin Kudryashov <ever.zet@gmail.com>
  15. */
  16. interface TokenInterface
  17. {
  18. /**
  19. * Calculates token match score for provided argument.
  20. *
  21. * @param $argument
  22. *
  23. * @return bool|int
  24. */
  25. public function scoreArgument($argument);
  26. /**
  27. * Returns true if this token prevents check of other tokens (is last one).
  28. *
  29. * @return bool|int
  30. */
  31. public function isLast();
  32. /**
  33. * Returns string representation for token.
  34. *
  35. * @return string
  36. */
  37. public function __toString();
  38. }