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   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 48
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
eloc 7
dl 0
loc 48
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A names() 0 3 1
A __construct() 0 4 1
A fromURI() 0 3 1
A _valueASN1() 0 3 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