DeleteStreamResponseInspector   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 18
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A inspect() 0 12 2
1
<?php
2
3
namespace RayRutjes\GetEventStore\Client\Http;
4
5
use Psr\Http\Message\ResponseInterface;
6
7
class DeleteStreamResponseInspector extends AbstractResponseInspector
8
{
9
    /**
10
     * @param ResponseInterface $response
11
     */
12
    public function inspect(ResponseInterface $response)
13
    {
14
        $this->filterCommonErrors($response);
15
        switch ($response->getStatusCode()) {
16
            case 204:
17
                // OK.
18
                break;
19
            default:
20
                // KO.
21
                throw $this->newBadRequestException($response);
22
        }
23
    }
24
}
25