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.
Completed
Push — master ( c20117...e9301e )
by Daniel
02:01
created

IssuerMeta   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 29
ccs 0
cts 18
cp 0
rs 10
c 0
b 0
f 0
wmc 7
lcom 0
cbo 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A fromRdnSequence() 0 13 2
B __construct() 0 7 5
1
<?php
2
3
namespace LiquidWeb\SslCertificate;
4
5
class IssuerMeta
6
{
7
    protected $commonName;
8
    protected $countryName;
9
    protected $organizationName;
10
    protected $organizationUnitName;
11
12
    public static function fromRdnSequence(array $input): IssuerMeta
13
    {
14
        $items = [];
15
        foreach ($input as $arr) {
16
            // Get the actual item
17
            $rawItem = $arr[0];
18
            $type = explode('id-at-', $rawItem['type'])[1];
19
            $value = $rawItem['value']['printableString'];
20
            $items[$type] = $value;
21
        }
22
23
        return new static($items);
24
    }
25
26
    public function __construct(array $input = [])
27
    {
28
        $this->commonName = isset($input['commonName']) ? $input['commonName'] : '';
29
        $this->countryName = ($input['countryName']) ? $input['countryName'] : '';
30
        $this->organizationName = isset($input['organizationName']) ? $input['organizationName'] : '';
31
        $this->organizationUnitName = isset($input['organizationalUnitName']) ? $input['organizationalUnitName'] : '';
32
    }
33
}
34