Completed
Push — 1.x ( 747b4c...b6bf38 )
by Adrian
04:52 queued 11s
created

PercolateResultHit   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 5
dl 0
loc 12
rs 10
c 1
b 0
f 1
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getDocSlots() 0 3 1
A getDocsMatched() 0 5 1
1
<?php
2
3
4
namespace Manticoresearch\Results;
5
6
use Manticoresearch\ResultHit;
7
8
class PercolateResultHit extends ResultHit
9
{
10
    public function getDocSlots()
11
    {
12
        return $this->data['fields']['_percolator_document_slot'];
13
    }
14
15
    public function getDocsMatched($docs)
16
    {
17
        return array_map(function ($v) use ($docs) {
18
            return $docs[$v - 1];
19
        }, $this->data['fields']['_percolator_document_slot']);
20
    }
21
}
22