Curl   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 2
Bugs 1 Features 0
Metric Value
c 2
b 1
f 0
dl 0
loc 45
rs 10
wmc 8
lcom 1
cbo 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A me() 0 9 2
A head() 0 4 1
A get() 0 4 1
A post() 0 4 1
A put() 0 4 1
A delete() 0 4 1
A patch() 0 4 1
1
<?php namespace Algorit\Synchronizer\Request\Methods;
2
3
class Curl implements MethodInterface {
4
5
	protected static $instance;
6
7
	protected static function me()
8
	{
9
		if(static::$instance == false)
10
		{
11
			static::$instance = new CurlMethod;
12
		}
13
14
		return static::$instance;
15
	}
16
17
	public function head($url, $headers = array(), $options = array())
18
	{
19
		return static::me()->head($url, $headers, $options);
20
	}
21
22
	public function get($url, $headers = array(), $options = array())
23
	{
24
		return static::me()->get($url, $headers, $options);
25
	}
26
27
	public function post($url, $headers = array(), $data = array(), $options = array())
28
	{
29
		return static::me()->post($url, $headers, $data, $options);
30
	}
31
32
	public function put($url, $headers = array(), $data = array(), $options = array())
33
	{
34
		return static::me()->put($url, $headers, $data, $options);
35
	}
36
37
	public function delete($url, $headers = array(), $options = array())
38
	{
39
		return static::me()->delete($url, $headers, $options);
40
	}
41
42
	public function patch($url, $headers = array(), $options = array())
43
	{
44
		return static::me()->patch($url, $headers, $options);
45
	}
46
47
}
48