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   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
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