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.

Factory   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 8

Test Coverage

Coverage 94.74%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 8
dl 0
loc 47
ccs 18
cts 19
cp 0.9474
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A createOperationHandlers() 0 8 1
A createUrlGenerators() 0 14 2
A createOutputter() 0 7 1
1
<?php
2
3
/*
4
 * This file is part of the composer-changelogs project.
5
 *
6
 * (c) Loïck Piera <[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 Pyrech\ComposerChangelogs;
13
14
use Pyrech\ComposerChangelogs\OperationHandler\OperationHandler;
15
use Pyrech\ComposerChangelogs\UrlGenerator\UrlGenerator;
16
17
class Factory
18
{
19
    /**
20
     * @return OperationHandler[]
21
     */
22 14
    public static function createOperationHandlers()
23
    {
24
        return [
25 14
            new \Pyrech\ComposerChangelogs\OperationHandler\InstallHandler(),
26 14
            new \Pyrech\ComposerChangelogs\OperationHandler\UpdateHandler(),
27 14
            new \Pyrech\ComposerChangelogs\OperationHandler\UninstallHandler(),
28 14
        ];
29
    }
30
31
    /**
32
     * @param string[] $gitlabHosts
33
     *
34
     * @return UrlGenerator[]
35
     */
36 14
    public static function createUrlGenerators(array $gitlabHosts = [])
37
    {
38
        $hosts = [
39 14
            new \Pyrech\ComposerChangelogs\UrlGenerator\GithubUrlGenerator(),
40 14
            new \Pyrech\ComposerChangelogs\UrlGenerator\BitbucketUrlGenerator(),
41 14
            new \Pyrech\ComposerChangelogs\UrlGenerator\WordPressUrlGenerator(),
42 14
        ];
43
44 14
        foreach ($gitlabHosts as $gitlabHost) {
45
            $hosts[] = new \Pyrech\ComposerChangelogs\UrlGenerator\GitlabUrlGenerator($gitlabHost);
46 14
        }
47
48 14
        return $hosts;
49
    }
50
51
    /**
52
     * @param string[] $gitlabHosts
53
     *
54
     * @return Outputter
55
     */
56 14
    public static function createOutputter(array $gitlabHosts = [])
57
    {
58 14
        return new Outputter(
59 14
            self::createOperationHandlers(),
60 14
            self::createUrlGenerators($gitlabHosts)
61 14
        );
62
    }
63
}
64