Version.php 502 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. declare(strict_types=1);
  3. namespace Doctrine\Migrations\Version;
  4. final class Version
  5. {
  6. /** @var string */
  7. private $version;
  8. public function __construct(string $version)
  9. {
  10. $this->version = $version;
  11. }
  12. public function __toString(): string
  13. {
  14. return $this->version;
  15. }
  16. /**
  17. * @param mixed $object
  18. */
  19. public function equals($object): bool
  20. {
  21. return $object instanceof self && $object->version === $this->version;
  22. }
  23. }