AgentStatus   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
eloc 4
c 2
b 0
f 1
dl 0
loc 8
rs 10
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A setBody() 0 5 3
1
<?php
2
3
namespace Manticoresearch\Endpoints\Nodes;
4
5
use Manticoresearch\Endpoints\EmulateBySql;
6
7
class AgentStatus extends EmulateBySql
8
{
9
10
    public function setBody($params = null)
11
    {
12
        return parent::setBody(['query' => 'SHOW AGENT ' .
13
            (isset($params['agent']) ? $params['agent'] . "'" : '') . ' STATUS ' .
14
            (isset($params['pattern']) ? " LIKE '" . $params['pattern'] . "'" : '')]);
15
    }
16
}
17