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.
Test Failed
Pull Request — master (#17)
by Oliver
03:19
created

PharInvocation   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 50
rs 10
c 0
b 0
f 0
wmc 5

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getBaseName() 0 3 1
A getAlias() 0 3 1
A __toString() 0 3 1
A __construct() 0 10 2
1
<?php
2
declare(strict_types=1);
3
namespace TYPO3\PharStreamWrapper\Resolver;
4
5
/*
6
 * This file is part of the TYPO3 project.
7
 *
8
 * It is free software; you can redistribute it and/or modify it under the terms
9
 * of the MIT License (MIT). For the full copyright and license information,
10
 * please read the LICENSE file that was distributed with this source code.
11
 *
12
 * The TYPO3 project - inspiring people to share!
13
 */
14
15
use TYPO3\PharStreamWrapper\Exception;
16
17
class PharInvocation
18
{
19
    /**
20
     * @var string
21
     */
22
    private $baseName;
23
24
    /**
25
     * @var string
26
     */
27
    private $alias;
28
29
    /**
30
     * @param string $baseName
31
     * @param string $alias
32
     */
33
    public function __construct(string $baseName, string $alias = '')
34
    {
35
        if ($baseName === '') {
36
            throw new Exception(
37
                'Base-name cannot be empty',
38
                1551283689
39
            );
40
        }
41
        $this->baseName = $baseName;
42
        $this->alias = $alias;
43
    }
44
45
    /**
46
     * @return string
47
     */
48
    public function __toString(): string
49
    {
50
        return $this->baseName;
51
    }
52
53
    /**
54
     * @return string
55
     */
56
    public function getBaseName(): string
57
    {
58
        return $this->baseName;
59
    }
60
61
    /**
62
     * @return null|string
63
     */
64
    public function getAlias(): string
65
    {
66
        return $this->alias;
67
    }
68
}
69