HeaderMap   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A converterType() 0 4 1
A allowMultiple() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Tebru\Retrofit\Annotation;
6
7
use Tebru\Retrofit\StringConverter;
8
9
/**
10
 * Represents a collection of @Header annotations
11
 *
12
 * The default value specifies the variable name in the method signature.
13
 *
14
 * Any iterable may be passed as an argument. Keys of the map will be the header
15
 * names, and the values will be handled exactly the same as as @Header.
16
 *
17
 * @author Nate Brunette <[email protected]>
18
 *
19
 * @Annotation
20
 * @Target({"CLASS", "METHOD"})
21
 */
22
class HeaderMap extends ParameterAnnotation
23
{
24
    /**
25
     * Return the converter interface class
26
     *
27
     * Can be one of RequestBodyConverter, ResponseBodyConverter, or StringConverter
28
     *
29
     * @return string
30
     */
31 4
    public function converterType(): ?string
32
    {
33 4
        return StringConverter::class;
34
    }
35
36
    /**
37
     * Returns true if multiple annotations of this type are allowed
38
     *
39
     * @return bool
40
     */
41 4
    public function allowMultiple(): bool
42
    {
43 4
        return true;
44
    }
45
}
46