HashableInterface.php 868 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.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 Symfony\Component\Uid;
  11. if (interface_exists(\Ds\Key::class)) {
  12. /**
  13. * @internal
  14. */
  15. interface HashableInterface extends \Ds\Key
  16. {
  17. public function equals(mixed $other): bool;
  18. public function hash(): string;
  19. }
  20. } elseif (interface_exists(\Ds\Hashable::class)) {
  21. /**
  22. * @internal
  23. */
  24. interface HashableInterface extends \Ds\Hashable
  25. {
  26. public function hash(): string;
  27. }
  28. } else {
  29. /**
  30. * @internal
  31. */
  32. interface HashableInterface
  33. {
  34. public function equals(mixed $other): bool;
  35. public function hash(): string;
  36. }
  37. }