Body   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 14
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A converterType() 0 4 1
1
<?php
2
/*
3
 * Copyright (c) Nate Brunette.
4
 * Distributed under the MIT License (http://opensource.org/licenses/MIT)
5
 */
6
7
declare(strict_types=1);
8
9
namespace Tebru\Retrofit\Annotation;
10
11
use Tebru\Retrofit\RequestBodyConverter;
12
13
/**
14
 * Define the body of the HTTP request.
15
 *
16
 * This annotation may only be used on requests that are sending json. The parameter
17
 * this annotation maps to must be able to be converted to json.
18
 *
19
 * @author Nate Brunette <[email protected]>
20
 *
21
 * @Annotation
22
 * @Target({"CLASS", "METHOD"})
23
 */
24
class Body extends ParameterAnnotation
25
{
26
    /**
27
     * Return the converter interface class
28
     *
29
     * Can be one of RequestBodyConverter, ResponseBodyConverter, or StringConverter
30
     *
31
     * @return string
32
     */
33 3
    public function converterType(): ?string
34
    {
35 3
        return RequestBodyConverter::class;
36
    }
37
}
38