Skip to content

Commit

Permalink
fix(connection): modify parameter type on manager
Browse files Browse the repository at this point in the history
  • Loading branch information
ezandonai committed Sep 14, 2022
1 parent 5b19969 commit 01d79be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/Connection/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ class Manager
* pure PHP. After adding a connection into the Manager you are ready to
* persist and query your models.
*
* @param IlluminateContainer $connection connection instance to be used in database interactions
* @param Connection $connection connection instance to be used in database interactions
*/
public function setConnection(IlluminateContainer $connection): bool
public function setConnection(Connection $connection): bool
{
$this->init();
$this->container->instance(IlluminateContainer::class, $this->connection);
$this->container->instance(Connection::class, $this->connection);

$this->connection = $connection;

Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Connection/ManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function testShouldAddAndGetConnection(): void
{
// Set
$manager = new Manager();
$connection = m::mock(IlluminateContainer::class);
$connection = m::mock(Connection::class);
$client = m::mock(Client::class);

// Expectations
Expand Down

0 comments on commit 01d79be

Please sign in to comment.