AgentStatus::setBody()   A
last analyzed

Complexity

Conditions 3
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
cc 3
eloc 3
c 2
b 0
f 1
nc 1
nop 1
dl 0
loc 5
rs 10
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