Skip to content
Snippets Groups Projects
Select Git revision
  • e394a7834173644547ab9f384202eb18208284dc
  • master default protected
  • feat/message-handling
  • feat/request-id
  • 1.13.2
  • 1.13.1
  • 1.13.0
  • 1.12.1
  • 1.12.0
  • 1.11.0
  • 1.11.0-beta2
  • 1.11.0-beta1
  • 1.10.2
  • 1.10.1
  • 1.10.0
  • 1.9.0
  • 1.8.0
  • 1.7.4
  • 1.7.3
  • 1.7.2
  • 1.7.1
  • 1.7.0
  • 1.6.2
  • 1.6.2-beta2
24 results

phpunit-unit.xml

Blame
  • WpdbMigrationFactory.php 569 B
    <?php
    declare(strict_types=1);
    
    namespace WPDesk\Migrations\Version;
    
    use Psr\Log\LoggerInterface;
    use WPDesk\Migrations\AbstractMigration;
    
    class WpdbMigrationFactory implements MigrationFactory {
    
    	/** @var \wpdb */
    	protected $wpdb;
    
    	/** @var LoggerInterface */
    	protected $logger;
    
    	public function __construct( \wpdb $wpdb, LoggerInterface $logger ) {
    		$this->wpdb   = $wpdb;
    		$this->logger = $logger;
    	}
    
    	public function create_version( string $migration_class ): AbstractMigration {
    		return new $migration_class(
    			$this->wpdb,
    			$this->logger
    		);
    	}
    
    }