Skip to content

Commit 7c44b51

Browse files
committed
Renamed classes
1 parent 77f7d51 commit 7c44b51

15 files changed

+34
-34
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ install:
88
- composer install
99

1010
script:
11-
- phpunit tests/SqliteCommandTest.php
11+
- phpunit tests/SqliteDatabaseTest.php
1212

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ This library has integrated tests and need to be setup for each database you wan
134134
Basiclly you have the follow tests:
135135

136136
```
137-
phpunit tests/SqliteCommandTest.php
138-
phpunit tests/MysqlCommandTest.php
139-
phpunit tests/PostgresCommandTest.php
140-
phpunit tests/SqlServerCommandTest.php
137+
phpunit tests/SqliteDatabaseTest.php
138+
phpunit tests/MysqlDatabaseTest.php
139+
phpunit tests/PostgresDatabaseTest.php
140+
phpunit tests/SqlServerDatabaseTest.php
141141
```

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ and open the template in the editor.
2222
<testsuites>
2323
<testsuite name="Test Suite">
2424
<!--<directory>./tests/</directory>-->
25-
<file>./tests/SqliteCommandTest.php</file>
25+
<file>./tests/SqliteDatabaseTest.php</file>
2626
</testsuite>
2727
</testsuites>
2828

src/Commands/AbstractCommand.php renamed to src/Database/AbstractDatabase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php
22

3-
namespace ByJG\DbMigration\Commands;
3+
namespace ByJG\DbMigration\Database;
44

55
use ByJG\AnyDataset\DbDriverInterface;
66
use ByJG\DbMigration\Exception\DatabaseNotVersionedException;
77
use ByJG\DbMigration\Exception\OldVersionSchemaException;
88

9-
abstract class AbstractCommand implements CommandInterface
9+
abstract class AbstractDatabase implements DatabaseInterface
1010
{
1111
/**
1212
* @var DbDriverInterface

src/Commands/CommandInterface.php renamed to src/Database/DatabaseInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
namespace ByJG\DbMigration\Commands;
3+
namespace ByJG\DbMigration\Database;
44

55
use ByJG\Util\Uri;
66

7-
interface CommandInterface
7+
interface DatabaseInterface
88
{
99
public static function prepareEnvironment(Uri $dbDriver);
1010

src/Commands/DblibCommand.php renamed to src/Database/DblibDatabase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22

3-
namespace ByJG\DbMigration\Commands;
3+
namespace ByJG\DbMigration\Database;
44

55
use ByJG\AnyDataset\Factory;
66
use ByJG\Util\Uri;
77

8-
class DblibCommand extends AbstractCommand
8+
class DblibDatabase extends AbstractDatabase
99
{
1010

1111
public static function prepareEnvironment(Uri $uri)

src/Commands/MysqlCommand.php renamed to src/Database/MysqlDatabase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22

3-
namespace ByJG\DbMigration\Commands;
3+
namespace ByJG\DbMigration\Database;
44

55
use ByJG\AnyDataset\Factory;
66
use ByJG\Util\Uri;
77

8-
class MySqlCommand extends AbstractCommand
8+
class MySqlDatabase extends AbstractDatabase
99
{
1010

1111
public static function prepareEnvironment(Uri $uri)

src/Commands/PgsqlCommand.php renamed to src/Database/PgsqlDatabase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22

3-
namespace ByJG\DbMigration\Commands;
3+
namespace ByJG\DbMigration\Database;
44

55
use ByJG\AnyDataset\Factory;
66
use ByJG\Util\Uri;
77

8-
class PgsqlCommand extends AbstractCommand
8+
class PgsqlDatabase extends AbstractDatabase
99
{
1010

1111
public static function prepareEnvironment(Uri $uri)

src/Commands/SqliteCommand.php renamed to src/Database/SqliteDatabase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
namespace ByJG\DbMigration\Commands;
3+
namespace ByJG\DbMigration\Database;
44

55
use ByJG\Util\Uri;
66

7-
class SqliteCommand extends AbstractCommand
7+
class SqliteDatabase extends AbstractDatabase
88
{
99

1010
public static function prepareEnvironment(Uri $uri)

src/Migration.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use ByJG\AnyDataset\DbDriverInterface;
66
use ByJG\AnyDataset\Factory;
7-
use ByJG\DbMigration\Commands\CommandInterface;
7+
use ByJG\DbMigration\Database\DatabaseInterface;
88
use ByJG\DbMigration\Exception\DatabaseIsIncompleteException;
99
use ByJG\Util\Uri;
1010

@@ -26,7 +26,7 @@ class Migration
2626
protected $dbDriver;
2727

2828
/**
29-
* @var CommandInterface
29+
* @var DatabaseInterface
3030
*/
3131
protected $_dbCommand;
3232

@@ -63,20 +63,20 @@ public function getDbDriver()
6363
}
6464

6565
/**
66-
* @return CommandInterface
66+
* @return DatabaseInterface
6767
*/
6868
public function getDbCommand()
6969
{
7070
if (is_null($this->_dbCommand)) {
71-
$class = $this->getCommandClassName();
71+
$class = $this->getDatabaseClassName();
7272
$this->_dbCommand = new $class($this->getDbDriver());
7373
}
7474
return $this->_dbCommand;
7575
}
7676

77-
protected function getCommandClassName()
77+
protected function getDatabaseClassName()
7878
{
79-
return "\\ByJG\\DbMigration\\Commands\\" . ucfirst($this->uri->getScheme()) . "Command";
79+
return "\\ByJG\\DbMigration\\Database\\" . ucfirst($this->uri->getScheme()) . "Database";
8080
}
8181

8282
/**
@@ -134,7 +134,7 @@ public function getMigrationSql($version, $increment)
134134
*/
135135
public function prepareEnvironment()
136136
{
137-
$class = $this->getCommandClassName();
137+
$class = $this->getDatabaseClassName();
138138
$class::prepareEnvironment($this->uri);
139139
}
140140

0 commit comments

Comments
 (0)