Status::httpMethod()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
declare(strict_types=1);
3
4
namespace Ytake\KsqlClient\Query;
5
6
use Fig\Http\Message\RequestMethodInterface;
7
use Psr\Http\Message\ResponseInterface;
8
use Ytake\KsqlClient\Result\AbstractResult;
9
use Ytake\KsqlClient\Result\StatusResult;
10
11
/**
12
 * Class Status
13
 */
14
class Status implements QueryInterface
15
{
16
    /**
17
     * {@inheritdoc}
18
     */
19
    public function httpMethod(): string
20
    {
21
        return RequestMethodInterface::METHOD_GET;
22
    }
23
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function uri(): string
28
    {
29
        return 'status';
30
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35
    public function toArray(): array
36
    {
37
        return [];
38
    }
39
40
    /**
41
     * @param ResponseInterface $response
42
     *
43
     * @return AbstractResult
44
     */
45
    public function queryResult(ResponseInterface $response): AbstractResult
46
    {
47
        return new StatusResult($response);
48
    }
49
}
50