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

https://bitbucket.org/alan_cordova/api-sb-map · PHP · 52 lines · 17 code · 5 blank · 30 comment · 0 complexity · c6e9b1489a9a2ecf3186e13ad4613ef4 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. * Any single value token.
  13. *
  14. * @author Konstantin Kudryashov <ever.zet@gmail.com>
  15. */
  16. class AnyValueToken implements TokenInterface
  17. {
  18. /**
  19. * Always scores 3 for any argument.
  20. *
  21. * @param $argument
  22. *
  23. * @return int
  24. */
  25. public function scoreArgument($argument)
  26. {
  27. return 3;
  28. }
  29. /**
  30. * Returns false.
  31. *
  32. * @return bool
  33. */
  34. public function isLast()
  35. {
  36. return false;
  37. }
  38. /**
  39. * Returns string representation for token.
  40. *
  41. * @return string
  42. */
  43. public function __toString()
  44. {
  45. return '*';
  46. }
  47. }