GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

ClientHttp::cookie()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
namespace zServices\Miscellany;
3
4
use Goutte\Client as BaseClient;
5
6
/**
7
*
8
*/
9
class ClientHttp extends BaseClient
10
{
11
	/**
12
	 * Method request
13
	 * @var string
14
	 */
15
	protected $method;
16
17
	/**
18
	 * URL to Request
19
	 * @var string
20
	 */
21
	protected $url;
22
23
	/**
24
	 * Cookie string
25
	 * @var string
26
	 */
27
	protected $cookie;
28
29
	/**
30
	 * Response from request
31
	 * @var string
32
	 */
33
	protected $response;
34
35
	/**
36
	 * Request to URL
37
	 * @SuppressWarnings(PHPMD)
38
	 * @param  string  $method        
39
	 * @param  string  $url           
40
	 * @param  array   $parameters    
41
	 * @param  array   $files        
42
	 * @param  array   $server        
43
	 * @param  string  $content       
44
	 * @param  boolean $changeHistory 
45
	 * @return @instance
0 ignored issues
show
Documentation introduced by
The doc-type @instance could not be parsed: Unknown type name "@instance" at position 0. (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
46
	 */
47
	public function request($method, $url, array $parameters = array(), array $files = array(), array $server = array(), $content = null, $changeHistory = true)
48
	{
49
		$this->method = $method;
50
		$this->url = $url;
51
52
		return parent::request($this->method, $this->url, $parameters, $files, $server, $content, $changeHistory);
53
	}
54
55
	/**
56
	 * get headers from response
57
	 * @return string
58
	 */
59
	private function headers()
60
	{
61
		return $this->response->getHeaders();
0 ignored issues
show
Bug introduced by
The method getHeaders cannot be called on $this->response (of type string).

Methods can only be called on objects. This check looks for methods being called on variables that have been inferred to never be objects.

Loading history...
62
	}
63
64
	/**
65
	 * get cookie from response
66
	 * @return string
67
	 */
68
	public function cookie()
69
	{
70
		return $this->headers()['Set-Cookie'][0];
71
	}
72
}