NamespaceMatch.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /*
  3. * This file is part of PHPUnit.
  4. *
  5. * This file is modified to replace the Match interface with ParametersMatch,
  6. * to avoid parse errors due to `match` being a reserved keyword in PHP 8.
  7. *
  8. * When the test suite is updated for compatibility with PHPUnit 9.x,
  9. * this override can be removed.
  10. *
  11. * (c) Sebastian Bergmann <sebastian@phpunit.de>
  12. *
  13. * For the full copyright and license information, please view the LICENSE
  14. * file that was distributed with this source code.
  15. */
  16. namespace PHPUnit\Framework\MockObject\Builder;
  17. /**
  18. * Interface for builders which can register builders with a given identification.
  19. *
  20. * This interface relates to Identity.
  21. */
  22. interface NamespaceMatch
  23. {
  24. /**
  25. * Looks up the match builder with identification $id and returns it.
  26. *
  27. * @param string $id The identification of the match builder
  28. *
  29. * @return Match
  30. */
  31. public function lookupId($id);
  32. /**
  33. * Registers the match builder $builder with the identification $id. The
  34. * builder can later be looked up using lookupId() to figure out if it
  35. * has been invoked.
  36. *
  37. * @param string $id The identification of the match builder
  38. * @param Match $builder The builder which is being registered
  39. */
  40. public function registerId($id, ParametersMatch $builder);
  41. }