Completed
Push — master ( 5feeae...0d739f )
by Josh
18:19 queued 12:34
created

Http   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 12
ccs 2
cts 2
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getClient() 0 4 2
1
<?php
2
3
/**
4
* @package   s9e\TextFormatter
5
* @copyright Copyright (c) 2010-2016 The s9e Authors
6
* @license   http://www.opensource.org/licenses/mit-license.php The MIT License
7
*/
8
namespace s9e\TextFormatter\Utils;
9
10
use s9e\TextFormatter\Utils\Http\Clients\Curl;
11
use s9e\TextFormatter\Utils\Http\Clients\Native;
12
13
abstract class Http
14
{
15
	/**
16
	* Instantiate and return an HTTP client
17
	*
18
	* @return Http\Client
19
	*/
20 1
	public static function getClient()
21
	{
22 1
		return (extension_loaded('curl')) ? new Curl : new Native;
23
	}
24
}