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 ( f019a9...6afc29 )
by Christian
14:27
created

BackendManager::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 11
rs 9.4286
cc 1
eloc 7
nc 1
nop 2
1
<?php
2
3
/*
4
 * This file is part of the ni-ju-san CMS.
5
 *
6
 * (c) Christian Gripp <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Core23\ShariffBundle\Backend;
13
14
use GuzzleHttp\Client;
15
use Heise\Shariff\Backend\BackendManager as BaseBackendManager;
16
use Heise\Shariff\Backend\ServiceFactory;
17
use Heise\Shariff\CacheInterface;
18
19
class BackendManager extends BaseBackendManager
20
{
21
    /**
22
     * @var ServiceFactory
23
     */
24
    private $serviceFactory;
25
26
    /**
27
     * BackendManager constructor.
28
     *
29
     * @param CacheInterface $cache
30
     * @param array          $options
31
     */
32
    public function __construct(CacheInterface $cache, array $options)
33
    {
34
        $client = new Client();
35
        $this->serviceFactory = new ServiceFactory($client);
36
37
        $baseCacheKey = md5(json_encode($options));
38
        $services     = $this->serviceFactory->getServicesByName($options['services'], $options);
39
        $domain       = $options['domain'];
40
41
        parent::__construct($baseCacheKey, $cache, $client, $domain, $services);
42
    }
43
}
44