Skip to content

Commit 3f322e0

Browse files
authored
Update cycle-related code
1 parent 34511ce commit 3f322e0

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/Blog/PostRepository.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use Cycle\ORM\ORMInterface;
88
use Cycle\ORM\Select;
99
use Cycle\ORM\Transaction;
10-
use Yiisoft\Yii\Cycle\DataReader\SelectDataReader;
10+
use Yiisoft\Yii\Cycle\Data\Reader\EntityReader;
1111

1212
final class PostRepository extends Select\Repository
1313
{
@@ -19,9 +19,9 @@ public function __construct(Select $select, ORMInterface $orm)
1919
parent::__construct($select);
2020
}
2121

22-
public function findAll(array $scope = [], array $orderBy = []): SelectDataReader
22+
public function findAll(array $scope = [], array $orderBy = []): EntityReader
2323
{
24-
return new SelectDataReader(
24+
return new EntityReader(
2525
$this->select()->where($scope)->orderBy($orderBy)
2626
);
2727
}

src/User/UserRepository.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Yiisoft\Auth\IdentityInterface;
1111
use Yiisoft\Auth\IdentityWithTokenRepositoryInterface;
1212
use Yiisoft\Data\Reader\Sort;
13-
use Yiisoft\Yii\Cycle\DataReader\SelectDataReader;
13+
use Yiisoft\Yii\Cycle\Data\Reader\EntityReader;
1414

1515
final class UserRepository extends Select\Repository implements IdentityWithTokenRepositoryInterface
1616
{
@@ -22,9 +22,9 @@ public function __construct(Select $select, ORMInterface $orm)
2222
parent::__construct($select);
2323
}
2424

25-
public function findAllOrderByLogin(): SelectDataReader
25+
public function findAllOrderByLogin(): EntityReader
2626
{
27-
return (new SelectDataReader($this->select()))
27+
return (new EntityReader($this->select()))
2828
->withSort(
2929
(new Sort(['login']))->withOrderString('login')
3030
);

0 commit comments

Comments
 (0)