Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/Configuration/DriverMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@ public function registerMapper(Mapper $mapper)
*/
public function map($configuration)
{
foreach ($this->mappers as $mapper)
if ($mapper->isAppropriateFor($configuration))
foreach ($this->mappers as $mapper) {
/** @type Mapper $mapper */
if ($mapper->isAppropriateFor($configuration)) {
return $mapper->map($configuration);
}
}

throw new Exception("Driver {$configuration['driver']} unsupported by package at this time.");
}
Expand Down
3 changes: 3 additions & 0 deletions tests/Configuration/SqlMapperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

class SqlMapperTest extends \PHPUnit_Framework_TestCase
{
/**
* @type SqlMapper
*/
private $sqlMapper;

public function setUp()
Expand Down
3 changes: 3 additions & 0 deletions tests/Configuration/SqliteMapperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

class SqliteMapperTest extends \PHPUnit_Framework_TestCase
{
/**
* @type SqliteMapper
*/
private $sqlMapper;

public function setUp()
Expand Down