ArrayBodyTransformer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A transform() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the zibios/wrike-php-library package.
7
 *
8
 * (c) Zbigniew Ślązak
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Zibios\WrikePhpLibrary\Transformer\Response\Psr;
15
16
use Psr\Http\Message\ResponseInterface;
17
18
/**
19
 * Array Body Transformer for PSR Response from HTTP Client.
20
 */
21
class ArrayBodyTransformer extends AbstractPsrResponseTransformer
22
{
23
    /**
24
     * @param ResponseInterface $response
25
     * @param string            $resourceClass
26
     *
27
     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
28
     *
29
     * @throws \InvalidArgumentException
30
     * @throws \RuntimeException
31
     *
32
     * @return array
33
     */
34 80
    public function transform(ResponseInterface $response, $resourceClass): array
35
    {
36 80
        return $this->transformToArrayBody($response);
37
    }
38
}
39