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 ( 42c65a...a98f71 )
by
unknown
07:18
created

SessionFactory   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Test Coverage

Coverage 0%

Importance

Changes 6
Bugs 2 Features 2
Metric Value
wmc 2
c 6
b 2
f 2
lcom 0
cbo 4
dl 0
loc 41
ccs 0
cts 9
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A createSession() 0 9 1
A getRepositories() 0 14 1
1
<?php
2
namespace Dkd\PhpCmis;
3
4
/**
5
 * This file is part of php-cmis-lib.
6
 *
7
 * (c) Sascha Egerer <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
use Dkd\PhpCmis\Bindings\CmisBindingsHelper;
14
use Doctrine\Common\Cache\Cache;
15
16
/**
17
 * Class SessionFactory
18
 *
19
 * @author Sascha Egerer <[email protected]>
20
 */
21
class SessionFactory implements SessionFactoryInterface
22
{
23
    /**
24
     * @param array $parameters
25
     * @param ObjectFactoryInterface|null $objectFactory
26
     * @param Cache|null $cache
27
     * @param Cache|null $typeDefinitionCache
28
     * @return Session
29
     */
30
    public function createSession(
31
        array $parameters,
32
        ObjectFactoryInterface $objectFactory = null,
33
        Cache $cache = null,
34
        Cache $typeDefinitionCache = null
35
    ) {
36
        $session = new Session($parameters, $objectFactory, $cache, $typeDefinitionCache);
37
        return $session;
38
    }
39
40
    /**
41
     * @param array $parameters
42
     * @param ObjectFactoryInterface|null $objectFactory
43
     * @param Cache|null $cache
44
     * @param Cache|null $typeDefinitionCache
45
     * @return Data\RepositoryInfoInterface[]
46
     */
47
    public function getRepositories(
48
        array $parameters,
49
        ObjectFactoryInterface $objectFactory = null,
50
        Cache $cache = null,
51
        Cache $typeDefinitionCache = null
52
    ) {
53
        $cmisBindingsHelper = new CmisBindingsHelper();
54
        $binding = $cmisBindingsHelper->createBinding(
55
            $parameters,
56
            $typeDefinitionCache
57
        );
58
59
        return $binding->getRepositoryService()->getRepositoryInfos();
60
    }
61
}
62