AvailableMigration.php 772 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. declare(strict_types=1);
  3. namespace Doctrine\Migrations\Metadata;
  4. use Doctrine\Migrations\AbstractMigration;
  5. use Doctrine\Migrations\Version\Version;
  6. /**
  7. * Available migrations may or may not be already executed
  8. * The migration might be already executed or not.
  9. */
  10. final class AvailableMigration
  11. {
  12. /** @var Version */
  13. private $version;
  14. /** @var AbstractMigration */
  15. private $migration;
  16. public function __construct(Version $version, AbstractMigration $migration)
  17. {
  18. $this->version = $version;
  19. $this->migration = $migration;
  20. }
  21. public function getVersion(): Version
  22. {
  23. return $this->version;
  24. }
  25. public function getMigration(): AbstractMigration
  26. {
  27. return $this->migration;
  28. }
  29. }