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 ( f4ded9...a7fcfa )
by Joni
04:09
created

CPSQualifier   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 1 Features 0
Metric Value
wmc 4
lcom 1
cbo 4
dl 0
loc 41
ccs 10
cts 10
cp 1
rs 10
c 2
b 1
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A fromQualifierASN1() 0 3 1
A uri() 0 3 1
A _qualifierASN1() 0 3 1
1
<?php
2
3
namespace X509\Certificate\Extension\CertificatePolicy;
4
5
use ASN1\Type\Primitive\IA5String;
6
use ASN1\Type\UnspecifiedType;
7
8
9
/**
10
 * Implements <i>CPSuri</i> ASN.1 type used by
11
 * 'Certificate Policies' certificate extension.
12
 *
13
 * @link https://tools.ietf.org/html/rfc5280#section-4.2.1.4
14
 */
15
class CPSQualifier extends PolicyQualifierInfo
16
{
17
	/**
18
	 * URI.
19
	 *
20
	 * @var string $_uri
21
	 */
22
	protected $_uri;
23
	
24
	/**
25
	 * Constructor
26
	 *
27
	 * @param string $uri
28
	 */
29 12
	public function __construct($uri) {
30 12
		$this->_oid = self::OID_CPS;
31 12
		$this->_uri = $uri;
32 12
	}
33
	
34
	/**
35
	 *
36
	 * @param UnspecifiedType $el
37
	 * @return self
38
	 */
39 8
	public static function fromQualifierASN1(UnspecifiedType $el) {
40 8
		return new self($el->asString()->string());
41
	}
42
	
43
	/**
44
	 * Get URI.
45
	 *
46
	 * @return string
47
	 */
48 3
	public function uri() {
49 3
		return $this->_uri;
50
	}
51
	
52 5
	protected function _qualifierASN1() {
53 5
		return new IA5String($this->_uri);
54
	}
55
}
56