LinodeResourceCommand::handleResponse()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 2
1
<?php
2
3
namespace Linode\Api\Api;
4
5
use Psr\Http\Message\ResponseInterface;
6
use Zurbaev\ApiClient\Commands\ResourceCommand;
7
use Zurbaev\ApiClient\Contracts\ApiResourceInterface;
8
use Zurbaev\ApiClient\Traits\Commands\NotSupportingResourceClassTrait;
9
10
abstract class LinodeResourceCommand extends ResourceCommand
11
{
12
    use NotSupportingResourceClassTrait;
13
14
    /**
15
     * Handle command response.
16
     *
17
     * @param ResponseInterface    $response
18
     * @param ApiResourceInterface $owner
19
     *
20
     * @return bool
21
     */
22
    public function handleResponse(ResponseInterface $response, ApiResourceInterface $owner)
23
    {
24
        return $response->getStatusCode() === 200;
25
    }
26
}
27