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 — master ( 2de795...ddc223 )
by Samuel
03:58
created

HTTPRequestFactory::get()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
1
<?php declare(strict_types=1);
2
/**
3
 * @license MIT
4
 * @author Samuel Adeshina <[email protected]>
5
 *
6
 * This file is part of the EmmetBlue project, please read the license document
7
 * available in the root level of the project
8
 */
9
namespace EmmetBlue\Core\Factory;
10
11
use Requests;
12
13
/**
14
 * Class HTTPRequestFactory.
15
 *
16
 * @author Samuel Adeshina <[email protected]>
17
 *
18
 * @since v0.0.1 08/06/2016 14:20
19
 */
20
class HTTPRequestFactory
21
{
22
	private static $headers;
23
24
	public static function bootstrap()
25
	{
26
		$configJson = file_get_contents("bin/configs/http-headers-config.json");
27
28
        $this->headers = json_decode($configJson);
0 ignored issues
show
Bug introduced by
The variable $this does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
29
	}
30
31
	public static function get($url, $extraHeaders = [])
32
	{
33
		self::bootstrap();
34
		
35
		return Requests::get($url, array_merge($this->headers, $extraHeaders));
0 ignored issues
show
Bug introduced by
The variable $this does not exist. Did you forget to declare it?

This check marks access to variables or properties that have not been declared yet. While PHP has no explicit notion of declaring a variable, accessing it before a value is assigned to it is most likely a bug.

Loading history...
36
	}
37
}