ZoneInfoTest   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 5
dl 0
loc 50
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getRequest() 0 3 1
A getHeaders() 0 6 1
A getUrl() 0 3 1
A getFields() 0 3 1
A getRequestType() 0 3 1
1
<?php declare(strict_types = 1);
2
/**
3
 *
4
 * Copyright (C) 2018  Ross Mitchell
5
 *
6
 * This file is part of RossMitchell/UpdateCloudFlare.
7
 *
8
 * RossMitchell/UpdateCloudFlare is free software: you can redistribute
9
 * it and/or modify it under the terms of the GNU General Public License
10
 * as published by the Free Software Foundation, either version 3 of the
11
 * License, or (at your option) any later version.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
 * GNU General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU General Public License
19
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
 */
21
22
namespace RossMitchell\UpdateCloudFlare\Tests\Requests;
23
24
use RossMitchell\UpdateCloudFlare\Requests\ZoneInfo;
25
26
/**
27
 * Class ZoneInfoTest
28
 * @testdox RossMitchell\UpdateCloudFlare\Requests\ZoneInfo
29
 * @package RossMitchell\UpdateCloudFlare\Tests\Requests
30
 */
31
class ZoneInfoTest extends AbstractRequest
32
{
33
    /**
34
     * @Inject
35
     * @var ZoneInfo
36
     */
37
    private $zoneInfo;
38
39
    /**
40
     * @return mixed
41
     */
42
    public function getRequest()
43
    {
44
        return $this->zoneInfo;
45
    }
46
47
    /**
48
     * @return array
49
     */
50
    public function getHeaders(): array
51
    {
52
        return [
53
            'X-Auth-Email: [email protected]',
54
            'X-Auth-Key: 123456789',
55
            'Content-Type: application/json',
56
        ];
57
    }
58
59
    /**
60
     * @return string
61
     */
62
    public function getRequestType(): string
63
    {
64
        return 'GET';
65
    }
66
67
    /**
68
     * @return array
69
     */
70
    public function getFields(): array
71
    {
72
        return [];
73
    }
74
75
    /**
76
     * @return string
77
     */
78
    public function getUrl(): string
79
    {
80
        return 'https://api.cloudflare.com/client/v4/zones?name=example.com';
81
    }
82
}
83