Completed
Push — master ( c6e3b5...fd2349 )
by Milan
15:04 queued 10s
created

Factory::createBodyFactory()   A

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 declare(strict_types=1);
2
3
namespace h4kuna\Ares;
4
5
use GuzzleHttp;
6
7
class Factory implements IFactory
8
{
9
10
	public function createDataProvider(): DataProvider
11
	{
12
		return new DataProvider($this);
13
	}
14
15
16
	public function createData(array $data): Data
17
	{
18
		return new Data($data);
19
	}
20
21
22
	public function createGuzzleClient(array $options = [CURLOPT_CONNECTTIMEOUT => 30]): GuzzleHttp\Client
23
	{
24
		return new GuzzleHttp\Client(['curl' => $options, 'headers' => ['X-Powered-By' => 'h4kuna/ares']]);
25
	}
26
27
28
	public function createBodyFactory(): BodyFactory
29
	{
30
		return new BodyFactory();
31
	}
32
33
}
34