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.
Completed
Pull Request — develop (#322)
by
unknown
01:59
created

Http   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 46
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 17 3
1
<?php
2
/**
3
 * Part of the Joomla Framework Github Package
4
 *
5
 * @copyright  Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
6
 * @license    GNU General Public License version 2 or later; see LICENSE
7
 */
8
9
namespace Joomla\Github;
10
11
use Joomla\Http\Http as BaseHttp;
12
use Joomla\Http\TransportInterface;
13
14
/**
15
 * HTTP client class for connecting to a GitHub instance.
16
 *
17
 * @since  1.0
18
 */
19
class Http extends BaseHttp
20
{
21
	/**
22
	 * @const  integer  Use no authentication for HTTP connections.
23
	 * @since  1.0
24
	 */
25
	const AUTHENTICATION_NONE = 0;
26
27
	/**
28
	 * @const  integer  Use basic authentication for HTTP connections.
29
	 * @since  1.0
30
	 */
31
	const AUTHENTICATION_BASIC = 1;
32
33
	/**
34
	 * @const  integer  Use OAuth authentication for HTTP connections.
35
	 * @since  1.0
36
	 */
37
	const AUTHENTICATION_OAUTH = 2;
38
39
	/**
40
	 * Constructor.
41
	 *
42
	 * @param   array               $options    Client options array.
43
	 * @param   TransportInterface  $transport  The HTTP transport object.
44
	 *
45
	 * @since   1.0
46
	 */
47
	public function __construct($options = array(), TransportInterface $transport = null)
48
	{
49
		// Call the JHttp constructor to setup the object.
50
		parent::__construct($options, $transport);
51
52
		// Make sure the user agent string is defined.
53
		if (!isset($this->options['userAgent']))
54
		{
55
			$this->options['userAgent'] = 'JGitHub/2.0';
56
		}
57
58
		// Set the default timeout to 120 seconds.
59
		if (!isset($this->options['timeout']))
60
		{
61
			$this->options['timeout'] = 120;
62
		}
63
	}
64
}
65