HEAD   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
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 22
ccs 4
cts 4
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getType() 0 4 1
A hasBody() 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\AnnotationReader\AbstractAnnotation;
12
13
/**
14
 * Defines an HTTP HEAD request type to a REST path relative to base URL.
15
 *
16
 * @author Nate Brunette <[email protected]>
17
 *
18
 * @Annotation
19
 * @Target({"CLASS", "METHOD"})
20
 */
21
class HEAD extends AbstractAnnotation implements HttpRequest
22
{
23
    /**
24
     * Returns the type of the annotation (get, post, put, etc)
25
     *
26
     * @return string
27
     */
28 1
    public function getType(): string
29
    {
30 1
        return 'head';
31
    }
32
33
    /**
34
     * Returns true if the request type contains a body
35
     *
36
     * @return bool
37
     */
38 1
    public function hasBody(): bool
39
    {
40 1
        return false;
41
    }
42
}
43