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

DeleteProject   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 15
dl 0
loc 55
ccs 0
cts 33
cp 0
rs 10
c 0
b 0
f 0
wmc 8

7 Methods

Rating   Name   Duplication   Size   Complexity  
A getUri() 0 3 1
A __construct() 0 3 1
A getMethod() 0 3 1
A transformResponseBody() 0 4 2
A getBody() 0 3 1
A getQueryOptionsResolver() 0 9 1
A getExtraHeaders() 0 3 1
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