Completed
Push — master ( 0c606d...0489bb )
by Josh
18:01
created

OnlineMinifier   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getHttpClient() 0 9 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\Configurator\JavaScript;
9
10
use s9e\TextFormatter\Configurator\Helpers\Http;
11
12
abstract class OnlineMinifier extends Minifier
13
{
14
	/**
15
	* @var \s9e\TextFormatter\Configurator\Http\Client Client used to perform HTTP request
16
	*/
17
	public $client;
18
19
	/**
20
	* @var integer Timeout in seconds
21
	*/
22
	public $timeout = 10;
23
24
	/**
25
	* Return a cached instance of the HTTP client
26
	*
27
	* @return \s9e\TextFormatter\Configurator\Http\Client
28
	*/
29
	protected function getHttpClient()
30
	{
31
		if (!isset($this->client))
32
		{
33
			$this->client = Http::getClient();
0 ignored issues
show
Documentation Bug introduced by
It seems like \s9e\TextFormatter\Confi...lpers\Http::getClient() of type object<s9e\TextFormatter...pers\Http\Clients\Curl> or object<s9e\TextFormatter...rs\Http\Clients\Native> is incompatible with the declared type object<s9e\TextFormatter...nfigurator\Http\Client> of property $client.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
34
		}
35
36
		return $this->client;
37
	}
38
}