StubSchemaProvider.php 552 B

123456789101112131415161718192021222324252627
  1. <?php
  2. declare(strict_types=1);
  3. namespace Doctrine\Migrations\Provider;
  4. use Doctrine\DBAL\Schema\Schema;
  5. /**
  6. * The StubSchemaProvider takes a Doctrine\DBAL\Schema\Schema instance through the constructor and returns it
  7. * from the createSchema() method.
  8. */
  9. final class StubSchemaProvider implements SchemaProvider
  10. {
  11. /** @var Schema */
  12. private $toSchema;
  13. public function __construct(Schema $schema)
  14. {
  15. $this->toSchema = $schema;
  16. }
  17. public function createSchema(): Schema
  18. {
  19. return $this->toSchema;
  20. }
  21. }