StatusRequest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace CCT\Kong\Http\Request;
4
5
use CCT\Kong\Config;
6
use CCT\Kong\Http\Request;
7
use CCT\Kong\Http\ResponseInterface;
8
use JMS\Serializer\SerializationContext;
9
10
class StatusRequest extends Request
11
{
12
    protected function setUp()
13
    {
14
        $this->config->set(Config::URI_PREFIX, '/status');
15
    }
16
17
    public function info(): ResponseInterface
18
    {
19
        $this->config->set('serialization_context', SerializationContext::create()->setGroups('read'));
20
21
        return parent::requestGet($this->getUri(), null);
0 ignored issues
show
Bug Best Practice introduced by
The expression return parent::requestGet($this->getUri(), null) could return the type Symfony\Component\HttpFoundation\Response which is incompatible with the type-hinted return CCT\Kong\Http\ResponseInterface. Consider adding an additional type-check to rule them out.
Loading history...
22
    }
23
}
24