Skip to content

Commit

Permalink
FileImporter: allow to pass IConnection instance
Browse files Browse the repository at this point in the history
  • Loading branch information
hrach committed Dec 14, 2017
1 parent 8b4f6b2 commit ed8587f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Utils/FileImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace Nextras\Dbal\Utils;

use Nextras\Dbal\Connection;
use Nextras\Dbal\IConnection;
use Nextras\Dbal\IOException;


Expand All @@ -23,11 +23,9 @@ class FileImporter
* @author Jan Škrášek
* @license Apache License
*
* @param Connection $connection
* @param string $file path to imported file
* @return int number of executed queries
*/
public static function executeFile(Connection $connection, string $file): int
public static function executeFile(IConnection $connection, string $file): int
{
$query = @file_get_contents($file);
if ($query === false) {
Expand Down

0 comments on commit ed8587f

Please sign in to comment.