Config::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Gemz\HttpClient;
4
5
use Gemz\HttpClient\Contracts\Options;
6
7
class Config
8
{
9
    use Options;
10
11
    /**
12
     * @return Config
13
     */
14
    public static function make()
15
    {
16
        return new self();
17
    }
18
19
    /**
20
     * Config constructor
21
     */
22
    public function __construct()
23
    {
24
        $this->setDefaults();
25
    }
26
27
    /**
28
     * @return $this
29
     */
30
    protected function setDefaults(): self
31
    {
32
        $this->asJson();
33
34
        return $this;
35
    }
36
37
    /**
38
     * Config as array
39
     *
40
     * @return array<mixed>
41
     */
42
    public function toArray(): array
43
    {
44
        return $this->options;
45
    }
46
}
47