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 ( a2bb11...f0f593 )
by Samuel
03:12
created

ElasticSearchClientFactory::getClient()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
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 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
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
/**
12
 * Class DatabaseConnectionFactory.
13
 * Instantiates a new instance of ConnectableInterface
14
 *
15
 * @author Samuel Adeshina <[email protected]>
16
 *
17
 * @since v0.0.1 08/06/2016 14:20
18
 */
19
class ElasticSearchClientFactory
20
{
21
	private static $clientObject;
22
23
	public static function bootstrap()
24
	{
25
		$configJson = file_get_contents("bin/configs/elasticsearch-config.json");
26
27
        $config = json_decode($configJson);
28
29
        self::$clientObject = $config;
30
	}
31
32
	public static function getClient()
33
	{
34
		self::bootstrap();
35
		return self::$clientObject;
36
	}
37
}