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.

SessionFactory::getRepositories()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 14

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 14
ccs 0
cts 5
cp 0
rs 9.7998
c 0
b 0
f 0
cc 1
nc 1
nop 4
crap 2
1
<?php
2
namespace Dkd\PhpCmis;
3
4
/*
5
 * This file is part of php-cmis-client.
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
class SessionFactory implements SessionFactoryInterface
20
{
21
    /**
22
     * @param array $parameters
23
     * @param ObjectFactoryInterface|null $objectFactory
24
     * @param Cache|null $cache
25
     * @param Cache|null $typeDefinitionCache
26
     * @return Session
27
     */
28
    public function createSession(
29
        array $parameters,
30
        ObjectFactoryInterface $objectFactory = null,
31
        Cache $cache = null,
32
        Cache $typeDefinitionCache = null
33
    ) {
34
        $session = new Session($parameters, $objectFactory, $cache, $typeDefinitionCache);
35
        return $session;
36
    }
37
38
    /**
39
     * @param array $parameters
40
     * @param ObjectFactoryInterface|null $objectFactory
41
     * @param Cache|null $cache
42
     * @param Cache|null $typeDefinitionCache
43
     * @return Data\RepositoryInfoInterface[]
44
     */
45
    public function getRepositories(
46
        array $parameters,
47
        ObjectFactoryInterface $objectFactory = null,
48
        Cache $cache = null,
49
        Cache $typeDefinitionCache = null
50
    ) {
51
        $cmisBindingsHelper = new CmisBindingsHelper();
52
        $binding = $cmisBindingsHelper->createBinding(
53
            $parameters,
54
            $typeDefinitionCache
55
        );
56
57
        return $binding->getRepositoryService()->getRepositoryInfos();
58
    }
59
}
60