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
Push — develop ( b5e3c2...7799bc )
by
unknown
15s
created

Branches   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 45
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getList() 0 10 1
A get() 0 10 1
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\Package\Repositories;
10
11
use Joomla\Github\AbstractPackage;
12
13
/**
14
 * GitHub API Repositories Branches class for the Joomla Framework.
15
 *
16
 * @documentation https://developer.github.com/v3/repos/branches
17
 *
18
 * @since  1.4.0
19
 */
20
class Branches extends AbstractPackage
21
{
22
	/**
23
	 * List Branches.
24
	 *
25
	 * @param   string  $owner  Repository owner.
26
	 * @param   string  $repo   Repository name.
27
	 *
28
	 * @return  object
29
	 *
30
	 * @since   1.4.0
31
	 */
32
	public function getList($owner, $repo)
33
	{
34
		// Build the request path.
35
		$path = "/repos/$owner/$repo/branches";
36
37
		// Send the request.
38
		return $this->processResponse(
39
			$this->client->get($this->fetchUrl($path))
40
		);
41
	}
42
43
	/**
44
	 * Get Branch.
45
	 *
46
	 * @param   string  $owner   Repository owner.
47
	 * @param   string  $repo    Repository name.
48
	 * @param   string  $branch  Branch name.
49
	 *
50
	 * @return  object
51
	 *
52
	 * @since   1.4.0
53
	 */
54
	public function get($owner, $repo, $branch)
55
	{
56
		// Build the request path.
57
		$path = "/repos/$owner/$repo/branches/$branch";
58
59
		// Send the request.
60
		return $this->processResponse(
61
			$this->client->get($this->fetchUrl($path))
62
		);
63
	}
64
}
65