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::fromQualifierASN1()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 1 Features 0
Metric Value
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 1
b 1
f 0
cc 1
eloc 2
nc 1
nop 1
crap 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