Skip to content

Commit

Permalink
Update interface implementation in providers
Browse files Browse the repository at this point in the history
The providers' RowInterfaceProvider and RowListInterfaceProvider have been updated to implement the QueryInterface instead of RowInterface and RowListInterface respectively. Also, the return type for the get method in RowInterfaceProvider is changed to QueryInterface.
  • Loading branch information
koriym committed Jun 11, 2024
1 parent 10781c6 commit c45e7c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/RowInterfaceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use Ray\Query\Exception\SqlFileNotFoundException;
use Throwable;

/** @implements ProviderInterface<RowInterface> */
/** @implements ProviderInterface<QueryInterface> */
final class RowInterfaceProvider implements ProviderInterface
{
/** @var InjectionPointInterface */
Expand All @@ -37,7 +37,7 @@ public function __construct(
$this->injector = $injector;
}

public function get(): SqlQueryRow
public function get(): QueryInterface
{
try {
$sql = ($this->finder)($this->ip->getParameter());
Expand Down
2 changes: 1 addition & 1 deletion src/RowListInterfaceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Ray\Di\ProviderInterface;
use Ray\Query\Exception\SqlFileNotFoundException;

/** @implements ProviderInterface<RowListInterface> */
/** @implements ProviderInterface<QueryInterface> */
final class RowListInterfaceProvider implements ProviderInterface
{
/** @var InjectionPointInterface */
Expand Down

0 comments on commit c45e7c8

Please sign in to comment.