RawBodyResponseTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 13
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A handleResponse() 0 3 1
1
<?php
2
3
namespace Zurbaev\ApiClient\Traits\Commands;
4
5
use Psr\Http\Message\ResponseInterface;
6
use Zurbaev\ApiClient\Contracts\ApiResourceInterface;
7
8
trait RawBodyResponseTrait
9
{
10
    /**
11
     * Handle command response.
12
     *
13
     * @param ResponseInterface    $response
14
     * @param ApiResourceInterface $owner
15
     *
16
     * @return string
17
     */
18
    public function handleResponse(ResponseInterface $response, ApiResourceInterface $owner)
0 ignored issues
show
Unused Code introduced by
The parameter $owner is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

18
    public function handleResponse(ResponseInterface $response, /** @scrutinizer ignore-unused */ ApiResourceInterface $owner)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
19
    {
20
        return (string) $response->getBody();
21
    }
22
}
23