StatusRequest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 12
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 3 1
A info() 0 5 1
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