Percolate   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 6
dl 0
loc 9
rs 10
c 1
b 0
f 1
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 3
1
<?php
2
3
4
namespace Manticoresearch\Query;
5
6
use Manticoresearch\Query;
7
8
class Percolate extends Query
9
{
10
    public function __construct($docs)
11
    {
12
        $this->params['percolate'] = [];
13
        if (isset($docs[0]) && (is_array($docs[0]))) {
14
            $this->params['percolate'] ['documents'] = $docs;
15
        } else {
16
            $this->params['percolate'] ['document'] = $docs;
17
        }
18
    }
19
}
20