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 ( 81a457...ca7640 )
by Daniel
03:05
created

IssuerMeta   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 29
ccs 14
cts 14
cp 1
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 2
    public static function fromRdnSequence(array $input): IssuerMeta
13
    {
14 2
        $items = [];
15 2
        foreach ($input as $arr) {
16
            // Get the actual item
17 2
            $rawItem = $arr[0];
18 2
            $type = explode('id-at-', $rawItem['type'])[1];
19 2
            $value = $rawItem['value']['printableString'];
20 2
            $items[$type] = $value;
21
        }
22
23 2
        return new static($items);
24
    }
25
26 2
    public function __construct(array $input = [])
27
    {
28 2
        $this->commonName = isset($input['commonName']) ? $input['commonName'] : '';
29 2
        $this->countryName = ($input['countryName']) ? $input['countryName'] : '';
30 2
        $this->organizationName = isset($input['organizationName']) ? $input['organizationName'] : '';
31 2
        $this->organizationUnitName = isset($input['organizationalUnitName']) ? $input['organizationalUnitName'] : '';
32 2
    }
33
}
34