Passed
Push — master ( 4bc399...bccef6 )
by Alexander
13:25
created

CommentRepository::getSort()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Blog\Comment;
6
7
use Cycle\ORM\Select;
8
use Yiisoft\Data\Reader\Sort;
9
10
final class CommentRepository extends Select\Repository
11
{
12
    public function getReader(): CommentFeedReader
13
    {
14
        return (new CommentFeedReader($this->select()))
15
            ->withSort($this->getSort());
16
    }
17
18
    private function getSort(): Sort
19
    {
20
        return (new Sort([]))->withOrder(['id' => 'asc']);
21
    }
22
}
23