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.

FullName::names()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Sop\X509\Certificate\Extension\DistributionPoint;
6
7
use Sop\ASN1\Element;
8
use Sop\X509\GeneralName\GeneralNames;
9
use Sop\X509\GeneralName\UniformResourceIdentifier;
10
11
/**
12
 * Implements 'fullName' ASN.1 CHOICE type of *DistributionPointName*
13
 * used by 'CRL Distribution Points' certificate extension.
14
 *
15
 * @see https://tools.ietf.org/html/rfc5280#section-4.2.1.13
16
 */
17
class FullName extends DistributionPointName
18
{
19
    /**
20
     * Names.
21
     *
22
     * @var GeneralNames
23
     */
24
    protected $_names;
25
26
    /**
27
     * Constructor.
28
     *
29
     * @param GeneralNames $names
30
     */
31 15
    public function __construct(GeneralNames $names)
32
    {
33 15
        $this->_tag = self::TAG_FULL_NAME;
34 15
        $this->_names = $names;
35 15
    }
36
37
    /**
38
     * Initialize with a single URI.
39
     *
40
     * @param string $uri
41
     *
42
     * @return self
43
     */
44 2
    public static function fromURI(string $uri): self
45
    {
46 2
        return new self(new GeneralNames(new UniformResourceIdentifier($uri)));
47
    }
48
49
    /**
50
     * Get names.
51
     *
52
     * @return GeneralNames
53
     */
54 3
    public function names(): GeneralNames
55
    {
56 3
        return $this->_names;
57
    }
58
59
    /**
60
     * {@inheritdoc}
61
     */
62 18
    protected function _valueASN1(): Element
63
    {
64 18
        return $this->_names->toASN1();
65
    }
66
}
67