Passed
Branch master (203e41)
by Nate
02:00
created

HttpRequest::__construct()   B

Complexity

Conditions 5
Paths 6

Size

Total Lines 37
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 37
c 0
b 0
f 0
rs 8.439
cc 5
eloc 17
nc 6
nop 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;
12
13
/**
14
 * Interface for the different http request annotations (e.g. @GET, @POST)
15
 *
16
 * @author Nate Brunette <[email protected]>
17
 */
18
interface HttpRequest
19
{
20
    /**
21
     * Returns the type of the annotation (get, post, put, etc)
22
     *
23
     * @return string
24
     */
25
    public function getType(): string;
26
27
    /**
28
     * Returns true if the request type contains a body
29
     *
30
     * @return bool
31
     */
32
    public function hasBody(): bool;
33
34
    /**
35
     * Get the url value
36
     *
37
     * @return mixed
38
     */
39
    public function getValue();
40
}
41