Passed
Push — master ( 17481c...d9f781 )
by Reyo
02:57
created

DeleteProject::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the timechimp bundle package.
7
 * (c) Connect Holland.
8
 */
9
10
namespace ConnectHolland\TimechimpBundle\Api\Endpoint;
11
12
class DeleteProject extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7Endpoint
13
{
14
    /**
15
     * @param array $queryParameters {
16
     *
17
     *     @var int $id
18
     * }
19
     */
20
    public function __construct(array $queryParameters = [])
21
    {
22
        $this->queryParameters = $queryParameters;
23
    }
24
25
    use \Jane\OpenApiRuntime\Client\Psr7EndpointTrait;
26
27
    public function getMethod(): string
28
    {
29
        return 'DELETE';
30
    }
31
32
    public function getUri(): string
33
    {
34
        return '/v1/projects';
35
    }
36
37
    public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, $streamFactory = null): array
38
    {
39
        return [[], null];
40
    }
41
42
    public function getExtraHeaders(): array
43
    {
44
        return ['Accept' => ['application/json']];
45
    }
46
47
    protected function getQueryOptionsResolver(): \Symfony\Component\OptionsResolver\OptionsResolver
48
    {
49
        $optionsResolver = parent::getQueryOptionsResolver();
50
        $optionsResolver->setDefined(['id']);
51
        $optionsResolver->setRequired(['id']);
52
        $optionsResolver->setDefaults([]);
53
        $optionsResolver->setAllowedTypes('id', ['int']);
54
55
        return $optionsResolver;
56
    }
57
58
    /**
59
     * {@inheritdoc}
60
     *
61
     * @return null
62
     */
63
    protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType)
64
    {
65
        if (200 === $status) {
66
            return null;
67
        }
68
    }
69
}
70