ArrayResponseTransformer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 13
ccs 0
cts 3
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A transform() 0 5 1
1
<?php
2
3
namespace mb24dev\AmoCRM\ResponseTransformer;
4
5
use Psr\Http\Message\ResponseInterface;
6
7
/**
8
 * Class ArrayJsonTransformer
9
 *
10
 * @package mb24dev\AmoCRM\ResponseTransformer
11
 */
12
class ArrayResponseTransformer implements ResponseTransformerInterface
13
{
14
    /**
15
     * @param ResponseInterface $response
16
     * @return string
17
     */
18
    public function transform(ResponseInterface $response)
19
    {
20
        $response->getBody()->rewind();
21
        return json_decode($response->getBody()->getContents(), true);
22
    }
23
24
}
25