Passed
Push — master ( ac5429...699403 )
by Ross
02:06
created

IfConfig   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
dl 0
loc 42
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getHeaders() 0 3 1
A getUrl() 0 3 1
A getRequestType() 0 3 1
A getFields() 0 3 1
1
<?php
2
declare(strict_types=1);
3
/**
4
 *
5
 * Copyright (C) 2018  Ross Mitchell
6
 *
7
 * This file is part of RossMitchell/UpdateCloudFlare.
8
 *
9
 * RossMitchell/UpdateCloudFlare is free software: you can redistribute
10
 * it and/or modify it under the terms of the GNU General Public License
11
 * as published by the Free Software Foundation, either version 3 of the
12
 * License, or (at your option) any later version.
13
 *
14
 * This program is distributed in the hope that it will be useful,
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
 * GNU General Public License for more details.
18
 *
19
 * You should have received a copy of the GNU General Public License
20
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
21
 */
22
23
namespace RossMitchell\UpdateCloudFlare\Requests;
24
25
use RossMitchell\UpdateCloudFlare\Interfaces\RequestInterface;
26
27
/**
28
 * Class IfConfig
29
 * @package RossMitchell\UpdateCloudFlare\Data
30
 */
31
class IfConfig implements RequestInterface
32
{
33
34
    /**
35
     * They type of request that is going to be made
36
     *
37
     * @return string
38
     */
39
    public function getRequestType(): string
40
    {
41
        return 'GET';
42
    }
43
44
    /**
45
     * If the request needs data to be sent though return it here. If not return an empty array
46
     *
47
     * @return array
48
     */
49
    public function getFields(): array
50
    {
51
        return [];
52
    }
53
54
    /**
55
     * Return the URL that the request should be made to
56
     *
57
     * @return string
58
     */
59
    public function getUrl(): string
60
    {
61
        return 'http://ifconfig.co';
62
    }
63
64
65
    /**
66
     * If headers need to be sent through then they can be returned with this method. If not return an empty array
67
     *
68
     * @return array
69
     */
70
    public function getHeaders(): array
71
    {
72
        return [];
73
    }
74
}
75