Conditions | 3 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
42 | 9 | protected function createWalker(ReadCommandInterface $query, ?int $limit, ?int $page): Walker |
|
43 | { |
||
44 | 9 | $walker = new Walker($query, $limit, $page); |
|
45 | |||
46 | if ( |
||
47 | 9 | !$this->repository->metadata()->isCompositePrimaryKey() |
|
48 | 9 | && KeyWalkStrategy::supports($query, $page, $this->repository->metadata()->primary['attributes'][0]) |
|
49 | ) { |
||
50 | 7 | $walker->setStrategy(new KeyWalkStrategy(new MapperPrimaryKey($this->repository->mapper()))); |
|
51 | } |
||
52 | |||
53 | 9 | return $walker; |
|
54 | } |
||
56 |