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

EDIPartyName::fromChosenASN1()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 4

Duplication

Lines 5
Ratio 100 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 1
Bugs 1 Features 0
Metric Value
dl 5
loc 5
ccs 4
cts 4
cp 1
rs 9.4285
c 1
b 1
f 0
cc 1
eloc 4
nc 1
nop 1
crap 1
1
<?php
2
3
namespace X509\GeneralName;
4
5
use ASN1\Type\Tagged\ImplicitlyTaggedType;
6
use ASN1\Type\UnspecifiedType;
7
8
9
/**
10
 * Implements <i>ediPartyName</i> CHOICE type of <i>GeneralName</i>.
11
 *
12
 * Currently acts as a parking object for decoding.
13
 *
14
 * @link https://tools.ietf.org/html/rfc5280#section-4.2.1.6
15
 * @todo Implement EDIPartyName type
16
 */
17 View Code Duplication
class EDIPartyName extends GeneralName
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
18
{
19
	protected $_element;
20
	
21 2
	protected function __construct() {
22 2
		$this->_tag = self::TAG_EDI_PARTY_NAME;
23 2
	}
24
	
25
	/**
26
	 *
27
	 * @param UnspecifiedType $el
28
	 * @return self
29
	 */
30 2
	public static function fromChosenASN1(UnspecifiedType $el) {
31 2
		$obj = new self();
32 2
		$obj->_element = $el->asSequence();
33 2
		return $obj;
34
	}
35
	
36 1
	public function string() {
37 1
		return bin2hex($this->_element->toDER());
38
	}
39
	
40 1
	protected function _choiceASN1() {
41 1
		return new ImplicitlyTaggedType($this->_tag, $this->_element);
42
	}
43
}
44