Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
14 | 3 | public function items(ItemsEvent $event) |
|
15 | { |
||
16 | 3 | if (!$event->target instanceof Result) { |
|
17 | 1 | return; |
|
18 | } |
||
19 | |||
20 | 2 | $event->count = $event->target->count(); |
|
21 | 2 | $event->items = $event->target->take($event->getOffset(), $event->getLimit())->getIterator(); |
|
22 | |||
23 | 2 | $event->stopPropagation(); |
|
24 | 2 | } |
|
25 | |||
34 |